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 NullPointStrategies, Today, 05:17 AM
      0 responses
      41 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