Custom 1 line indicator
Custom 1 line indicator
Hello I am trying to use the custom line 1 indicator and and just plot what the high + low + close /5 would be. It seems to add the high+low+close but I cant get it to divide by 5. Can anyone help? Screen shot attached
- ABC
- Posts: 721
- Joined: 16 Dec 2006
- Location: www.abctradinggroup.com
- Has thanked: 125 times
- Been thanked: 409 times
- Contact:
Re: Custom 1 line indicator
robz7575,
mathematical operators have an order of operations (or operator precedence). High + Low + Close / 5 would not evaluate to the summation of High, Low, Close divided by 5, but adding the summation of High and Low to the result of the division of Close by 5.
https://en.wikipedia.org/wiki/Order_of_operations
To divide the summation of High + Low + Close I would suggest using brackets in your expression. For example:
Regards,
ABC
mathematical operators have an order of operations (or operator precedence). High + Low + Close / 5 would not evaluate to the summation of High, Low, Close divided by 5, but adding the summation of High and Low to the result of the division of Close by 5.
https://en.wikipedia.org/wiki/Order_of_operations
To divide the summation of High + Low + Close I would suggest using brackets in your expression. For example:
Code: Select all
(High + Low + Close ) * .2
//Note that the above is the same as
(High + Low + Close ) / 5
ABC