Trying to build a screener
Forums › ProRealTime English forum › ProScreener support › Trying to build a screener
- This topic has 3 replies, 2 voices, and was last updated 1 day ago by Patrick K Templar.
Viewing 4 posts - 1 through 4 (of 4 total)
-
-
11/27/2024 at 6:31 PM #240815
Trying to build a screener it showe
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455// Daily Timeframetimeframe(daily)DAILYMA10 = CALL "STIPH10"[1, 10]// Calculate daily conditionsDAILYBULL = (close > DAILYMA10) // Bullish trend conditionDAILYBEAR = (close < DAILYMA10) // Bearish trend conditionif DAILYBULL thenDAILYTREND = 1 // Bullish trendelsif DAILYBEAR thenDAILYTREND = -1 // Bearish trendelseDAILYTREND = 0 // Neutral trendendif// 1-Hour Timeframetimeframe(1hour)HOURMA10 = CALL "STIPH10"[1, 10]// Calculate 1-hour conditionsHOURBULL = (close > HOURMA10) // Bullish trend conditionHOURBEAR = (close < HOURMA10) // Bearish trend conditionif HOURBULL thenHOURTREND = 1 // Bullish trendelsif HOURBEAR thenHOURTREND = -1 // Bearish trendelseHOURTREND = 0 // Neutral trendendif// Default Timeframe (15-Minute)timeframe(default)MA10 = CALL "STIPH10"[1, 10]// Calculate 15-minute conditionsMINUTELONG = (close CROSSES OVER MA10) // 15-minute long conditionMINUTESHORT = (close CROSSES UNDER MA10) // 15-minute short condition// Combine All Timeframe Conditionsif DAILYTREND = 1 AND HOURTREND = 1 AND MINUTELONG thenSIGNAL1 = 1 // Long SignalDIRECTION = 1elsif DAILYTREND = -1 AND HOURTREND = -1 AND MINUTESHORT thenSIGNAL2 = -1 // Short SignalDIRECTION = -1//else//SIGNAL = 0 // Neutral//DIRECTION = 0endif// Screener Output// Screener OutputSCREENER [SIGNAL1 OR SIGNAL2 ] (DIRECTION as "Bull/Bear")d me too many so I only want to look back. Free bars if anyone can help with this I think the code is right but if you can see any issues with the code please please help me
11/27/2024 at 11:58 PM #240833I FOUND A MISTAKE but still need a look bak 2 or 3 bars12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455// Daily Timeframetimeframe(daily)DAILYMA10 = CALL "STIPH10"[1, 10]// Calculate daily conditionsDAILYBULL = (close > DAILYMA10) // Bullish trend conditionDAILYBEAR = (close < DAILYMA10) // Bearish trend conditionif DAILYBULL thenDAILYTREND = 1 // Bullish trendelsif DAILYBEAR thenDAILYTREND = -1 // Bearish trendelseDAILYTREND = 0 // Neutral trendendif// 1-Hour Timeframetimeframe(1hour)HOURMA10 = CALL "STIPH10"[1, 10]// Calculate 1-hour conditionsHOURBULL = (close > HOURMA10) // Bullish trend conditionHOURBEAR = (close < HOURMA10) // Bearish trend conditionif HOURBULL thenHOURTREND = 1 // Bullish trendelsif HOURBEAR thenHOURTREND = -1 // Bearish trendelseHOURTREND = 0 // Neutral trendendif// Default Timeframe (15-Minute)timeframe(default)MA10 = CALL "STIPH10"[1, 10]// Calculate 15-minute conditionsMINUTELONG = (close CROSSES OVER MA10) // 15-minute long conditionMINUTESHORT = (close CROSSES UNDER MA10) // 15-minute short conditionSIGNAL = 0// Combine All Timeframe Conditionsif DAILYTREND = 1 AND HOURTREND = 1 AND MINUTELONG thenSIGNAL = 1 // Long SignalDIRECTION = 1elsif DAILYTREND = -1 AND HOURTREND = -1 AND MINUTESHORT thenSIGNAL = -1 // Short SignalDIRECTION = -1//else//SIGNAL = 0 // Neutral//DIRECTION = 0endif// Screener Output// Screener OutputSCREENER [SIGNAL] (DIRECTION as "Bull/Bear")11/28/2024 at 10:58 AM #240846Hi, you can write the following at the end of the code:
123bars=barssince(signal<>0)SCREENER [bars>=0 and bars<3] (DIRECTION as "Bull/Bear")2 users thanked author for this post.
11/28/2024 at 1:07 PM #240858Is it possible to have more than one screener running and thank you very much for the help that did work
-
AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)
Find exclusive trading pro-tools on
Similar topics: