Hi, in my study I have a trigger to enter a position, enterSignal. In order to prevent false positives during live trading, I currently use this code to enter the position:
This is working as expected so far -- when using 15m charts, trades are entered as soon as the clock strikes 10:45 if enterSignal was TRUE at 10:30 bar.
My question is, what if I changed the code to a negative offset:
Using the example above, if enterSignal was TRUE at the 10:30 bar, when would the order execute?
I read https://usethinkscript.com/threads/plotting-future-and-past-offsets.4093/, but still not sure how it would impact a live trade such as in the example above.
Code:
# Enter if enterSignal was TRUE in the previous bar
enterSignal[1]
This is working as expected so far -- when using 15m charts, trades are entered as soon as the clock strikes 10:45 if enterSignal was TRUE at 10:30 bar.
My question is, what if I changed the code to a negative offset:
Code:
enterSignal[-1]
Using the example above, if enterSignal was TRUE at the 10:30 bar, when would the order execute?
I read https://usethinkscript.com/threads/plotting-future-and-past-offsets.4093/, but still not sure how it would impact a live trade such as in the example above.