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 benmarkal, Yesterday, 12:52 PM
        3 responses
        22 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by helpwanted, Today, 03:06 AM
        1 response
        17 views
        0 likes
        Last Post sarafuenonly123  
        Started by Brevo, Today, 01:45 AM
        0 responses
        11 views
        0 likes
        Last Post Brevo
        by Brevo
         
        Started by aussugardefender, Today, 01:07 AM
        0 responses
        6 views
        0 likes
        Last Post aussugardefender  
        Started by pvincent, 06-23-2022, 12:53 PM
        14 responses
        244 views
        0 likes
        Last Post Nyman
        by Nyman
         
        Working...
        X