Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SetStopLoss and SetProfitTarget not working as intended

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

    SetStopLoss and SetProfitTarget not working as intended

    Hello forum,

    I would like to get some feedback based on the attached log snippet.

    My strategy opens a short position with 2 contracts and uses SetStopLoss and SetProfitTarget to set the exit orders.

    An error of some kind happens when submitting the Target, but execution continues and the log seems to show that orders made it to the state where they could exit the trade as intended.

    Then the profit target is hit and partially filled and chaos ensues.

    Instead of my position reducing from Short 2 to Short 1 contract, it is now Long 4 contracts. ?!?!

    Next, the target order continues to fill (buy to cover) and the final position is now Long 5 contracts instead of Flat.

    It appears that after the error on submitting the target, Ninja thinks the strategy is Long and not Short

    This is running on a sim account with a live feed from Continuum and there is no manual intervention. This is 100% the strategy.

    Each call for the stop loss is: SetStopLoss ( TradeNumber + " Entry", CalculationMode.Ticks, StopLossTicks, false );
    Each call for the Target is: SetProfitTarget( TradeNumber + " Entry", CalculationMode.Ticks, TargetTicks );
    Attached Files
    daqu40
    NinjaTrader Ecosystem Vendor - QTradez

    #2
    Hello daqu40,

    Thank you for your post.

    We'd definitely need more of your logs to determine what may be occurring. Please send me your full log and trace files so that I may look into what occurred.

    You can do this by going to the Control Center-> Help-> Email Support

    Ensuring 'Log and Trace Files' is checked will include these files. This is checked by default.

    Please reference the following ticket number in the body of the email: 2778343 ATTN Kate W.

    Thanks in advance; I look forward to assisting you further.

    Comment


      #3
      Email with logs and trace, referring the above tick has been sent.
      daqu40
      NinjaTrader Ecosystem Vendor - QTradez

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Today, 05:17 AM
      0 responses
      37 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      124 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      64 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      41 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      46 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X