Screener to check condition only between specified times?
Forums › ProRealTime English forum › ProScreener support › Screener to check condition only between specified times?
- This topic has 9 replies, 3 voices, and was last updated 5 years ago by robdav.
-
-
10/25/2019 at 9:13 AM #111156
I’m trying to write a screener that checks DOpen(0) against another indicator but I only want it to evaluate the condition between a specified time, say the first 10 mins of the market open. At the moment it doesn’t seem to work.
123456Start = 060000End = 103000IF TIME >= Start AND TIME =< End THENConditions...ENDIFI have tried the above but it returns no results.
Is what I’m trying to do possible please?
Thanks
Rob
10/25/2019 at 9:48 AM #11115710/25/2019 at 9:52 AM #11115810/25/2019 at 10:01 AM #11116410/25/2019 at 10:21 AM #11116710/25/2019 at 10:40 AM #11117010/25/2019 at 10:44 AM #111171Forget what I said in my last post, Dopen(0) is a value that can test in any timeframe. So just use the same code that you did but on a timeframe that read the TIME you set on its bar close.
e.g. 103000 is a time read only starting at timeframe 30 minutes (and below obviously).
10/25/2019 at 1:31 PM #111200Hi Nicolas
I’m struggling and would appreciate some help please.
I have coded a dummy ProOrder system with GRAPH statements similar to what is in the SCREENER. I can verify the conditions being met/correct but I cannot get the SCREENER to return any values.
I am executing both the ProOrder system and the screener on a 1 minute chart.
What am I doing wrong please?
Thanks
RobGRAPH check12345678910111213141516171819DEFPARAM CUMULATEORDERS = False//EMA[2] from dailt charttimeframe(daily)EMA2 = ExponentialAverage[2]//Daily SMAsmad20 = average[21]timeframe(default)//dummy order conditionIF smad20=-100 THENBUY AT MARKETENDIFGRAPH DOpen(0) as "Daily Open(0)"GRAPH EMA2 as "Daily EMA 2"GRAPH Close as "Close"SCREENER code123456789101112131415161718192021222324252627282930// Time to check the conditionCheckTime = 090000// Flag setupFlag = 0// EMA[2] from Daily charttimeframe(daily)EMA1 = ExponentialAverage[2]timeframe(default)// Daily open valueDaOpen = DOpen(0)// To go shortIF (TIME = CheckTime) THENIF DaOpen >= EMA1 THENFlag = 2ENDIFENDIF// To go longIF (TIME = CheckTime) THENIF DaOpen <= EMA1 THENFlag = 1ENDIFENDIFSCREENER[Flag](Flag AS "1=Buy 2=Sell")10/25/2019 at 1:38 PM #111204I get plenty of results by using the screener on a 1-hour timeframe.
At the time I write this post, there is 337 elapsed 1-minute bars since 9 o’clock this morning, with a limitation of 254 bars in ProScreener, there is no way for your code to return something..
1 user thanked author for this post.
10/25/2019 at 1:56 PM #111211 -
AuthorPosts
Find exclusive trading pro-tools on