ygnhzeus 6 posts msg #125673 - Ignore ygnhzeus |
10/21/2015 2:40:21 AM
Hi guys,
I'm wondering if it's possible to calculate some custom indicator values on daily basis and draw them on a chart? What I have found via doc is drawing simple lines or existing indicators.
For example, I have calculated ap with:
set{ap,(high+low+close)/3}
How to draw ap on a chart?
Thanks
|
ygnhzeus 6 posts msg #125674 - Ignore ygnhzeus |
10/21/2015 2:49:34 AM
Oops, seems set{ap,(high+low+close)/3} is not a valid syntax.
How to calculate the average of high/low/close? Thanks!
|
ygnhzeus 6 posts msg #125675 - Ignore ygnhzeus |
10/21/2015 3:26:01 AM
I've figured out how to calculate the average, but the last line seems not work. Is it possible to draw the esa variable? Looks like setting it to CEMA(ap2, n1) is not valid.
set{ap, high+close}
set{ap1, low+ap}
set{ap2, ap1/3.0}
set{esa, CEMA(ap2, n1)}
|
four 5,087 posts msg #125694 - Ignore four modified |
10/21/2015 11:09:30 AM
|
ygnhzeus 6 posts msg #125709 - Ignore ygnhzeus |
10/21/2015 5:45:56 PM
Interesting, why the following does not work with the second parameter of CEMA set to a variable?
set{n, 1}
set{ap, high+close}
set{ap1, low+ap}
set{ap2, ap1/3.0}
set{esa, CEMA(ap2,n)}
draw esa on plot close
draw ap2
/*esa = apt2 when cema is = 1*/
|
four 5,087 posts msg #125712 - Ignore four modified |
10/21/2015 9:48:40 PM
U s a g e
C E M A ( I n d i c a t o r , d a y s )
*Must be days which will be a 1,2,3.. and not a variable.
|