Hi,
For assessing the slippage I add the Spread and the "Swap" to the SellPrice.
The Swap is a penalty charged by FTMO if I hold the stock during the night.
The SellPrice works nice when I used it on Daily data, but not anymore on 1-Minute data.
The results of my backtest on QQQ are:
CAR = 10.2% without slippage
CAR = 8.2% with the swap (looks correct)
!! CAR = 6.67% with the spread (looks far too high)
!! CAR = 6.67% with the swap AND the spread (Impossible...)
I am unable to find the glitch.
Param_Spread = ParamList("The spread is","Real Spread|No Spread");
Spread = IIf (Param_Spread == "Real Spread",Volume,0);
//I put the nominal value of the spread in the Volume array while importing the ticker.
//There is no "Volume" for my ticker.
Swap_pct = Param("Swap in %", 0.03, 0, 0.1, 0.001);
//I need the 1 minute data for the whole script, that's why I am not on the 1D Timeframe.
NYSE_Closing = Hour()==15 AND Minute()==59;
H1 = HHV (H,390); // 390 minutes between 9:30 and 16:00
L1 = LLV(L,390);
IBS=SafeDivide((C-L1),(H1-L1),0.5);
Buy = IBS<0.45 AND NYSE_Closing;
Sell = IBS>0.55 AND NYSE_Closing;
Day_buy = ValueWhen(Buy,DaysSince1900(),1);
Day_sell = DaysSince1900();
Number_days = Day_sell - Day_buy;
BuyPrice = Close;
SellPrice = Close -Spread -(Swap_pct*Number_days)*Close*0.01;