• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NJ7 - StopLoss Order stuck in Initialized state

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

    NJ7 - StopLoss Order stuck in Initialized state

    Hi,

    I have a strategy that have the following code on my Initialize() method.

    SetStopLoss("L",CalculationMode.Ticks,stopLoss,tru e);
    SetStopLoss("S",CalculationMode.Ticks,stopLoss,tru e);


    SetProfitTarget("L",CalculationMode.Ticks, profitTarget);
    SetProfitTarget("S",CalculationMode.Ticks, profitTarget);

    Once the strategy is triggered, the order associated with the Profit target goes to "Working" state (as expected). However, the stop loss order remains in "Initialized" state.

    I also had the reverse situation with a previous position where the Stop Loss order went to "Working" and the Profit Target" went to "Initialized"

    What could be the problem? I appreciate your help?

    Thanks,

    Joe

    #2
    Hello,

    Thank you for the post.

    I noted you are using the Simulated stop option so I would expect this in this case. If you use false instead of true this should move the order from Initialized to later states. The Simulated stop feature would do this specifically as it is intended to hide the order from the market. You can find the documentation here:
    https://ninjatrader.com/support/help...tsub=simulated
    SS orders are set to Initialized state
    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Hi Jesse,

      Thank you for your reply and for the resolution. I will make the code change.

      I appreciate your help!

      Joe

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by biojhgkdsd, Today, 05:31 AM
      0 responses
      1 view
      0 likes
      Last Post biojhgkdsd  
      Started by idleme125, Today, 02:15 AM
      1 response
      6 views
      0 likes
      Last Post NinjaTrader_Marco  
      Started by junkone, Today, 02:42 AM
      0 responses
      5 views
      0 likes
      Last Post junkone
      by junkone
       
      Started by pmfracer, Today, 01:45 AM
      0 responses
      6 views
      0 likes
      Last Post pmfracer  
      Started by voltation, Today, 12:58 AM
      1 response
      10 views
      0 likes
      Last Post NinjaTrader_ChrisSch  
      Working...
      X