Doctrading

"Morning CAC40"

Category: Strategies By: Doctrading Created: May 8, 2016, 1:00 PM
May 8, 2016, 1:00 PM
Strategies
4 Comments
"Morning CAC40"

Hello everyone,

This small code looks a bit like my “Day Trading Trend DAX H4”, although it is less efficient.

It takes positions on the CAC40, in M15 graphics, in the morning (hence its name), based on the current momentum, defined by a MACD on the last 14 hours (so the periods are multiplied by 56).

14 hours because it’s like the 08H to 22H day trading.

This code is profitable over the long term, logically.

DEFPARAM CumulateOrders = False


// Taille des positions
n = 3

// Définition du MACD
// Timeframe M15
p = 56 // 56*15 min = 14 HOURS, like 08H to 22H
IndicMACD = MACD[12*p,26*p,9*p](close)

// CONDITIONS ACHAT
c1a = time = 093000
c2a = IndicMACD > IndicMACD[1]

IF c1a and c2a THEN
BUY n SHARES AT MARKET
ENDIF

// CONDITIONS VENTE
c1v = time = 093000
c2v = IndicMACD < IndicMACD[1]

IF c1v and c2v THEN
SELLSHORT n SHARES AT MARKET
ENDIF

// SORTIE
c1sa = time = 214500

IF c1sa THEN
SELL AT MARKET
EXITSHORT AT MARKET
ENDIF

// STOP LOSS & TAKE PROFIT
SET STOP %LOSS 1

Download
Filename: MORNING-CAC40.itf
Downloads: 397
Doctrading
Doctrading Master
Hello, I'm Marc. Nice to meet you.
Author’s Profile

Comments

Doctrading
10 years ago
#

Hello, can you send us your code ?

noisette
10 years ago
#

I tried some backtests with "9:30 MACD" with "Breakout strategy" but results are much better with MACD value at the time of the candle cross over the target price.

Doctrading
10 years ago
#

Yes, nice idea.

noisette
10 years ago
#

Thank you,

I'll try to mix this code with the "Breakout strategy" to see if they can improve each other.

ProRealCode ProRealCode
Loading...