Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
For Portfolio Manager Click Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

MACD 1mins-5mins-15mins for Amibroker (AFL)
vnlp13
almost 6 years ago
Amibroker (AFL)

Rating:
5 / 5 (Votes 1)
Tags:
amibroker, oscillator, macd, intraday

MACD 1mins-5mins-15mins

Indicator / Formula

Copy & Paste Friendly

MACD 1mins-5mins-15mins

//MACD 1mins-5mins-15mins
SetChartBkColor(ParamColor("Panel Color",colorLightGrey));
SetChartBkGradientFill(ParamColor("Upper Chart",colorLightGrey),ParamColor("Lower Chart",colorLightGrey));

_SECTION_BEGIN("MACD 5P");
r1 = Param( "Fast avg", 12, 2, 200, 1 );
r2 = Param( "Slow avg", 26, 2, 200, 1 );
r3 = Param( "Signal avg", 9, 2, 200, 1 );
Plot( MACD(r1, r2),"MACD Line M5",colorRed,styleLine, styleThick);
Plot( Signal(r1,r2,r3),"MACD Line S5",colorBrightGreen,styleLine, styleThick);

_SECTION_END();

_SECTION_BEGIN("MACD_15_MINS");
r1 = Param( "Fast avg", 12, 2, 200, 1 );
r2 = Param( "Slow avg", 26, 2, 200, 1 );
r3 = Param( "Signal avg", 9, 2, 200, 1 );

TimeFrameSet(in1Minute * 15);
//K=M; 
//D=S
M15 = MACD(r1, r2);
S15 = Signal(r1,r2,r3);
TimeFrameRestore();
M = TimeFrameExpand(M15, in1Minute * 15);
S = TimeFrameExpand(S15, in1Minute * 15);
Hi = IIf(M > S, M, S);
Lo = IIf(M < S, M, S);
COLOR = IIf(Ref(S,1) > Ref(M,1), colorRed, colorGreen);
//COLOR = IIf(K > D AND (K > 80 OR D > 80) OR D > K AND (K < 20 OR D <20), colorLightGrey, COLOR);
PlotOHLC(Lo,Hi,Lo,Hi,"",COLOR, styleNoLabel | styleCloud);
Plot(S, "S15", colorBlack, styleThick );
Plot(M, "M15", colorBlack, styleThick );
//===================================

_SECTION_END();

_SECTION_BEGIN("MACD_30_MINS");
r1 = Param( "Fast avg", 12, 2, 200, 1 );
r2 = Param( "Slow avg", 26, 2, 200, 1 );
r3 = Param( "Signal avg", 9, 2, 200, 1 );

TimeFrameSet(in1Minute * 30);
M30 = MACD(r1, r2);
S30 = Signal(r1,r2,r3);
TimeFrameRestore();

M = TimeFrameExpand(M30, in1Minute * 30);
S = TimeFrameExpand(S30, in1Minute * 30);

Plot(S, "S30", colorRed, styleThick );
Plot(M, "M30", colorGreen, styleThick );

Hi = IIf(M > S, M, S);
Lo = IIf(M < S, M, S);

COLOR = IIf(Ref(S,1) > Ref(M,1), colorOrange, colorLightBlue);
//COLOR = IIf(K > D AND (K > 80 OR D > 80) OR D > K AND (K < 20 OR D <20), colorLightGrey, COLOR);

PlotOHLC(Lo,Hi,Lo,Hi,"",COLOR, styleNoLabel | styleCloud);

_SECTION_END();

2 comments

1. sentrangtw

So it nices when I daytrading!

2. sentrangtw

so good, Thank you so much!

Leave Comment

Please login here to leave a comment.

Back