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 charlesugo_1, 05-26-2026, 05:03 PM
          0 responses
          60 views
          0 likes
          Last Post charlesugo_1  
          Started by DannyP96, 05-18-2026, 02:38 PM
          1 response
          145 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 05-11-2026, 05:56 AM
          0 responses
          161 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 05-10-2026, 08:12 PM
          0 responses
          97 views
          0 likes
          Last Post CarlTrading  
          Started by Hwop38, 05-04-2026, 07:02 PM
          0 responses
          283 views
          0 likes
          Last Post Hwop38
          by Hwop38
           
          Working...
          X