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

EnterShortStop Problem

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

    EnterShortStop Problem

    Hi

    has anyone an idea, why this EnterShortStop will never be executed ?
    When I just used the EnterShort it works.

    if (
    Close[3] > Open[3] // pos
    && Close[2] > Open[2] // pos
    && Close[1] > Open[1] // pos
    && Close[0] < Open[0] // neg
    && Close[3] < Close[2]
    && Close[2] < Close[1]
    && Open[1] > Close[0]
    )
    {
    // EnterShort();
    EnterShortStop(DefaultQuantity, Close[0], "");
    }


    It's a simple simulation for a retracement after a rally.

    thanks Ali

    #2
    You cannot place a stop order at market. You need to place that order above market for shorts.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Josh View Post
      You cannot place a stop order at market. You need to place that order above market for shorts.
      Sorry, can you give me an example ?

      I saw the following message in the log:

      A SellShort stop order placed at '10.02.2009 00:00:00' has been ignored since the stop price is greater than or equal to close price of the current bar. This is an invalid order and subsequent orders may also be ignored. Please fix your strategy.

      Comment


        #4
        Originally posted by NinjaTrader_Josh View Post
        You cannot place a stop order at market. You need to place that order above market for shorts.
        OK, I'm not shure that I understand it, but this code works:

        EnterShortStop(DefaultQuantity, (Close[0]-(Close[0]*0.001)), "");

        Comment


          #5
          ali321,

          You cannot place a stop order at the same price of the current market. You need to be above or below the current traded price depending on the direction of the order. This is required by the exchange.
          Josh P.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Kaledus, Today, 01:29 PM
          0 responses
          3 views
          0 likes
          Last Post Kaledus
          by Kaledus
           
          Started by PaulMohn, Today, 12:36 PM
          1 response
          15 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by yertle, Yesterday, 08:38 AM
          8 responses
          36 views
          0 likes
          Last Post ryjoga
          by ryjoga
           
          Started by rdtdale, Today, 01:02 PM
          1 response
          6 views
          0 likes
          Last Post NinjaTrader_LuisH  
          Started by alifarahani, Today, 09:40 AM
          3 responses
          18 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Working...
          X