PaulParticipant
Master
is it a bug or not?
If using criteria like this
ctime = opentime >= 153000 and time < 160000
// entry
if ctime then
it still can open a trade sometimes at 000000 (assuming the rest of the code is good.)(on a 30s timeframe tested)
Changing opentime to time fixes it.
OpenTime is the time when a candle opens, Time when a candle closes.
It seems correct.
Try this indicator:
ctime = opentime >= 153000 and time < 160000
Return ctime
PaulParticipant
Master
with that indicator, it gives value 1 often at 23:59:30 for 1 bar
PaulParticipant
Master
same on dax & other timeframes like 5m, it’s off.
switching to a stock, it’s ok
strange!
That’s correct on a 30-second TF:
- 23:59:30 is > 15:30:00 (OpenTime, the candle that OPENS at 15:30:00)
- 23:59:30 is 00:00:00 when the last bar CLOSES and it’s < 16:00:00
you probably should avoid mixing Opening and Closing times.
PaulParticipant
Master
haha your right! I assumed you can use both, but I will stick to time and double check if I use opentime 🙂
Thnx for the explanation!