# Help to plot price AFL

#### ocil

##### Well-Known Member
Hi I need help to plot price in amiboker when signal is buy all candle should green until signal reverse. Same in sell signal after that all the candle is red. Can any one help me?

#### trash

##### Well-Known Member
Hi I need help to plot price in amiboker when signal is buy all candle should green until signal reverse. Same in sell signal after that all the candle is red. Can any one help me?

SetBarFillColor( colorarray ) ;

#### ocil

##### Well-Known Member
SetBarFillColor( colorarray ) ;
I have try the blow code all are red excluding one candle is green with buy signal. Pls advice what i have done wrong? Thanks for your help. :thumb:

SetBarFillColor( IIf( Buy, colorGreen, colorRed ) );
Plot( C, "Price", IIf( Buy, colorGreen, colorRed ), styleBar |styleThick );

Last edited:

#### ocil

##### Well-Known Member
Hi Any help on this issue?

#### casoni

##### Well-Known Member
ya..
check this .
this based on ema cross , when ema 5 is above ema 20 , candle is green ,
if ema 5 is below ema 20 candle will be red.

hope this helps

e1=EMA(C,5);
e2=EMA(C,20);

Plot(e1,"",6,1);
Plot(e2,"",4,1);

b1=Cross(e1,e2);
s1=Cross(e2,e1);
Shortsetup=Flip(s1,b1);
Col=IIf(trend==1,5,4);
SetBarFillColor(Col);
Plot(C,"Close",Col,64);

#### ocil

##### Well-Known Member
ya..
check this .
this based on ema cross , when ema 5 is above ema 20 , candle is green ,
if ema 5 is below ema 20 candle will be red.

hope this helps

e1=EMA(C,5);
e2=EMA(C,20);

Plot(e1,"",6,1);
Plot(e2,"",4,1);

b1=Cross(e1,e2);
s1=Cross(e2,e1);
Shortsetup=Flip(s1,b1);