Hi, has anybody programmed this indicator for FT ?
Thank you
Pierre
Phillip Nel's 4 hour MACD strategy indicator
-
- Posts: 11
- Joined: Wed Aug 19, 2009 11:49 pm
- Location: Singapore
-
- Posts: 3
- Joined: Wed Jun 16, 2010 4:06 am
- Contact:
Re: Phillip Nel's 4 hour MACD strategy indicator
plaforte wrote:Hi, has anybody programmed this indicator for FT ?
Thank you
Pierre
Where you found this strategy there was the indicator you want
"Only God can judge us"
-
- Posts: 3
- Joined: Tue Feb 19, 2013 11:16 am
It's just a two color MACD histogram that shows when it is increasing or decreasing. The ForexTester MACD is fine except that the histogram is only one color so it is not as easy to see when the direction has changed.
Phillip Nel's 4H MACD Strategy is here: http://www.forexfactory.com/showthread.php?t=14630
Phillip Nel's 4H MACD Strategy is here: http://www.forexfactory.com/showthread.php?t=14630
- Attachments
-
- 2_Color_MACD.png (3.48 KiB) Viewed 14517 times
-
- Posts: 905
- Joined: Sat Jul 11, 2009 10:54 am
-
- Posts: 3
- Joined: Tue Feb 19, 2013 11:16 am
MACD_H4_300_v100_2 is a free indicator available on several forums. I compiled it with the colors I like but they can be easily changed.
To use in MT4, save the code as MACD_H4_300_v100_2.mq4
To use in MT4, save the code as MACD_H4_300_v100_2.mq4
Code: Select all
//+------------------------------------------------------------------+
//| Custom MACD.mq4 |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2007, Igor Morozov"
#property link "http://www.herbspirit.com/mql"
//---- indicator settings
#property indicator_separate_window
#property indicator_buffers 3
#property indicator_color1 LightSeaGreen
#property indicator_color2 Magenta
#property indicator_color3 Silver
#property indicator_style3 STYLE_SOLID
#property indicator_level1 0
#property indicator_levelcolor Silver
#property indicator_levelstyle STYLE_SOLID
//---- indicator parameters
extern int FastEMA=5;
extern int SlowEMA=13;
extern int SignalSMA=1;
//---- indicator buffers
double MacdBuffer[];
double MacdBufferUp[];
double MacdBufferDn[];
double SignalBuffer[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- drawing settings
SetIndexStyle(0,DRAW_HISTOGRAM);
SetIndexStyle(1,DRAW_HISTOGRAM);
SetIndexStyle(2,DRAW_LINE);
SetLevelValue(0,0);
SetIndexDrawBegin(1,SignalSMA);
IndicatorDigits(Point+1);
//---- indicator buffers mapping
SetIndexBuffer(0,MacdBufferUp);
SetIndexBuffer(1,MacdBufferDn);
SetIndexBuffer(2,SignalBuffer);
//---- name for DataWindow and indicator subwindow label
IndicatorShortName("MACD H4-300("+FastEMA+","+SlowEMA+","+SignalSMA+")");
SetIndexLabel(0,"MACD UP");
SetIndexLabel(1,"MACD DN");
SetIndexLabel(2,"Signal");
//---- initialization done
return(0);
}
//+------------------------------------------------------------------+
//| Moving Averages Convergence/Divergence |
//+------------------------------------------------------------------+
int start()
{
int limit;
int counted_bars=IndicatorCounted();
//---- last counted bar will be recounted
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
int macdlimit=limit;
if(macdlimit<Bars-5)
macdlimit+=5;
ArrayResize(MacdBuffer,macdlimit);
ArraySetAsSeries(MacdBuffer,true);
//---- macd counted in the 1-st buffer
for(int i=0; i<macdlimit; i++) {
MacdBuffer[i]=(iMA(NULL,0,FastEMA,0,MODE_EMA,PRICE_CLOSE,i)-
iMA(NULL,0,SlowEMA,0,MODE_EMA,PRICE_CLOSE,i))/Point;
// Print("MACDBUFFER=",MacdBuffer[i]);
}
for(i=0;i<limit;i++)
{
int j=i+1;
while(MacdBuffer[i]==MacdBuffer[j]&&j-i<=5)
j++;
if(MacdBuffer[i]>MacdBuffer[j])
{
MacdBufferUp[i]=MacdBuffer[i];
MacdBufferDn[i]=0;
}
else
{
MacdBufferDn[i]=MacdBuffer[i];
MacdBufferUp[i]=0;
}
}
//---- signal line counted in the 2-nd buffer
for(i=0; i<limit; i++)
SignalBuffer[i]=iMAOnArray(MacdBuffer,Bars,SignalSMA,0,MODE_SMA,i);
//---- done
return(0);
}
//+------------------------------------------------------------------+
-
- Posts: 46
- Joined: Thu Nov 09, 2006 2:29 am
MACD Color
I am quite sure I did something like that (with the help of someone in this forum).
Its name is something like MACD Color, can't remember.
Just search the forum, I am sure I posted it somewhere quite some time ago.
Enjoy
Its name is something like MACD Color, can't remember.
Just search the forum, I am sure I posted it somewhere quite some time ago.
Enjoy
-
- Posts: 46
- Joined: Thu Nov 09, 2006 2:29 am
Correction
Sorry,
My memory failed me. I think the credit has to go to dackjaniels, he created what i think you are looking for.
See the thread: "Custom MACD (based on Elder's impulse system)"
http://www.forextester.com/forum/viewto ... highlight=
Look towards the end of the thread, there you will find what you are looking for. The file is: "MACD_BD_Color Two tone plus EMA.zip"
Cheers
My memory failed me. I think the credit has to go to dackjaniels, he created what i think you are looking for.
See the thread: "Custom MACD (based on Elder's impulse system)"
http://www.forextester.com/forum/viewto ... highlight=
Look towards the end of the thread, there you will find what you are looking for. The file is: "MACD_BD_Color Two tone plus EMA.zip"
Cheers
Who is online
Users browsing this forum: No registered users and 16 guests