Hello,
I found this nice and simple strategy playing with the “average fullness of last 5 candles” . I added a simple moving average oscillator, with 5 and 50 period and I considered mean reverting long/short condition by setting a threshold to the “average fullnes”
The strategy is really minimally optimized, I only optimized the threshold and the profit and stop target.
Results of backtest and WF are attached
Regards
Francesco
//crude oil 15 min strategy
DEFPARAM cumulateOrders = False // Cumulating positions deactivated
///parameter definition
period = 5
fastav = average[5](close)
slowav = average[50](close)
maoscillator = fastav-slowav
fullness = (Dclose(0)-Dopen(0))/abs(Dhigh(0)-Dlow(0))
avfullness = summation[period](fullness)/period
pr = 50
pl = 40
avfullnessthreshold = 0.2
cl = maoscillator > 0
cl = cl and avfullness < -avfullnessthreshold
// Conditions to enter long positions
cs = maoscillator<0
cs = cs and avfullness > avfullnessthreshold
IF cl THEN
BUY 1 PERPOINT AT MARKET
ENDIF
if cs then
sellshort 1 perpoint at market
endif
set target pprofit pr
set stop ploss pl