Optuma Forums › Optuma Scripting › Candle Length Function › Reply To: Candle Length Function
May 10, 2021 at 10:23 am
#63915
- Topics: 40
- Replies: 2,017
- Posts: 2,057
Hi Prudhvi,
Remember that the candle is just made up of the high low open and close. So you can use them. For total candle length it would be High() – Low() For the height of the body (ignoring if it is hollow or solid) it would be ABS(Close() – Open()) The “ABS” takes the absolute value.
If you wanted the last value, put it all in a variable and apply an offset. eg
1 2 3 4 |
v1 = High() - Low(); v1[1] |
That will give you the previous length.
Hope that helps
Mathew