Macd time frame for Amibroker (AFL)
Kabir over 15 years ago Amibroker (AFL)
Macd Time frame with signal
Indicator / Formula
Copy & Paste Friendly
_SECTION_BEGIN("Macd time frame");
TimeFrameSet( inDaily);
LongTermEMA = EMA(Close, 10);
TimeFrameRestore( );
TimeFrameSet( inHourly) ;
MediumTermEMA = EMA(Close, 10);
TimeFrameRestore( );
fMACD = MACD(6,19);
fSignal = Signal(6,19, 9);
Buy = Cross(fMACD, fSignal);
Sell = Cross(fSignal, fMACD);
Plot(TimeFrameExpand(LongTermEMA, inDaily), "Daily EMA",
colorRed);
Plot(TimeFrameExpand(MediumTermEMA, inHourly), "\nHourly EMA",
colorBlue);
Plot(fMACD, "\nCurrent chart MACD", colorGreen, styleOwnScale) ;
Plot(fSignal, "\nCurrent chart Signal", colorGreen, styleDashed |
styleOwnScale) ;
PlotShapes(Buy * shapeUpArrow, colorGreen);
PlotShapes(Sell * shapeDownArrow, colorRed);
// program end
_SECTION_END();0 comments
Leave Comment
Please login here to leave a comment.