I'm backtesting strategy on historical data off Opentick. And I've discovered discrepancies among date of the entry plotted on a chart and date stated either in Output windows or by Time[0].ToString() function.
See attached chart. Short order plotted on a chart says 10/24 (get by Time[0].ToString() function. Chart itself is showing 10/27.
I'm using this code for getting information about the order execution:
if (WeeklyTrend == "bear" && (WilliamsR(14)[0] > -80))
{
SetStopLoss(100);
EnterShort(DefaultQuantity, "Short "+Time[0].ToString());
stoploss = GetCurrentBid()-2;
Print("");
Print(Time[0].ToString());
Print ("Short position entered");
Print ("Stoploss" +stoploss);
Print ("%R: " +WilliamsR(14)[0]);
}
10/24/2003 0:00:00
Short position entered
Stoploss233
%R: 0
Open PnL: 0
Any idea what's causing this discrepancy here?
Thanks for help.
Regards,
Ondrej

Comment