Mean reverting strategy FOREX - AUDCAD

Category: Strategies By: Francesco78 Created: March 18, 2018, 6:13 PM
March 18, 2018, 6:13 PM
Strategies
1 Comment

This is a mean reverting strategy that I currently run live on AUDCAD, on a 1 hour timeframe.

It is based on Bollinger Bands piercing and accumulation of same direction candlesticks in a single row.

WalkForward analysis attached.

Enjoy, comment and improve 🙂

Discussions about the strategy in the automatic trading forum: https://www.prorealcode.com/topic/reverting-strategy-audcad-h1-timeframe/

//-------------------------------------------------------------------------
// Main code : audcad_meanrevert_v2
//-------------------------------------------------------------------------
defparam cumulateorders = false

n = 1
m = 3
l = 90


cs= summation[n](close>open) = n
cs = cs  and close>bollingerup[20](close)  and close>dlow(2)
cl= summation[m](close<open) = m
cl = cl   and close<bollingerdown[20](close) and close<Dhigh(2)


size = 2
//entry conditions
if cs   then
 sellshort size contract at market
endif

if cl  then
 buy size contract at market
endif

//exit conditions
if shortonmarket and close<average[l](close) then
 exitshort at market
endif


if longonmarket and close>average[l](close) then
 sell at market
endif

 

Download
Filename: WFtest-1.png
Downloads: 235
Download
Filename: WF-non-anchored-1.png
Downloads: 272
Download
Filename: audcadmrh-1519740014c4pl8.png
Downloads: 233
Download
Filename: AUDCAD-Mean-Reverting-1h.itf
Downloads: 692
Francesco78 Master
As an architect of digital worlds, my own description remains a mystery. Think of me as an undeclared variable, existing somewhere in the code.
Author’s Profile

Comments

Logo Logo
Loading...