I have coded a NinjaScript Strategy that utilises an ATM strategy and backtested it using the bar replay feature.
Everything went smooth until now, after multiple rounds of slightly altering the used atm strategy and therefore getting wildly different results.
Now, as I tried to change the atm strategy from a trailing version with auto breakeven to a static 1 to 1 rr, it somehow doesn't use those parameters anymore.
I've tried the following steps to get rid of the problem.
Replaced my atm order entry:
if (orderId.Length == 0 && atmStrategyId.Length == 0 && X
{
isAtmStrategyCreated = false;
atmStrategyId = GetAtmStrategyUniqueId();
orderId = GetAtmStrategyUniqueId();
AtmStrategyCreate(OrderAction.Sell, OrderType.Market, Low[0], 0, TimeInForce.Gtc, orderId, "changed this parameter", atmStrategyId, (atmCallbackErrorCode, atmCallBackId) =>
{
if (atmCallbackErrorCode == ErrorCode.NoError && atmCallBackId == atmStrategyId)
isAtmStrategyCreated = true;
recompiled. Still didn't work.
Copy pasted the entire strategy code into a new strategy, saved that unter a different name, loaded that, didn't work.
I've also tried to delete the Documents\NinjaTrader 8\bin\Custom files as well as the Documents\NinjaTrader 8\cache.
I've tried a completely new chart, added the strategy via the control center and via a right click on the chart.
But still, everything doesn't work and it is still executing the strategy with the former atm strategy with a trailing stop.
Any pointers as to what I could try?
Cheers

Comment