EMA Trend

Nehal_s143

Well-Known Member
#1
Hi

Please help me for this simple condition to plot ribbon on amibroker chart

Using 11 EMA

If 11 EMA is moving up i.e the value of current closed candle is higher then last candle then plot blue ribbon at bottom

If 11 EMA is moving down i.e the value of current closed candle is smaller then last candle then plot red ribbon at bottom

If 11 EMA is moving is flat i.e the value of current closed candle is equal to the last candle then plot yellow ribbon at bottom

Thanks is advance

Regards

Nehal
 

Nehal_s143

Well-Known Member
#2
i got following code on net but its not working, seniors please help to remove error

Plot(EMA(C,11),"",colorRed);


_SECTION_BEGIN("trend");
uptrend=IIf(C>EMA(C,11,-1);
downtrend=IIf(EMA(C,11,-1>C);Plot( 2, /* defines the height of the ribbon in percent of pane width */"ribbon",
IIf( uptrend, colorGreen, IIf( downtrend, colorRed, 0 )), /* choose color */
styleOwnScale|styleArea|styleNoLabel, -0.5, 100 );
_SECTION_END();
 

johnnypareek

Well-Known Member
#3
i got following code on net but its not working, seniors please help to remove error

Plot(EMA(C,11),"",colorRed);


_SECTION_BEGIN("trend");
uptrend=IIf(C>EMA(C,11,-1);
downtrend=IIf(EMA(C,11,-1>C);Plot( 2, /* defines the height of the ribbon in percent of pane width */"ribbon",
IIf( uptrend, colorGreen, IIf( downtrend, colorRed, 0 )), /* choose color */
styleOwnScale|styleArea|styleNoLabel, -0.5, 100 );
_SECTION_END();
Here it is : at ur service:)

HTML:
Plot(EMA(C,11),"",colorRed);
Plot(C,"",1,128);

_SECTION_BEGIN("trend");
uptrend=C>Ref(EMA(C,11),-1);
downtrend=Ref(EMA(C,11),-1>C);
Plot( 2, /* defines the height of the ribbon in percent of pane width */"ribbon",
IIf( uptrend, colorGreen, IIf( downtrend, colorRed, 0 )), /* choose color */
styleOwnScale|styleArea|styleNoLabel, -0.5, 100 );
_SECTION_END();
enjoy
johnnypareek@yahoo. c o m
 

Similar threads