Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

StopLoss does not work

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

    StopLoss does not work

    Hello!

    I am trying to set a Stop loss Order at a defined price. Stop Loss Price calculation works. See output Window - also no other Errors.
    After opening a position I try to set the Stopp Loss using SetStopLoss() - see code - but stop loss will not be executed. Target Setting works.

    I prepared a simple example for demonstration purpose - Please see the attached image with Code, Chart and Output Window result.
    Why does the Stop loss not wok?

    Thank You.

    #2
    Hello Tradix,
    Thanks for your post.

    Does the Logs tab of your Control Center report any errors?

    What does TraceOrders report?


    Josh G.NinjaTrader Customer Service

    Comment


      #3
      Thanks Josh for Your hints,

      the analysis results with TraceOrders and Control Center log show, that the stopp price is smaller 0. I do not understand why. My assumption ist, that "Position.AveragePrice" is 0 at the point of time it gets calculated internally. I do not know how to solve it.

      BUT: I changed my stopp mode to "currency". It works as expected. Also Mode = "ticks" works as expected. I will not use "Position.AveragePrice" for Stopp Loss calculation any more, as it is also simpler to use the tick mode.

      See images:

      Best Regards!
      Attached Files

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CaptainJack, 05-29-2026, 05:09 AM
      0 responses
      163 views
      0 likes
      Last Post CaptainJack  
      Started by CaptainJack, 05-29-2026, 12:02 AM
      0 responses
      82 views
      0 likes
      Last Post CaptainJack  
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      125 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      206 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      184 views
      0 likes
      Last Post CarlTrading  
      Working...
      X