Trabalho concluído
Termos de Referência
Requiring a custom indicator that paints a horizontal line for every candle close(in any timeframe) - have the option to show/hide in different timeframe for the lines drawn by the custom indicator!
Requirement:
Upon candle close:
- calculate that candle's [HIGH-LOW]/2 === VALUE X
- calculate the range of [CLOSE-OPEN OR OPEN-CLOSE] depending on long/short candle ===== RANGE Y
IF(For that candle that just closed)
VALUE X is within(OR equals) RANGE Y, then DRAW Horizontal Line with VALUE = X (make sure there is option for color selection for the line)
ELSE
Do not draw that line.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
More complex criteria to add to the above:
there must be a validation check on existing horizontal lines drawn to "delete" itself IF the value of such lines falls within RANGE Y of new candle closed.
The existing line drawn can still stay if stays outside the range of RANGE Y, and create a "spike" on support/resistance