Help me plz anyone know how to plot stoploss line in graph ?


Well-Known Member
thank you but i want it to plot in chart window , what code i hv to add ?
This code computes SL Values for long trades using 5 bar(weekly) Flow method. You can adjust computations for percentages and remove MACD based Buy/Sell. If you use different variables to signal entry exit,
use 'em in this formula instead of buy sell or alias 'em to Buy Sell

m = MACD();  /// Do not use this in real code 
s = Signal();  /// Do not use this in real code 
Buy = Cross(m,s); /// Do not use this in real code 
Sell = Cross(s,m); /// Do not use this in real code 

LongStop = IIf(Buy, ValueWhen(Buy, Ref(LLV(L,5),-1)),
	IIf (((BarsSince(Buy) >= 1) AND (BarsSince(Buy) < BarsSince(Sell))),
		LLV(L,BarsSince(Buy)-1), Null));

Plot(LongStop, "SL", colorBlack, styleStaircase | styleDots);

Similar threads

Broker Special Offers

Intraday Higher Leverage

Save up to 90% in brokerage and get higher leverage for intraday trades.

Are you a day trader?