hello,

I am new to amibroker and am trying to figure this one out.

I have a simple formula
BuyCond1= EMA(  Close , 15 ) > EMA(  Close , 100 );


Buy = Buycond1 ;

Sell = EMA (Close,15)<EMA(Close,100);

I am trying to plot the trade price on the chart. so far I have this:


 Plot(C,"Price", colorBlack, styleLine );
Plot(EMA(C,15),"ema", colorRed );


for( i = 0; i < BarCount; i++ )
{
if( Buy[i] ) PlotText( "Buy\n@" + C[ i ], i, L[ i ], colorGreen );
if( Sell[i] ) PlotText( "Sell\n@" + C[ i ], i, H[ i ], colorRed, colorYellow
);

WHen I apply indicator it plots the price at every point on the chart and
not just when the moving averages cross. Does anyone know why? and can show
me the formula???

It would be much appreciated.

thanks

Reply via email to