ow to plot buy/sell " Entry price " ( closing price of that candle) on chart,

pareshR

Well-Known Member
#1
Hi

how to plot buy/sell " Entry price " ( closing price of that candle) on chart,



MY AFL:

_SECTION_BEGIN("KPL Swing");
no=Param( "Swing", 20, 1, 55 );
tsl_col=ParamColor( "Color", colorCycle );

res=HHV(H,no);
sup=LLV(L,no);
avd=IIf(C>Ref(res,-1),1,IIf(C<Ref(sup,-1),-1,0));
avn=ValueWhen(avd!=0,avd,1);
tsl=IIf(avn==1,sup,res);

Plot(tsl, _DEFAULT_NAME(), tsl_col, styleStaircase); // or styleaArea
Buy=Cross(C,tsl);
Sell=Cross(tsl,C);
shape=Buy*shapeUpArrow + Sell*shapeDownArrow;
PlotShapes(shape,IIf(Buy,tsl_col,tsl_col),0,IIf(Buy,Low,High));

AlertIf( Buy, "SOUND C:\\Windows\\Media\\disconnect_11.wav", "Audio alert", 1 );
AlertIf( Sell, "SOUND C:\\Windows\\Media\\cuckoo.wav", "Audio alert", 2 );



_SECTION_END();
 

mastermind007

Well-Known Member
#2
BuyPrice = ValueWhen(Buy, Close);

Plot(BuyPrice, "BuyPrice", colorBlue);
 

Similar threads