Fix Code for Setting Labels in Indicator
Budget: $10 – $30 USD
My indicator tracks prior day/week/month High and Low levels (and more). I want a text label to also show the prior day's range direction (Rising Up, Rising Down, Falling Up, Falling Down, Expanded Up, Expanded Down, Contained Up, Contained Down)
Rising Up = Prior day Higher High and Higher Low and Close > Open
Rising Down = Prior day High High and Higher Low and Close < Open
Contained Up = Prior day High < Prior day 2 High and Prior day Low > Prior day 2 Low
etc
The "up" and "down" part of my code is correct. However, the Rising/Falling/Expanded/Contained part shows mixed results. Sometimes it is correct, other times it is not.
The attached screenshot shows 5 examples in red box showing what the text label should say vs what it actually says based on the code.
I'm sure it is an easy fix, I'm just not seeing it at present.
Code is attached. Prefer immediate fix.
Thanks!
Bill
Rising Up = Prior day Higher High and Higher Low and Close > Open
Rising Down = Prior day High High and Higher Low and Close < Open
Contained Up = Prior day High < Prior day 2 High and Prior day Low > Prior day 2 Low
etc
The "up" and "down" part of my code is correct. However, the Rising/Falling/Expanded/Contained part shows mixed results. Sometimes it is correct, other times it is not.
The attached screenshot shows 5 examples in red box showing what the text label should say vs what it actually says based on the code.
I'm sure it is an easy fix, I'm just not seeing it at present.
Code is attached. Prefer immediate fix.
Thanks!
Bill