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

Stop orders and gaps

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

    Stop orders and gaps

    Hi,

    I attach a picture of what my strategy is doing, so as to find out whether this is expected or not.

    There is a Short entry at 541,5. For piramyding, I use the order type:
    EnterShortStop, with a Stop 1 point below (540,5).


    Since the next bar after entry opens below the level 540,5... The stop is not executed... Is that expected??

    The stop is executed quite a few bars after (see the picture)

    How can I overcome this gap problems??

    Thanks for help!!

    Juan Rivera
    Attached Files

    #2
    Hi jriverac,

    That is the nature of those order types. You are not guaranteed the stop price since when the stop price is reached the order becomes a market order. Also, if you are using this in a backtest the discrepancy becomes even greater due to the nature of backtesting. Please see this article: http://www.ninjatrader-support.com/H...sBacktest.html
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Hi Josh,

      I also thought these type of orders would become market orders, but then they would sell at the open of the next bar if there is a gap. But, as you see in the picture, there is no selling in the next bar but a few bars later on, where the price is again within a range that includes the Stop Price.

      I fixed it manually, but I am trying to really understand how stop orders work.

      Comment


        #4
        It is probably attributed to the discrepancies in the article I linked you to earlier. Other than that you will need to debug it if you want to see exactly it is working. Use TraceOrders = true.
        Josh P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by AdamDJ8, 05-07-2024, 09:18 PM
        2 responses
        15 views
        0 likes
        Last Post -=Edge=-  
        Started by StockTrader88, 03-06-2021, 08:58 AM
        46 responses
        4,100 views
        3 likes
        Last Post tradgrad  
        Started by usasugardefender, Today, 01:42 AM
        0 responses
        1 view
        0 likes
        Last Post usasugardefender  
        Started by haas88, 03-21-2024, 02:22 AM
        15 responses
        182 views
        0 likes
        Last Post haas88
        by haas88
         
        Started by brianfnoel, Today, 01:24 AM
        0 responses
        6 views
        0 likes
        Last Post brianfnoel  
        Working...
        X