Help to plot price AFL

ocil

Well-Known Member
#1
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?
 

ocil

Well-Known Member
#3
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:

casoni

Well-Known Member
#5
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);
Buysetup=Flip(b1,s1);
Shortsetup=Flip(s1,b1);
trend=IIf(BarsSince(Buysetup)<BarsSince(Shortsetup ),1,0);
Col=IIf(trend==1,5,4);
SetBarFillColor(Col);
Plot(C,"Close",Col,64);
 

ocil

Well-Known Member
#6
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);
Buysetup=Flip(b1,s1);
Shortsetup=Flip(s1,b1);
trend=IIf(BarsSince(Buysetup)<BarsSince(Shortsetup ),1,0);
Col=IIf(trend==1,5,4);
SetBarFillColor(Col);
Plot(C,"Close",Col,64);


Hi Thanks i am able to achieve what i want. Thanks again...God bless you.. :clap:
 

Similar threads

Trade in Rs 20, No more % brokerage

Name:Phone:
Email:City:
State:
Are you a day trader?