The "Forex BOUNCE" Code

Category: Strategies By: Doctrading Created: April 19, 2016, 9:45 AM
April 19, 2016, 9:45 AM
Strategies
34 Comments

Hello everyone !

Here is a very interesting code and ready to debate.

In fact, I thought I had developed a “perfect” code.

And for good reason : on the GBP/CHF, it transforms (in 16.5 years),  10,000 € in 1.800.000.000 € in H1 charts, and in 1,000,000 € on H4 charts !

The problem is that I forgot the spread.

With a spread of 5 points, it falls to € 243,000 in H4 graphs while the performance is bad in H1 graphs !

Fortunately, in H4 graph the progress of capital curve is very smooth, and with a leverage of 1.5 we go to 1.5 million € of gains, with a drawdown from 16 to 25%, still acceptable.

And we can run this strategy automatically.

Curiously, it is far less profitable than my own algorithms that are set in DAILY graphs ; the spread kills everything, I begin to understand why some professional traders say that they only trade on Daily charts…

So here is the code.

It plays with rebounds in trend, defined by a moving averages channel, and MACD.

The code is optimized for the graphs in H4.

It works on almost all pairs of forex, but need to adjust depending on the timeframe (variable at the entry and exit points).

It required a lot of work from myself, I thought using automatic… but I will stay on my strategies in “Daily », which are finally far more efficient.

Even the “Breakout CAC40” is more efficient from 2008 to 2016.

Too bad, because the strategy seems very reliable and logical.

DEFPARAM CumulateOrders = false

// TAILLE DES POSITIONS
REINV = 1 // Mettre "0" pour ne pas avoir de réinvestissement des gains
levier = 1.5

IF REINV = 0 THEN
n = levier // pas de réinvestissement
ENDIF

IF REINV = 1 THEN  // réinvestissement
capital = 10000 + strategyprofit
n = (capital / 10000) *levier
ENDIF


// DEFINITION DES INDICATEURS

MM3LOW = Average[2](low[1])
MM3HIGH = Average[2](high[1])
IndicMACD = MACD[10,18,6](close)


// ACHAT
// Conditions pour ouvrir une position acheteuse
c1a = (IndicMACD > 0)
NivOuverturePasse = Open[4]

IF c1a AND NivOuverturePasse < MM3LOW THEN
BUY n SHARES AT (MM3LOW-0.001) limit
ENDIF

// Conditions pour fermer une position acheteuse
SELL AT (MM3HIGH+0.001) limit



// VENTE A DECOUVERT
// Conditions pour vendre à découvert
c1v = (IndicMACD < 0)
NivOuverturePasse2 = Open[6]

IF c1v AND NivOuverturePasse2 > MM3HIGH THEN
sellshort n SHARES AT (MM3HIGH+0.0005) limit
ENDIF

// Conditions pour fermer une position vendeuse
exitshort AT (MM3LOW+0.0005) limit

// STOP LOSS : NON

Download
Filename: FOREX-MINIREBOND-OPT.-H4.itf
Downloads: 289
Doctrading Master
Hello, I'm Marc. Nice to meet you.
Author’s Profile

Comments

Logo Logo
Loading...