PlotShapes - Down arrow shape coming smaller than Up arrow and. .

Hello,

My down arrow shape of signal is coming smaller than that of up arrow. I changed shape to triangle, and what - down arrow is not getting away.

/* Plot Buy and Sell Signal Arrows */

/* My Buy and Sell arrays are filled with 1-s for Buy signal bars and -1 for Sell signal bars. Rest all places 0 */

shape = Buy * shapeUpTriangle + Sell * shapeDownTriangle;

PlotShapes( shape, IIf( Buy, colorWhite , colorWhite /*colorGreen, colorRed*/ ), 0, IIf( Buy, Low, High ), offset = -33);

TempAmibroker

[What I tried]:

Tried changing arrow to triangle, but down arrow remains that way and retains small size.

Searched forum for possible size adjustment possibility, which might have indirectly fixed issue, but I not hit match.

Any clue will be useful.

Thanks a lot for your time.

Kedar

It appears you have a Buy & Sell signal on the same Bar/s clash?

1 Like

shapeUpTriangle returns 9 and shapeDownTriangle returns 10.
If Buy and Sell return TRUE on same bar then shape = 9 + 10.
So shape returns 19 in that case. So you will get different shape other than triangle then.

So either add different shape of your choice if Buy AND Sell occur on same bar:

shape = Buy * shapeUpTriangle + Sell * shapeDownTriangle;
shape = IIf(Buy AND Sell, shapeSmallSquare, shape);

PlotShapes( shape, IIf( Buy, colorWhite , colorWhite /*colorGreen, colorRed*/ ), 0, IIf( Buy, Low, High ), -33);

Or create separate PlotShapes

shape1 = Buy * shapeUpTriangle;
shape2 = Sell * shapeDownTriangle;

PlotShapes( shape1, colorWhite, 0, Low, -33);
PlotShapes( shape2, colorWhite, 0, High, -33);

Or ....

1 Like

Thanks TrendSurfer and fxshrat

My mistake. My BUY-SELL were not coming on same candle. I was putting Sell values as -1 instead of 1.

Changes worked!!

Many thanks for your quick reply. Quite useful. Thanks again!!

Thanks TrendSurfer and fxshrat

My mistake. My BUY-SELL were not coming on same candle. I was putting Sell values as -1 instead of 1.

Changes worked!!

Many thanks for your quick reply. Quite useful. Thanks again!!

.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.