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 inanazsocial, Today, 01:15 AM
      1 response
      6 views
      0 likes
      Last Post NinjaTrader_Jason  
      Started by rocketman7, Today, 02:12 AM
      0 responses
      10 views
      0 likes
      Last Post rocketman7  
      Started by dustydbayer, Today, 01:59 AM
      0 responses
      2 views
      0 likes
      Last Post dustydbayer  
      Started by trilliantrader, 04-18-2024, 08:16 AM
      5 responses
      23 views
      0 likes
      Last Post trilliantrader  
      Started by Davidtowleii, Today, 12:15 AM
      0 responses
      3 views
      0 likes
      Last Post Davidtowleii  
      Working...
      X