Francesco78

EURUSD trend following strategy MACD Time frame : H2

Category: Strategies By: Francesco78 Created: January 14, 2019, 10:37 AM
January 14, 2019, 10:37 AM
Strategies
9 Comments
EURUSD trend following strategy MACD Time frame : H2

A simple trend following strategy built with MACD default settings and ADX.
Orders are launched when the MACD cross the 0 level line and with ADX minimal value condition.
Orders have stoploss and takeprofit.

defparam cumulateorders = false

indicator = macd[12,26,9]
n = 1
adxmin = 5
profitti = 70
perdite = 60

cl = indicator crosses over 0 and summation[n](indicator[1]<0)=n and adx[14]>adxmin
cs = indicator  crosses under 0 and summation[n](indicator[1]>0)=n and adx[14]>adxmin
if cs then
 sellshort 2 contract at market
endif
if cl then
 buy 2 contract at market
endif

set target pprofit profitti
set stop ploss  perdite

Download
Filename: EURUSD-trend-following-MACD-H2.itf
Downloads: 594
Francesco78
Francesco78 Master
Currently debugging life, so my bio is on hold. Check back after the next commit for an update.
Author’s Profile

Comments

Daniel Martin
6 years ago
#

Hi do you know how have and entry after the second cross? There is crosses below 0 and crosse about 0 I am looking to have an entry when we have a cross below and after about

Kaci
6 years ago
#

It seems he's just checking that the previous MACD is < 0 for maximum one period ? I'm new too so I may be wrong

Janfi
7 years ago
#

Hello, I'm new to ProRealCode and I do not understand the following summation[n](indicator[1]<0)=n Can you explain it to me please ? Thanks

FREDNC
8 years ago
#

adx[14]>adxmin and adx[14] > adxr[14] and adx[14]>adxmin and adx[14] DIminus[3](close) and DIplus(close)>adxmin and DIplus[1](close)adxmin and even with optimisation of "adxmin " not better than your code

FREDNC
8 years ago
#

Hi Francesco I tried with :

juanj
8 years ago
#

DId some tests using MACD validations on higher timeframes using MTF functionality and unfortunately couldn't get improved results without tweaking other parameters (i.e. SL and TP) as well. Leading me to believe that either higher timeframe validations on MACD are not beneficial or the TP and SL parameters are too optimized. Either way, I like the simplicity of the strategy.

Francesco78
8 years ago
#

Hi, no I didnt try with ADXr but you are more than welcome to post some results of your ideas based on my strategies. Thank you

FREDNC
8 years ago
#

Well, I just checked the Adx advices And I understand the meaning of your code (trend) , did you try with: "Adx Adxr" ?

FREDNC
8 years ago
#

Hi Francesco, Maybe I didn't undersdant well your strategie but it's looks like have a mistake In the short part : "cs = indicator crosses under 0 and summation[n](indicator[1]>0)=n and adx[14]>adxmin" Should be for adx[14] Isn't it ?

ProRealCode ProRealCode
Loading...