Dear experts,
I found the following afl somewhere here itself in TJ.
It is MACD. But readings bounded between 0.00 and 0.10.please expalin whats the meaning of the code
It has Buy/sell conditions defined for crossovers. Please remove that and add Buy/sell for below conditions
BUY : When Fsignal = lower boundary
Sell: When Fsignal = upper boundary
----------------------------------------------------------------------
_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);
-----------------------------------------------------------------------
Please modify the code acordingly.
Regards, Rmesh.
I found the following afl somewhere here itself in TJ.
It is MACD. But readings bounded between 0.00 and 0.10.please expalin whats the meaning of the code
It has Buy/sell conditions defined for crossovers. Please remove that and add Buy/sell for below conditions
BUY : When Fsignal = lower boundary
Sell: When Fsignal = upper boundary
----------------------------------------------------------------------
_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);
-----------------------------------------------------------------------
Please modify the code acordingly.
Regards, Rmesh.