Unable to plot shapes on OHLC charts, code when applied shows no error
_SECTION_BEGIN("Strength");
Strength = ((abs(O-C)/H-L)*100);
Buy=Strength>=50;
PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorGreen, 0, 0, 5, 0);
_SECTION_END();
Any help appreciated
regards
Sreenivasa
Pietro
3
Hello sreeni08,
- Strength will never reach ">= 50", check mathematics
Strength = ( ( abs( O - C ) / H - L ) * 100 );
result in:

- Change mathematics
Strength = ( ( abs( O - C ) / ( H - L ) ) * 100 );

- To plot shapes you have to define yposition correct, you plot at zero line position just in time
PlotShapes( IIf( Buy, shapeSmallSquare, shapeNone ), colorBrightGreen, 0, L, -12, 0 );

regards, Peter
3 Likes
Thanks Peter for the help
rather than this "Strength = ((abs(O-C))/(H-L)*100);"
I was using this " Strength = ((abs(O-C)/H-L)*100);
thanks again
Sreenivasa