Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Limit and stop entries

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

    Limit and stop entries

    I looked in past threads and cant find an answer to this question .

    Simply , will a limit or stop order entry be cancelled if its not filled on the next bar after the signal triggers ? I've ben forward testing my strategy against live data entering with a market order and am looking for better fills .This is with a ninjascript strategy .

    If so , can I set it up so the ( limit or stop entry ) order will stay active a set number of bars , until it fills or another signal occurs ? Can I do it with the wizard ?

    #2
    Yes, they will cancel. If you do not keep it alive by resubmitting on the next bar they will cancel. If you want to keep it alive for x bars, keep resubmitting.

    Please read the "Order Submission for Entry and Exit Methods - Basic Operation" section of this article: http://www.ninjatrader-support.com/H...verview36.html
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Thanks , also if I run a strategy against live data that enters with a stop order to enter , will the chart NOT show the signals from before the point I load the strategy on the chart ?

      I ask that because when I load a strategy against live data that enters with a market order , the signals and trades that occured before I loaded the strategy show up on the chart with the entries being the closing price ( minus the slippage I factored in ) of the bar that the signal occurs .

      Comment


        #4
        Not sure what you mean. When you load a strategy onto a chart it will show all prior simulated trades.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Maybe I dont have it set up right . What I'm trying to do is - IF fast MA crosses below slow MA THEN enter short position with a stop order - stop price is the fast MA .

          I want it to enter with astop order if price hits the fast MA after the crossover condition is met .

          Comment


            #6
            Right. So you need to keep your orders alive by resubmitting. For sure your orders will cancel because the cross condition is only true for one bar. You should have it set a flag variable to true when the cross happens instead.

            Untested code
            Code:
            if (CrossBelow(SMA(Fast), SMA(Slow), 0))
            {
                 flagVariable = true;
            }
            
            if (flagVariable == true)
            {
                 EnterShortStop(SMA(Fast)[0]);
            }
            
            if (Position.MarketPosition == MarketPosition.Short)
            {
                 flagVariable = false;
            }
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Thanks for that Josh . One more question , I want to enter 2 units and have two seperate profit targets and stops , can I accomplish this using the wizard and how ?

              Comment


                #8
                You will need to call EnterLong twice. Use two separate entry signal names and then match them accordingly with two sets of stops/targets in the Strategy Wizard.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  I'm trying to enter two units at the same time ( same signal ) . I Call enter long two seperate times in the same actions box , name one "1" and the other "2" but only "1" enters .

                  Comment


                    #10
                    When you run your strategy you need to increase your EntriesPerDirection allowance.
                    Josh P.NinjaTrader Customer Service

                    Comment


                      #11
                      That was easy thanks !

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                      0 responses
                      558 views
                      0 likes
                      Last Post Geovanny Suaza  
                      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                      0 responses
                      324 views
                      1 like
                      Last Post Geovanny Suaza  
                      Started by Mindset, 02-09-2026, 11:44 AM
                      0 responses
                      101 views
                      0 likes
                      Last Post Mindset
                      by Mindset
                       
                      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                      0 responses
                      545 views
                      1 like
                      Last Post Geovanny Suaza  
                      Started by RFrosty, 01-28-2026, 06:49 PM
                      0 responses
                      547 views
                      1 like
                      Last Post RFrosty
                      by RFrosty
                       
                      Working...
                      X