Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Help with Order methods.

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

    Help with Order methods.

    I am developing a new strategy. With a particular set of conditions being met, the strategy will be short and I need to enter some form of order which will reverse my position (go long) if and when the price reaches a specified value that is above the current price.

    Is there an order method which will do this in one step, or do I have to place an ExitShortStop() at the required price, keep track of this specific case and then EnterLong() if/when the stop fills? (I have to keep track of the case because there are other situations where the strategy will get stopped out and I will not want to go long)


    All suggestions appreciated.

    #2
    All you have to do is call your EnterLong() method. It will automatically close your short position and reverse you into a long without you needing to explicitly exit your short first.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Ok, that's great to know. But, I want the strategy to do this only if a specified higher price is reached.

      So, in looking at the documentation, I think I need to code an:

      EnterLongStop() W/ the stop price set to the desired entry price.

      Is that correct?
      (The descriptions of the Order Methods in the documentation is a bit terse for us rookies e.g. EnterLongStop(): Generates a buy stop order to enter a long position. :-)

      Comment


        #4
        Hello,

        Or you can just monitor live prices and trigger EnterLong() when you are ready to place the order.
        DenNinjaTrader Customer Service

        Comment


          #5
          Thanks to Josh and Ben,

          I used the EnterLongStop() method which is working exactly as needed.

          Thanks, again

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          627 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          359 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          105 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          562 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          568 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X