I am trying a simple scalping algo for ES futures. I have set a profit stop
at 0.25 point but the backtest gives me more profit than just 0.25 much of the time.
What settings do I need to get the point profit I programmed?
Thanks
Slippage = 0.25;
BuyPrice = Close + Slippage;
RSI_P = RSI(3 );
tn = TimeNum();
startTime = 95000; // start in HHMMSS format
endTime = 152500; // end in HHMMSS format
timeOK = tn >= startTime AND tn <= endTime;
Buy = Cross(10, RSI_P) AND timeOK;
Sell = 0;
ApplyStop(stopTypeNBar,stopModeBars,5);
ApplyStop(stopTypeProfit,stopModePoint,.25);
Gaps in general and gaps on open (between close of previous bar and open of next bar) are your answer. Stops don't occur in void. They occur in actual tradeable price levels. If that happens that gap is wider then you will get more profit.
It would be nice to have an option to disable price improvement when using profit stops. In my experience, when trading intraday, a resting limit order will usually be filled at the limit price, not higher.