Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Limit and Stop orders

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

    Limit and Stop orders

    Dear all,

    On hourly chart, I implemented a below breakout channel using limit and stop orders:
    <<
    if (Close[0] < upEntryTarget)
    EnterLongStop((int) Math.Round(tradeAUM), upEntryTarget, "LS");
    if (Close[0] > upEntryTarget)
    EnterLongLimit((int) Math.Round(tradeAUM), upEntryTarget, "LL");
    >>

    Looking at some trades:
    - Case 1 is OK.
    - Case 2 works if price plunged to the limit order order (red line) and then rebounds to the profit limit (orange line). As this time pattern is not included (visible) in the hourly bar, I assume NT must run the simulation using higher frequency data ?

    Thank you very much,
    Best

    Nicolas
    Attached Files

    #2
    Hello nlaporte,

    Thank you for your post.

    The LL entry in your screenshot, is this in real-time data or during a backtest? What is the period and interval used for this chart? Example: 1 Minute.

    Comment


      #3
      Hi Patrick,

      The chart is 1H frequency, I use the live chart screen which enables me to see recent historical trades.
      Thank you for the help,

      Best,
      Nicolas

      Comment


        #4
        Hello nlaporte,

        Thank you for your response.

        Please right click in your chart > select Strategies > select your strategy > is the CalculateOnBarClose set to True or False?

        Comment


          #5
          Hello,

          I have the following: CalculateOnBarClose = true;
          thank you,

          Best,
          Nicolas

          Comment


            #6
            Hello Nicolas,

            Thank you for your response.

            Based on your entry conditions and the settings the strategy entered appropriately. Can you provide further details on what you are inquiring here?

            Comment


              #7
              Hello,
              Please attached the code. I am wondering if NT, using Kinetic data, places order intrabar when CalculateOnBarClose = true?
              Thank you,

              Best,
              Nicolas

              Comment


                #8
                Which data provider are you currently using? Do they provide real time data?

                If so, your executions will happen intrabar if you're using COBC = false.

                However, if the results you provided was based on historical data, the events will be processed at the end of the bar. In order to get intrabar granularity for historical orders and backtesting, you would need to program in a finer series such as 1 tick or 1 second.

                Please see our Reference Sample on this topic for more information:

                You can submit orders to different Bars objects. This allows you the flexibility of submitting orders to different timeframes. Like in live trading, taking entry conditions from a 5min chart means executing your order as soon as possible instead of waiting until the next 5min bar starts building. You can achieve this by


                As long as your data providers offers historical tick data, you can use them for backtesting purposes as well in this manner - however if they do not provide tick data, you may need another data provider such as Kinetick.
                MatthewNinjaTrader Product Management

                Comment

                Latest Posts

                Collapse

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