Timeframe in screener
Forums › ProRealTime English forum › ProScreener support › Timeframe in screener
- This topic has 7 replies, 2 voices, and was last updated 8 years ago by jbyrne.
-
-
10/01/2016 at 5:00 PM #14039
Hi, Ive written some code but i want it to only look at the first 5 min candle of the current day. How can I do this?
Thanks
My code:
1234567891011//Bear CandleBearBody = (open - close)BearWick = (close - low) or (high - open)BearCandle = BearBody < BearWick//Bull CandleBullBody = (close - open)BullWick = (open - low) or (high - close)BullCandle = BullBody < BullWickScreener [BearCandle or BullCandle]10/02/2016 at 1:02 PM #1405110/02/2016 at 2:13 PM #1405310/02/2016 at 2:15 PM #1405410/02/2016 at 3:00 PM #1405510/02/2016 at 4:49 PM #14064ive added IntradayBarIndex[0] to the start of my code and it doesn’t work, the candle is the first bar of the day and therefore bar 0 if im not mistaken. If you could give me some help with the syntax when using it in a screener instead of just an indicator that would help me out alot 🙂
10/02/2016 at 6:16 PM #14068Hmmm.. maybe a time condition would meet more the way you are thinking about your screener.
Add a time condition (adapt it to the open time of the instrument of course):
1tcondition = time>080000 and time<081000Your complete code would look like this:
1234567891011//Bear CandleBearBody = (open - close)BearWick = (close - low) or (high - open)BearCandle = (BearBody < BearWick) and tcondition//Bull CandleBullBody = (close - open)BullWick = (open - low) or (high - close)BullCandle = (BullBody < BullWick) and tconditionScreener [BearCandle or BullCandle]Didn’t test it, Sunday evening coding, should work .. 🙂
10/02/2016 at 6:52 PM #14074 -
AuthorPosts
Find exclusive trading pro-tools on