Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Profit Target dot appears, but no execution

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

    Profit Target dot appears, but no execution

    Hello,

    I am getting strange results in backtesting.

    In one trade, a profit target is met (in fact exceeded by about 4 ticks). The red profit target dot even appears in the backtest chart about where you would expect, but the trade does not exit!

    Please see the attached backtest chart.

    Additional info. To get decent intraday matches the strategy is running on 1500 ticks, with an additional 1 tick trading timeframe with CalculateOnBarClose=true.

    I use EnterLongLimit/EnterShortLimit to enter and SetStopLoss/SetProfitTarget to exit and ensure that I do this on the correct BarsInProgress (=1) on the 1 tick timeframe.

    Any idea what is going on? The backtest is useless to me at the moment

    Thanks
    Attached Files

    #2
    pmcgoohan, welcome to our forums - please run your script with TraceOrders = true set in the Initialize() as it would add helpful order debug info to NT's output window for you -



    The Set()'s would still work on the primary series only in your setup, as they don't have a BarsInProgress parameter to submit to another series.

    This could be done though via coding the Exits with the Exit method calls (like ExitLongLimit) that would have those parameter options in their more advanced overloads.

    Comment


      #3
      Thanks for the reply.

      I have recoded doing my own order management.

      I would prefer to stay managed and have a BarsInProgress parameter to the Set methods though. Perhaps in the next version?

      Comment


        #4
        Ok glad to hear you could resolve - this is on our product management enhancement tracking list already under item # 1813 - I've added your vote in of course now as well.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        56 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        143 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        160 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        96 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        276 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Working...
        X