Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.
    JesseNinjaTrader Customer Service

    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 daniel_weber8, Today, 01:21 PM
      1 response
      10 views
      0 likes
      Last Post NinjaTrader_ChristopherS  
      Started by jungsoohuh, Today, 12:07 PM
      1 response
      23 views
      0 likes
      Last Post NinjaTrader_PaulH  
      Started by SharonSS, Today, 11:54 AM
      1 response
      15 views
      0 likes
      Last Post NinjaTrader_Jim  
      Started by crystalet, Today, 11:20 AM
      3 responses
      17 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by SuperDude123, Today, 09:23 AM
      1 response
      34 views
      0 likes
      Last Post NinjaTrader_JustinD  
      Working...
      X