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 Mindset, 04-21-2026, 06:46 AM
      0 responses
      90 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      135 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      68 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      120 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      69 views
      0 likes
      Last Post PaulMohn  
      Working...
      X