So????
Simply adjust the code given by Tomasz.
Instead of stoptypetrailing use stoptypeloss and stoptypeprofit.
Instead of stopmodepercent use stopmodepoint.
Instead of Highestsince(....) use Valuewhen(Buy, Buyprice - stoplevel) and/or Valuewhen(Buy, Buyprice + tgtlevel)
And it will look like below
And one hint in regards to plotshapes
Thank you Sr114
I tried doing that..still not able to plot the lines...below is the code which i did
do point me out whats wrong in it..
StopLevel = 2*ATR(14);
ApplyStop( stopTypeLoss, stopModePoint, StopLevel, True );
Equity( 1, 0 ); // evaluate stops, all quotes
SetOption("EveryBarNullCheck", True );
Buystop = IIf( Buy, BuyPrice-Stoplevel , Null );
Shortstop = IIf( Short, ShortPrice+Stoplevel , Null );
Plot( Buystop, "Buystop", colorRed );
Plot( Shortstop, "Shortstop", colorGreen );
PlotShapes(IIf(Sell==1, shapeStar, shapeNone), colorRed, 0,High, Offset=30);
PlotShapes(IIf(Sell==2, shapeHollowCircle, shapeNone), colorOrange, 0,High, Offset=30);
PlotShapes(IIf(Cover==1, shapeStar, shapeNone), colorGreen, 0,Low, Offset=-30);
PlotShapes(IIf(Cover==2, shapeHollowCircle, shapeNone), colorDarkGreen, 0,Low, Offset=-30);