Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

An conservative approach on entry and exit price

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

    An conservative approach on entry and exit price

    Hi,

    Since I'm not able to monitor the market all day long, I come up with the following idea to make my calculation on profit as conservative as possible.

    An entry signal is given on today bar,
    I would like to assume my order will always filled at the next bar's high,
    similarly, when an exit signal is given, the position is always closed at the next bar's low.

    May I know how to set it at the strategy wizard ?

    #2
    I'm not sure I follow when you say 'next bar's high' -- do you mean you'd like to be filled when the next bar starts making new highs? What are you comparing the highs to?

    What type of orders are you looking to use? Market, Limit or Stop orders?
    MatthewNinjaTrader Product Management

    Comment


      #3
      Hi,

      Let's say I programmed the strategy to long by a MARKET order, and it will be filled at the Open price of next bar (assuming an entry signal is given on current bar)

      Now just assume, in real trading the order did not filled at the Open for various reasons, but filled at a higher price.

      My idea is : can I backtest the strategy as if the order always filled at the highest price of the next bar?

      Comment


        #4
        If you are using market orders, you would have no control over the price the order is filled at. If you want to specify a higher price to buy at, you would need to use a stop market order.
        MatthewNinjaTrader Product Management

        Comment


          #5
          Thanks.

          Could I do something like this:

          if (AAALowDownBuy(1.75, 1.75).Plot0[0] == 1)
          {
          EnterLongStop(DefaultQuantity, High[-1] + -2 * TickSize, "");
          }

          meaning I want to the stop order place at level of '2 ticks below the next bar's high'

          Comment


            #6
            Hello kenlo,
            Unfortunately you cannot reference to a negative price index.

            For backtesting purpose you can either set an slippage (via the strategy parameters box in the Strategy Analyzer) or you can create your own custom FillType.

            Unfortunately you cannot code FillType using the Strategy Wizard, neither we support coding FillTypes. You may however refer to the @DefaultFillType.cs file in the folder ~\Documents\NinjaTrader 7\bin\Custom\Type\ to get more idea on it.
            JoydeepNinjaTrader Customer Service

            Comment


              #7
              thanks

              I put up the following codes and it seems running (so far).

              if (High[-1] + -2 * TickSize > Close[0]){
              EnterLongStop(DefaultQuantity, High[-1] + -2 * TickSize, "");
              }else{
              EnterLongLimit(DefaultQuantity, High[-1] + -2 * TickSize, "");
              }

              Comment

              Latest Posts

              Collapse

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