I have added bid and ask data using the Add() method:
Add(Instrument.FullName, PeriodType.Minute, BarsPeriod.Value, MarketDataType.Bid); Add(Instrument.FullName, PeriodType.Minute, BarsPeriod.Value, MarketDataType.Ask);
I note that none of the SetStopLoss() nor SetProfitTarget() methods include an overload that incorporates the barsInProgressIndex but all of the following 'Exit' methods do:
ExitLong()
ExitLongLimit()
ExitLongStop()
ExitLongStopLimit()
ExitShort()
ExitShortLimit()
ExitShortStop()
ExitShortStopLimit()
I presume the answer lies in using one or more of these methods to place my stop and target orders(?) The NT7 manual has an article on using historical bid/ask so I gather this should be possible, but I'm just not sure how to get it to work.
For additional context I am using stops and targets that are calculated dynamically at the time the trade is placed, but the stop/target values do not change again from that point.
I find with large data sets (that you easily get in a decent sized backtest) that the backtest is not accurate because trade outcomes would have been different had the correct price series been used.
Comment