Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ProfitTarget filled on backtesting and did not fill on real scenario

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

    ProfitTarget filled on backtesting and did not fill on real scenario

    Dear Friends,


    Please, could somebody help me ? Im a kind of newbie on Ninjatrader coding...


    There is a problem when I run the backtest. Looking at the picture in attachment (1 minute chart) you can see a complete short position, with profit target filled, but in the real scenario it did not fill.


    Im using the code “SetProfitTarget(Target);” atprotectedoverridevoid Initialize()”.


    Why it is happening? Any suggestions?


    Thank you very much and happy new year !!
    Attached Files

    #2
    Fabiorp,

    There are known discrepancies between live trading and backtesting. For more information please see the following link.



    Please let me know if I may assist further.
    Adam P.NinjaTrader Customer Service

    Comment


      #3
      Dear Adam P., Thanks for your answer.

      Are there any way to solve this discrepancies ? Like using MultiTimeFrame ?

      I tried to use "Add(PeriodType.Tick, 1);", but it is not possible to use BarsArray[1] on "SetProfitTarget(Target);"....

      Best Regards,
      Fábio

      Comment


        #4
        fabiorp,

        Yes, indeed there is a work around using this.

        Here is a reference sample : http://www.ninjatrader.com/support/f...ead.php?t=6652

        Please let me know if I may assist further.
        Adam P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        23 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        115 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        68 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        222 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        406 views
        0 likes
        Last Post CaptainJack  
        Working...
        X