Custom 1 line indicator

Questions about MultiCharts and user contributed studies.
robz7575
Posts: 15
Joined: 17 Feb 2018
Has thanked: 1 time
Been thanked: 1 time

Custom 1 line indicator

Postby robz7575 » 10 Aug 2022

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
high plus low plus close.PNG
high plus low plus close /5
(7.48 KiB) Not downloaded yet

User avatar
ABC
Posts: 718
Joined: 16 Dec 2006
Location: www.abctradinggroup.com
Has thanked: 125 times
Been thanked: 408 times
Contact:

Re: Custom 1 line indicator

Postby ABC » 11 Aug 2022

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:

Code: Select all

(High + Low + Close ) * .2 //Note that the above is the same as (High + Low + Close ) / 5
Regards,
ABC


Return to “MultiCharts”