Good morning,
I want the strategy to run in 1 second time frame because I want it to trigger orders as soon as x crosses y.
However, if x is going back and forth across y every few minutes, I don’t want it to keep trading in and out.
So for that reason I want the strategy to only trade once per hour.
How?
Thanks, Phil
With a condition based on elapsed BARINDEX since the last order for instance:
if x crosses over y and barindex-lastbar >= 3600 then
buy at market
lastbar = barindex
endif
In this example you allow to enter the market only if 3600 bars (3600 seconds = 1 hour) have passed since the last order.
Thank you Nicolas you marvellous Frenchman.