Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

TimeStamp in import wrong backtesting

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

    TimeStamp in import wrong backtesting

    Hello !!! i have a issue with data import TimeStamp , end of bar and start of bar
    i clean my database no min or dayly bars

    import same file same time UTC, first time i import end of bar timestamp
    ok optimize strategy , look profitable , then

    I Delete Data !!!!!!!!!!!!!!!!

    Load Same file Same Time UTC !!!

    But Start of Bar Time Stamp !!!!

    try my strategy set in it fail 30% down
    i try same testing with 5-6 diffeent starategys
    very simple strategys like generic STO cross
    no time imvolve in trading
    same result no of then was possitive ufter i import start of bar datastamp
    Wood some wood exlain how come time stamp effect STO cross to fail in backtesting 30% ????
    i use 1min data to import
    then for backtesting use 10min
    Do you think i have to delete cache data ?
    i did it no difference
    strategy like this
    very interesting if i optimize first and second test
    output will be very match different
    i dont think i catch data gaps on optimisation
    end of bar timestamp after optimization abut $4000 profit
    start of bar timestamp after optimization $1000 profit
    use same date range and metod optimisation
    how come 1min different in time stamp make $3000 differents after optimization output ?



    if (CCI(Cci)[0] < -LevelEnter && SMA(MaBuy)[0] > SMA(MaBuy)[BarsBuy])

    if (Close[0] > SMA(MaBuy)[0])
    if (Close[0]<High[1])

    {

    EnterLong(Lot, "Buy");
    SetStopLoss("Buy",CalculationMode.Ticks,Stop, false);
    SetProfitTarget("Buy",CalculationMode.Ticks, Profit);
    }
    Attached Files
    Last edited by GainForex; 08-24-2015, 05:42 AM.

    #2
    Hello GainForex,

    Changing the timestamp of the data will completely change the results of the backtest this is expected.

    If you would like to know why it makes different trades, print the values of the conditions and compare before and after.

    Print(Time[0]+" | CCI(Cci)[0]: "+CCI(Cci)[0]+" < -LevelEnter: "+(-LevelEnter)+" && SMA(MaBuy)[0]: "+SMA(MaBuy)[0]+" > SMA(MaBuy)[BarsBuy]: "+SMA(MaBuy)[BarsBuy]);

    This is an example of printing the values in a condition. You will want to print the values of every condition.

    Then this information will let you know why having different data causes different trades and different results.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by RDTrader16, Today, 10:19 PM
    0 responses
    3 views
    0 likes
    Last Post RDTrader16  
    Started by gemify, 03-08-2023, 08:02 AM
    9 responses
    148 views
    0 likes
    Last Post culpepper  
    Started by elirion, Today, 10:03 PM
    0 responses
    1 view
    0 likes
    Last Post elirion
    by elirion
     
    Started by RaddiFX, Today, 09:55 PM
    0 responses
    6 views
    0 likes
    Last Post RaddiFX
    by RaddiFX
     
    Started by Trader146, 03-29-2024, 01:22 PM
    4 responses
    25 views
    0 likes
    Last Post Trader146  
    Working...
    X