I am trying to run a strategy optimization based on the Relative Strength Index. Once the index is above the Overbought line, the strategy closes my long position. I would like to be able to optimize this strategy by waiting to see if the instrument goes further up another 10 points, 20, 30, and so forth, once it crosses the overbought line, instead of just closing the position when it crosses the first time.
At the moment, my NinjaScript Editor has a condition where if RSI >= Overbought, then close long position. How could I set up my strategy to have it place an order at the closing price + X aditional points once the RSI is over, and have the backtest continue whether the order was filled or not?
An help will be greatly appreciated.
Best regards,
Danny Lei
Comment