Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ATM strategy is executing multiple times even when prior orders are active

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

    ATM strategy is executing multiple times even when prior orders are active

    I have a strategy based on ATM that works when I run it for last one month's "replay data" for ES but when I enable it for a simulation account with real time data its executing more than once.
    The strategy is 3 lot with scale out so the 1st time when the strategy executes it places 3 long/short with profit and SL correctly but the strategy gets executed again even when my orders from the 1st execution are active.

    I am using
    if (orderId.Length == 0 && atmStrategyId.Length == 0)
    {
    <logic that triggers an ATM strategy>
    }

    What am I missing here?



    #2
    Hi vpatanka, thanks for posting.

    Replay and real time simulation are both "real time" secarios so the behavior should be the same. Have you used Print() methods in your strategy to print out data as the OnBarUpdate method is running? This can help to explain unexpected results:



    Print every variable you are using in the script to debug the issue. Also make comparison of what you are doing differently than the SampleATMStrategy script.

    Best regards,
    -ChrisL

    Comment


      #3
      Originally posted by NinjaTrader_ChrisL View Post
      Hi vpatanka, thanks for posting.

      Replay and real time simulation are both "real time" secarios so the behavior should be the same. Have you used Print() methods in your strategy to print out data as the OnBarUpdate method is running? This can help to explain unexpected results:



      Print every variable you are using in the script to debug the issue. Also make comparison of what you are doing differently than the SampleATMStrategy script.

      Best regards,
      -ChrisL
      Thanks for the clarification. Let me debug it with lots of Print() statements and see what's going on. Thanks

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Yesterday, 05:17 AM
      0 responses
      62 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      134 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