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 argusthome, 03-08-2026, 10:06 AM
        0 responses
        75 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        45 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        26 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        32 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        62 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X