Simple Coding Help - No Promise.

buy entry :

a bull candle open,high,low,close mustbe
above ema 200 line, without touching ema200 line

bull candle high to be broken in next candle
to enter long

stoploss will be the ema200 line

re entry based on the rule satisfied

sell entry :

a bear candle must open, high, low close values
beow ema200 , that candle should not touch
ema 200 line

bear candle low to be broken in next candle to
enter short

stoploss will be the ema200 line

re entry as per strategy
 

hmp

Well-Known Member

Try this

Code:
 Plot(Close,"Price",colorBlack, styleCandle);
 Plot(EMA(Close,5),"5EMA",colorBlue,style=styleThick);
 Plot(EMA(Close,34),"34EMA",colorRed,style=styleThick);
 Plot(EMA(Close,200),"200EMA",colorYellow,style=styleThick);

 Buy=Cross(EMA(Close,5),EMA(Close,200));
 Sell=Cross(EMA(Close,200),EMA(Close,5)); 
Short=Sell; Cover=Buy; shape = Buy * shapeUpArrow + Sell * shapeDownArrow; PlotShapes( shape, IIf( Buy, colorGreen, colorRed ), 0, IIf( Buy, Low, High ) );
 _SECTION_END(); _SECTION_BEGIN("Magnified Market Price");
FS=Param("Font Size",30,11,100,1); 
GfxSelectFont("Times New Roman", FS, 700, True ); 
GfxSetBkMode( colorWhite ); GfxSetTextColor( ParamColor("Color",colorBlack) );
 Hor=Param("Horizontal Position",600,1,1200,1);
 Ver=Param("Vertical Position",1,1,830,1); GfxTextOut(""+C, Hor , Ver );
 YC=TimeFrameGetPrice("C",inDaily,-1); DD=Prec(C-YC,2); xx=Prec((DD/YC)*100,2); 
GfxSelectFont("Times New Roman", 11, 700, True ); GfxSetBkMode( colorWhite );
 GfxSetTextColor(ParamColor("Color",colorBlack) ); 
GfxTextOut(""+DD+" ("+xx+"%)", Hor , Ver+45 );
Filter=Buy OR Sell; 
 
AddColumn(IIf(Buy,BuyPrice,Null)," Buy Signal ", 6.2,1.2,colorGreen); 
AddColumn(IIf(Sell,SellPrice,Null)," Sell Signal ",6.2,1.2,colorOrange); 
AddColumn(C,"LTP",6.2,1.2);
 _SECTION_END();
Dear Amit ji
In this can you pl.add buy/sell crossover for 5 & 34 along with exploration for this also?
Regards
 
Hi Happy Singh,

Can you please provide a simple code for Supertrend.

Which has the buy and sell signal.
Which has sound alert when buy and sell signal is given by chart in amibroker.

Thanks for you help.
 

hmp

Well-Known Member
Amit ji Yes i agree, but what i have observed is when explored it gives buy/sell for 5/200 crossover only & i also want crossover signals for ema 5/34 within it.
Regards.
 

Similar threads