Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

ErrorMessage Sellstop

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

    ErrorMessage Sellstop

    Hello,

    I have error messages when placing a sellstoplimit. Example here: price YM was 26754 when I wanted to place the sellstoplimit. And in the attached message it shows 26747 x 26749 which is correct from my code "entryOrderSbo1a=EnterShortStopLimit(0,true,1,shor tlinevalue, shortlinevalue-2*TickSize, "Sbo1a");" (shortlinevalue is the red dashed line with value 26749.)

    Why appears an error message with "limit price cant be greater than stop price" please?

    Maybe I have not fully understood the sellstop and buyorder logic for coding, sorry if so, and thank you for showing me.

    Thank you!
    Tony
    Attached Files
    Last edited by tonynt; 09-06-2019, 04:12 AM. Reason: correction

    #2
    Hello tonynt,

    Thanks for your post.

    In the case of the EnterShortStopLimit(), as the error message advises, you would need to set the limit price to be less than or equal to the stop price. In reviewing the help guide example for EntershortStopLimit() it appears to show the opposite, so I will submit a change to the help guide example.

    For the EnterLongStopLimit(), the limit price would need the greater than or equal to the stop price.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Hello,

      thank you forr your reply. I want to ask about using sellstopmarket order and buystopmar****rder in a script strategy. When my conditions are true for a sellstopmar****rder then this is place but when later the conditions for buystopmar****rder is true then there is no order placed. Same when condition for buy... is true first then this order is place but then the sell.... is not place with conditions true in the script. What is necessary to add to a script strategy so that this is working for both please.

      Thank you!
      Tony

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by llanqui, Today, 03:53 AM
      0 responses
      4 views
      0 likes
      Last Post llanqui
      by llanqui
       
      Started by burtoninlondon, Today, 12:38 AM
      0 responses
      10 views
      0 likes
      Last Post burtoninlondon  
      Started by AaronKoRn, Yesterday, 09:49 PM
      0 responses
      14 views
      0 likes
      Last Post AaronKoRn  
      Started by carnitron, Yesterday, 08:42 PM
      0 responses
      11 views
      0 likes
      Last Post carnitron  
      Started by strategist007, Yesterday, 07:51 PM
      0 responses
      14 views
      0 likes
      Last Post strategist007  
      Working...
      X