Oil 15 minutes meanreverting strategy

Category: Strategies By: Francesco78 Created: June 28, 2017, 2:28 PM
June 28, 2017, 2:28 PM
Strategies
24 Comments

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

Download
Filename: oil_15min.itf
Downloads: 418
Download
Filename: oil_15min_wf.png
Downloads: 238
Francesco78 Master
This author is like an anonymous function, present but not directly identifiable. More details on this code architect as soon as they exit 'incognito' mode.
Author’s Profile

Comments

Logo Logo
Loading...