Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Working of EnterLongStop

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

    Working of EnterLongStop

    Hi, I have a strategy running on the FOREX on GBPUSD (Kinetick datafeed=FXCM). I have a EnterLongStop placed at 1.63618. The close price of the graph is equal to the bid price. I had expected that the order would be triggered if the close price hits the triggerprice of 1.63618. But the order was already triggered when the ask price hit the 1.63618 and the order was executed, despite the fact that the close price never reached that level. Could you explain on which prices will the trigger be executed, because I want to execute it based on the real close price (real trades) and not on bid and or ask prices.

    Kind regards,
    Rene

    #2
    Hi,

    I have begun teaching myself to build Strategies this week and I have observed the same thing in regards to EnterLongStop orders. Could someone explain why when the order placement is triggered, the programmed order entry price is disregarded and a market order at current prices is executed instead?

    Thanks,

    RJay
    Last edited by RJay; 12-19-2013, 07:53 AM.
    RJay
    NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

    Comment


      #3
      Hello Rene,

      This is because Forex only has Ask and Bid data so by default NinjaTrader is going to use the "Bid" data as the "Close" data but Buy orders are going to be triggered and executed off of the Ask price, and vise versa for Sell orders.

      RJay, using an automated strategy you may want to check the current ask or bid to make sure that there is a not a big spread between the ask and bid by using GetCurrentAsk() and GetCurrentBid() so that you know your Order will not be triggered right away.

      Let us know if you have any further questions.
      JCNinjaTrader Customer Service

      Comment


        #4
        Originally posted by NinjaTrader_JC View Post
        Hello Rene,

        This is because Forex only has Ask and Bid data so by default NinjaTrader is going to use the "Bid" data as the "Close" data but Buy orders are going to be triggered and executed off of the Ask price, and vise versa for Sell orders.

        RJay, using an automated strategy you may want to check the current ask or bid to make sure that there is a not a big spread between the ask and bid by using GetCurrentAsk() and GetCurrentBid() so that you know your Order will not be triggered right away.

        Let us know if you have any further questions.

        Hi JC,

        Are you telling me that I will only be able to execute "Market Orders" as apposed to only executing an order at a strategy specified price?

        EX. (Close[1] + 5 * TickSize)

        Thanks,

        RJay
        RJay
        NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

        Comment


          #5
          Originally posted by RJay View Post
          Hi,

          I have begun teaching myself to build Strategies this week and I have observed the same thing in regards to EnterLongStop orders. Could someone explain why when the order placement is triggered, the programmed order entry price is disregarded and a market order at current prices is executed instead?

          Thanks,

          RJay
          That is what you asked to be done. If you want a limit order to be triggered by the stop, then your order should be EnterLongStopLimit(), not EnterLongStop().

          Comment


            #6
            Hello RJay,

            EnterLongStop generates a buy stop order to enter a long position. So when the Stop Price (based on Ask) it hit a Market Order will be submitted to enter you in your long position.



            As koganam suggested if you want to define a price then you may want to use EnterLongStopLimit().
            JCNinjaTrader Customer Service

            Comment


              #7
              Originally posted by koganam View Post
              That is what you asked to be done. If you want a limit order to be triggered by the stop, then your order should be EnterLongStopLimit(), not EnterLongStop().
              Hi koganam,

              From my testing so far in market replay, EnterLongLimit appears to be executing Market Orders once the specified point in the strategy is reached, not waiting and executing at the price specified.

              Are you saying that EnterLongStopLimit() will execute a trade at the specified price and at no other price?

              RJay
              RJay
              NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

              Comment


                #8
                Originally posted by NinjaTrader_JC View Post
                Hello RJay,

                EnterLongStop generates a buy stop order to enter a long position. So when the Stop Price (based on Ask) it hit a Market Order will be submitted to enter you in your long position.



                As koganam suggested if you want to define a price then you may want to use EnterLongStopLimit().
                http://www.ninjatrader.com/support/h...gstoplimit.htm
                Hi JC,

                When using the following order entry statement NinjaTrader throws a fit.

                EnterLongStopLimit(DefaultQuantity, (Close[2] - (6 * TickSize)), (Close[2] - (6 * TickSize)), "");


                Error Msg - BuyStop or BuyStopLimit orders cannot be placed below the market.

                RJay
                RJay
                NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

                Comment


                  #9
                  Originally posted by RJay View Post
                  Hi koganam,

                  From my testing so far in market replay, EnterLongLimit appears to be executing Market Orders once the specified point in the strategy is reached, not waiting and executing at the price specified.

                  Are you saying that EnterLongStopLimit() will execute a trade at the specified price and at no other price?

                  RJay
                  Technically, yes.

                  Maybe the issue is with how FOREX is handled, strictly at Bid and Ask prices, as opposed to other equities which do have a concept of a Last price? I do not have a FOREX feed, so I cannot make a definitive test.

                  You could try using the Ask price instead of Close[0].

                  Comment


                    #10
                    Hello RJay,

                    For Buy orders you will want to check to make sure that "Close[2] - (6 * TickSize)" is greater than GetCurrentAsk().
                    JCNinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    650 views
                    0 likes
                    Last Post Geovanny Suaza  
                    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                    0 responses
                    370 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by Mindset, 02-09-2026, 11:44 AM
                    0 responses
                    109 views
                    0 likes
                    Last Post Mindset
                    by Mindset
                     
                    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                    0 responses
                    574 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by RFrosty, 01-28-2026, 06:49 PM
                    0 responses
                    577 views
                    1 like
                    Last Post RFrosty
                    by RFrosty
                     
                    Working...
                    X