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 kinfxhk, 07-14-2026, 09:39 AM
        0 responses
        108 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 07-13-2026, 10:18 AM
        0 responses
        95 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 07-13-2026, 09:50 AM
        0 responses
        72 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 07-13-2026, 07:21 AM
        0 responses
        92 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 07-11-2026, 02:11 AM
        0 responses
        70 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Working...
        X