3acor 1 Posted February 18 Report Share Posted February 18 Hey, How can I set the candle range to consider the current candle back until the first candle in the session start excluding premarket? Thanks Quote Link to post Share on other sites
wilburpost2 3 Posted February 18 Report Share Posted February 18 Look at the help section: Advanced - Timestamp and Trading Session IsPreMarket Boolean true if the DateTime with which the TradingSessionInfo was created falls between DayStart and SessionStart Quote Link to post Share on other sites
3acor 1 Posted February 19 Author Report Share Posted February 19 20 minutes ago, wilburpost2 said: Look at the help section: Advanced - Timestamp and Trading Session IsPreMarket Boolean true if the DateTime with which the TradingSessionInfo was created falls between DayStart and SessionStart Thanks for the reply. But I need to put it in a range. For example the function: Any(0, "SessionStart", ......) Quote Link to post Share on other sites
wilburpost2 3 Posted February 19 Report Share Posted February 19 Well I'm no code expert, but I think I would just write a loop and keep walking back until the IsPreMarket became true and see if I had a desired result. Since you're using Any( ), I might just exit early since the first instance would be a true result. I'll let the true coders suggest a compact way using the advanced looping functions or some other way. 1 Quote Link to post Share on other sites
Mike Medved 100 Posted February 19 Report Share Posted February 19 Hm. It is not a trivial thing. If it is a timed chart, you can figure out how many candles it takes to session start by subtracting session start time from current candle timestamp and dividing by the candle size. Then use that number in the Any loop.... 1 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.