Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy script keeps using the old ATM Strategy

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Strategy script keeps using the old ATM Strategy

    Hey everyone,

    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

    #2
    Hello totalnewbie,

    All that I could suggest here would be to try and recreate the ATM and test with that. It sounds like you made changes to both the ATM and the strategies code so it would be impossible to say which specific change may be preventing the strategy from working. If no ATM is being submitted then that may be related to the strategies code and entry logic. If the ATM is being submitted but the parameters are not being used that may be if the template is not saved, you can edit the template in the other trading tools to verify if its been saved or not.

    Comment


      #3
      Hey Jesse,

      thank you for your answer.
      I changed the strategy only after I realised that changing the ATM strategy did not help and it kept using the old parameters.

      Then, when changing the ATM template in the script also did not help, I resorted to deleting all NT files on my computer and doing a completely clean new install.
      It's too bad about my templates, but that was worth it (I exported all relevant strategies beforehand).

      Thread can be closed. Thanks again.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Yesterday, 05:17 AM
      0 responses
      64 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      139 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      75 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      45 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      50 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X