Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Stop price can't be changed below the market

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

    Stop price can't be changed below the market

    Hi,
    In the last few days I sometimes get the following error: "Stop price can't be changed below the market".
    I get the fact that the stop loss price must be below the current market price but I set a trailing stop using the managed approach.
    This is the code that sets the new trailing stop loss:
    SetTrailStop(signalName, CalculationMode.Ticks, newTrailingStop, false);

    I logged the newTrailingStopLoss and it's a positive number so that's not the problem.
    I just don't understand how is it that if I tell ninja to set the stop loss in ticks and in my case it's 13, how is it possible that I'm getting this error message?
    I hope not but I think it's a bug in the platform...
    I would really appreciate any help resolving this problem, thanks in advance

    #2
    Hi weedjitsu, thanks for your post.

    Do you have a test script that I can try? You may send it to platformsupport at ninjatrader.com and reference "ATTN ChrisL 2351606" in the body of the email or post the script here.

    I look forward to hearing from you.

    Comment


      #3
      Originally posted by NinjaTrader_ChrisL View Post
      Hi weedjitsu, thanks for your post.

      Do you have a test script that I can try? You may send it to platformsupport at ninjatrader.com and reference "ATTN ChrisL 2351606" in the body of the email or post the script here.

      I look forward to hearing from you.
      Not right now but I'll write something and post it here

      Comment


        #4
        I sent the test script to the platfrom support email because it's more convenient...
        After we figure out the problem I'm going to post the solution here in case someone will have this issue too

        Comment


          #5
          Hello weedjitsu,

          Thank you for your response.

          I was unable to find your ticket in our support queue. However, I believe a simple solution is possible here.

          When the SetStopLoss() is used are you dynamically changing/setting the newTrailingStop during run-time in OnBarUpdate()?

          If so, you will need to reset your SetStopLoss() when the strategy position is flat to avoid the old price level being used. You can find an example of resetting the SetStopLoss() when flat at the following link: https://ninjatrader.com/support/help...of_stop_lo.htm

          If this is not the case please make sure to reference this thread link in your email to platformsupport[at]ninjatrader[dot]com.We look forward to being of further assistance.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Yesterday, 05:17 AM
          0 responses
          54 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          130 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          71 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          44 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          49 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X