Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Analyzer and EnterLongStopLimit issue

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

    Strategy Analyzer and EnterLongStopLimit issue

    Hello,

    Learning NT 8 ropes finally , and came across an issue. I coded a simple strategy, that after 2 consecutive Higher Highs wants to go long, if current bar breaks high of previous bar (1 hour bars). As soon as current bar opens the logic analyzes if 2 previous bars are higher highs and submits EnterLongStopLimit 1 ticks above previous bar high. If I do not get filled, the order is cancelled on the first tick of next bar. If I get filled, the logic submits bracket profit and stop loss orders via ExitLongLimit and ExitLongStopMarket. Once it hits one of them, it is ready for the next trade.

    All works well during Replay, but when I try to put the strategy through Strategy Analyzer, not a single trade is taken.

    Any idea what could be causing it?

    Thanks,
    redduke

    #2
    Hello RedDuke,

    Thank you for the post.

    Are you using OnEachTick or OnPriceChange in playback?

    Do you have any checks for Historical states to return?

    Have you tried using TraceOrders to check the output, this may highlight if all orders are being expired and not filled, or any other managed order handling problem.



    I look forward to being of further assistance.

    Comment


      #3
      Hi Jesse,

      Thanks for your reply. I use OnEachTick in playback

      I think I found the culprit, I had this code State==State.Realtime, and of course Analyzer is not Real Time. Now I got things from trace to analyze further.

      Regards,
      redduke

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      43 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      21 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      30 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      50 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      40 views
      0 likes
      Last Post CarlTrading  
      Working...
      X