MACD Sample

Enivid

Administrator
Staff member
Nov 30, 2008
19,540
1,601
144
Odesa
www.earnforex.com
Discuss MACD Sample expert advisor. MACD Sample is a standard example MetaTrader 4 EA, which was optimized specifically for GBP/USD currency pair and H4 timeframe is a range pull-back EA with low default take-profit level. You can ask any questions about this expert advisor here.
 
Last edited:
hello
about the macd sample as you can find in mt4 plaform
1.can anyone here can fix this ea to work so he wont have eror code 130 (it happend with ecn brokers)
2.put all his parameters out so i can optimize everything there
 

Attachments

  • 👍
Reactions: Enivid
I have updated the EA to version 1.01 fixing its work with ECN (Market execution) and adding all the relevant input parameters. You can download it from its description page.


hello again sir

i backtest the the ea you fix to work allso with ecn brokers and added external parameters using deafault parameters in mt4 macd sample mql4
i allso backtest the mt4 macd sample that in mt4 platform and i got other results
can you do thesame(fix to work with ecn brokers and added external parameters) as you have done in this mql4 file bellow,not at the one that work with gbp 4h,the mt4 deafault one

thank you for your great support
 

Attachments

The actual difference should be only in the input parameters. If you set the input parameters from the EA you just attached into the EA that I've linked to, you should get the same results. And no, I am not interested in doing the same modifications to the attached EA.
 
The actual difference should be only in the input parameters. If you set the input parameters from the EA you just attached into the EA that I've linked to, you should get the same results. And no, I am not interested in doing the same modifications to the attached EA.
hello sir
i dont have same results .
thank you anyway for you great support
 
hello
is it possible to invert the signal in this macd sample ea ?
i mean if the ea have a signal to buy at 1.1950 so to make him sell at 1.1948 if spread is 2
about sl ,tp trailng stop etc allso to be invert to the other direction (if sl is 40 so tp should be 40 ,if tp is 15 so sl will be 15 etc)
it will help me allot

thank you
 
Last edited:
hello
im not a programer thats why i dont know at all how to do it (im just a trader)
mybe you can do this
it should be a great ea for long term
hope you can help me

thank you sir
 
You do not need some serious programming skills to do that. I am not interested in applying such a change to an EA, but I will help you if you have some specific questions.
ok thank you for your help
i have 2 issues
1.the ea have an OrderModify error 1
2.can you tell me please step by step how to swap buy with sell ,entry with exit sl with tp etc ,i need this ea to be totaly invert
i have great result with this strategy if everything will work fine ill send you the pairs ,time frame and inputs
THANK YOU
 
1. That error appears when you try to modify the order with the same values. Normally, this error should not cause any problems - there is just not point to modify an order to set the same parameters as are already there.

2. Entry conditions are marked with rather explicit commentary in the source code: "check for long position (BUY) possibility" and "check for short position (SELL) possibility". Both exit conditions are marked with the same "should it be closed?" commentary - first is for Buy, second is for Sell. To swap SL and TP, you can just change the SL value to TP value and vice versa.
 
hello sir and thanks for your answer

i tryed to do it but dont succes WITH TP AND SL .
I THINK THAT IN THE MACD EA FROM MT4 (THIS INPUTS I WANT TO INVERT) THERE IS NO SL,
CAN TOU CHECK THAT AND TELL ME HOW TO INVERT THE SL,TRAILING STOP ETC

THANK YOU AGAIN FOR YOU GREAT SUPPORT
 

Attachments

So, you have 50 pips TP and 30 pips SL (TrailingStop also acts as the initial stop-loss in the original MACD Sample EA). If you want to invert them, you just assign 30 pips to TP and 50 pips to SL. Isn't that obvious?
 
It has the same errors as the file you've attached before. One extra curled brack is just on a different line. Try weeding out these errors yourself. It is pretty easy to do as the MetaEditor highlights the syntax and will show you the current opening and closing curled bracket if you put the cursor inside a pair.
 
Hello
I would like get results to be exactly the opposite of what you will get if you BT this ea attached by turning the direction of trades, i used aud/usd-5 min chart.
I've already changed parameters to opposite direction but did not get the exact opposite results in BT
I would be glad if someone would solve this issue
 

Attachments

Last edited: