Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Long order

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

    Long order

    Hello, in my strategy, I need to enter a long position order at an entry-price that is greater than the current price such that if the current price rises through my entry-price I get filled at that price. Can you direct me to a sample program that accomplishes something like this. Thank you!

    #2
    Hi Pman777,

    Thank you for posting.

    You would want to use either a Stop Limit order or Stop Market order.

    While, I don't have a sample program I do have a YouTube training video on the Automated Strategy Development . This video will walk you through how to use the Strategy Wizard with placing orders -
    http://www.youtube.com/watch?v=SpwGT...D7105&index=13

    Additionally, here is a link the Managed Approach from the online help guide -
    http://www.ninjatrader.com/support/h...d_approach.htm

    Let me know if I can be of further assistance.
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      thanks ... I am using EnterLongStopLimit but I get this error: "Buy stop or buy stop limit can't be placed below the market. affected Order: Buy 1 StopLimit @ 1067.1x1067.3" The GetCurrentAsk() price for this example was 1067.2


      Here's my code:

      targetPrice = GetCurrentAsk() + 1*TickSize;
      targetStop = GetCurrentAsk() -
      1*TickSize;
      myEntryOrder = EnterLongStopLimit(targetPrice, targetStop);


      My objective is to set a BuyStop order 1 tick above the current price, anticipating that the current price will eventually hit that price and execute my long order.


      Comment


        #4
        Pman777,

        The order more than likely got placed below the market price at the time.

        EnterLongStopLimit( Limit Price, Stop Price)

        You would need to have the stop price higher as to help avoid market volatility.
        Cal H.NinjaTrader Customer Service

        Comment


          #5
          Thanks again but I'm not sure I understand what you mean. Am I using the wrong field for the current market price ... should I be using GetCurrentBid() ?

          Comment


            #6
            I also want to make sure I understand the structure of the EnterLongStopLimit command. I effectively want to mimic the "BuyStop" order entry command I use with Chart Trader. Am I using the correct command in my strategy?

            Comment


              #7
              Pman777,

              If you want to mimic the Buy Stop from the Chart Trader, you will need to submit a EnterLongStop();

              The Buy Stop if a Stop Market order.

              Below is a link on how to use the EnterLongStop() in your script.
              http://www.ninjatrader.com/support/h...erlongstop.htm
              Cal H.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              637 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              366 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              107 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              569 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              572 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X