I'm going to backtest Larry Williams' volatility breakthrough strategy. However, contrary to my expectation, orders at certain bars are made the next day. Is there anything I missed at my pine script code? Please give me any tiny tips.
@kgp1202 , base on explanation above, probably you should enter at timeframe lower than 1D if you want an order to be executed in that Day bar.
Let's say from 1H tf, you can plot the LW breakout range from yesterday's (D) High - Low using security function.
kgp1202
⋅
@io72signals, Thank you for your reply. Actually, yes. I also try to what you said.
ImNotHere213
⋅
"if bar_index > 6000" may be an issue
and strategy orders can only be executed the next bar's open, not when the signal has printed. It'll always be one candle off
kgp1202
⋅
@Showerhead, Thank you for answer.
"if bar_index > 6000" is for limit number of contracts.
As you said, my code also work after signal has printed. But I wants to executed at signal bar.
Is there any solution for me?
ParabolicValue
⋅
@kgp1202, add "process_orders_on_close=true" at the top.
Let's say from 1H tf, you can plot the LW breakout range from yesterday's (D) High - Low using security function.