Automated MACD Trader

babarmughal
940
babarmughal  

Can someone please help me how to make Automated MACD Trader, trailing stop and ability to change the MACD Default settings....

Thanks

Babar

David Michael
734
David Michael  
babarmughal:
Can someone please help me how to make Automated MACD Trader, trailing stop and ability to change the MACD Default settings....

Thanks

Babar

Hi Babar, I think the auto-script already there, it's EA sample on every MetaTrader 4 installation. Try to find "MACD Sample" on your experts advisor list. Hope this help

babarmughal
940
babarmughal  

Thanks David,

Yes there is MACD sample in my EA but I want to make an EA based on histogram..that BUY when the first histogram bar closes above "0" and sell when the first histogram bar closes below zero ....and at the same time it has to close the long position......I wonder if someone can make EA for this...

Thanks

Babar

[Deleted]  
babarmughal:
Thanks David,

Yes there is MACD sample in my EA but I want to make an EA based on histogram..that BUY when the first histogram bar closes above "0" and sell when the first histogram bar closes below zero ....and at the same time it has to close the long position......I wonder if someone can make EA for this...

Thanks

Babar

Babar,

Please check out the standard MACD EA that's included with your MT4 installation. It functions much the same way you describe your "perfect" MACD EA.

- Ian

babarmughal
940
babarmughal  

Thanks Ian,

I have seen what came with the MT4 but it does involve Moving Av. and i dont want that ...and there is nothing mentioned about the Histogram Bar...I dont know the programming alot..need some help...

Thanks

Babar

niva
206
niva  
babarmughal:
Thanks David,

Yes there is MACD sample in my EA but I want to make an EA based on histogram..that BUY when the first histogram bar closes above "0" and sell when the first histogram bar closes below zero ....and at the same time it has to close the long position......I wonder if someone can make EA for this...

Thanks

Babar

Your idea is lot easier that the sample MACD, doesn't need to deal with the signal line at least.

If you open the MACD indicator, not the EA, with MataEditor, you can see it is actually use a iMA() function to sign values in to the ind_buffer1[] array. This how the indicator produced histogram.

When the histogram value is positive the iMA() value is also positive. Hope you understand the mechanism.

Similarly, the indicator use this line to produce the red signal line.

ind_buffer2=iMAOnArray(ind_buffer1,Bars,SignalSMA,0,MODE_SMA,i);

babarmughal
940
babarmughal  

HI,

can Someone please post a rough programming ....so I can start working on it...

Thanks

niva
206
niva  

babar

Have you programmed with some PC languages, like C or JAVA? If the answer is negative, MQL4 is too difficult for you.

The way for a programmer to learn a new language is to read the source codes. For those who know nothing about programming, I suggest them the most clever and efficient way--go to take a class.

To be a indicator designer, there are just too much things to learn and read. I have to understand the statistics as well as sources codes behind every indicator. So I choose to work on existing methods from other people, and try out different combinations.

babarmughal
940
babarmughal  

Thanks for your reply.....but there must be someone here who can make and EA for MACD.....thanks....HELP

David Michael
734
David Michael  
babarmughal:
Thanks for your reply.....but there must be someone here who can make and EA for MACD.....thanks....HELP

Hi babar, give me some time, I'll post it later on today. Hope this help

babarmughal
940
babarmughal  

Thanks Dave,

I will wait.............

Babar