The last argument to the PlotShapes function is an offset. 12 pixels
works well.
Buy = DateTime() == StrToDateTime("2010-Jan-05");
Sell = DateTime() == StrToDateTime("2010-Jan-11");
Short = Sell;
Cover = Buy;Plot(Close, "Price", colorDarkGrey, styleBar); // Use default positioning for Buy/Sell PlotShapes(Buy * shapeUpArrow + Sell * shapeDownArrow, IIf( Buy, colorGreen, colorRed )); // Add offset for Short/Cover PlotShapes(Short * shapeHollowDownArrow + Cover * shapeHollowUpArrow, IIf( Short, colorRed, colorGreen ), 0, IIf( Short, High, Low ), -12); Mike --- In [email protected], "Antonio Jordao Jr" <ajor...@...> wrote: > > Hi all, > > I have an AFL to plot arrows for buy, sell, short and cover. > > Sometimes the exit of a trade is the entry of another. Sometimes not. How can I make the AFL to display the sell and cover arrows with an offset up or down from the buy and short arrows? I can not plot both. If there is a coincident sign, only one appears at the chart. > > The PLOT lines are like this: > PlotShapes( Buy* shapeUpArrow, IIf( Buy, colorGreen, colorRed ), 0, IIf( Buy,Low, High) ); > > PlotShapes( Short* shapeDownArrow , IIf( Short, colorBlue, colorBlack), 0, IIf( Short,High, Low) ); > > PlotShapes( Sell* shapeDownArrow, IIf( Buy, colorGreen, colorRed ), 0, IIf( Buy,Low, High) ); > > PlotShapes( Cover* shapeUpArrow, IIf( Short, colorBlue, colorYellow), 0, IIf( Short,High, Low) ) > > > Regards > > Antonio >
