Rana
See the Beginner Tutorial 2: Commonly Used Core JavaScript for a list of the most commonly used operators
For a complete list see the article on Expressions and Operators in the Core JavaScript Guide (also in the EFS KnowledgeBase)
Alex
I think if (a>b || a>c || a > d || a > e) will do the trick as per thread. I will try to use it and ask your further help later after reading whole of it.
One more question if I may ask here is about calculating mid point
vPP = (vHigh+vLow)/2; This works fine.
But whenever I try to change this 2 to 3 or 4 or (vHigh+vLow)* 0.33 or(vHigh+vLow)* 0.2 , it stops drawing lines. Anything I am missing here ?
Rana
It is likely still drawing them but outside of the visible range of the chart. Just use a debug statement on the result of the calculation and see what value it returns
Alex
I think if (a>b || a>c || a > d || a > e) will do the trick as per thread. I will try to use it and ask your further help later after reading whole of it.
One more question if I may ask here is about calculating mid point
vPP = (vHigh+vLow)/2; This works fine.
But whenever I try to change this 2 to 3 or 4 or (vHigh+vLow)* 0.33 or(vHigh+vLow)* 0.2 , it stops drawing lines. Anything I am missing here ?
haha , you are right.
16200 high and 16000 low. so currently, it draws line at 16100 with (high+low)/2. And when I change it to (high+low)/3, it draws at 10730 which mathematically is correct. I thought it would be drawing somewhere between 16200 high and 16000 low with /3. I somehow managed desired results with vPP = (vHigh -((vHigh-vLow) *0.3)) ; .
Having said that I do not know what " debug statement " is and how to use it. But anyway I am getting results by correcting the formula.
Alex please make my life easier with this too.
I am using
drawTextRelative(0, low(inv("d")) , "-" , Color.RGB(0,255,0) , Color.RGB(0,255,0), Text.BOLD | Text.CENTER | Text.TOP, null, 8, "PdLLL"+rawtime(0) ); to draw a line.
Can you help me change values
drawLineRelative(x1, y1, x2, y2, Style, Thickness, Color, TagName)
to draw a line instead of text please.
I would like to draw a line at the high/low of daily bar.
Having said that I do not know what " debug statement " is and how to use it.
If you are unfamiliar with programming in EFS it would benefit you if you take some time to learn a bit more about it.
To this effect I would suggest that you review the JavaScript for EFS videos and the Core JavaScript Reference Guide. Those will provide you with a thorough introduction to programming in JavaScript which is at the foundation of EFS. Then go through the EFS KnowledgeBase and study the Help Guides and Tutorials which will provide you with the specifics of EFS. Also search the forums as they are an invaluable resource in as much as many of the things you are trying to do have been discussed before (and in many cases at length)
Can you help me change values
drawLineRelative(x1, y1, x2, y2, Style, Thickness, Color, TagName)
See this article in the EFS KnowledgeBase on the drawLineRelative() function. Also search the forums as there are literally hundreds of examples of its use
Alex
haha , you are right.
16200 high and 16000 low. so currently, it draws line at 16100 with (high+low)/2. And when I change it to (high+low)/3, it draws at 10730 which mathematically is correct. I thought it would be drawing somewhere between 16200 high and 16000 low with /3. I somehow managed desired results with vPP = (vHigh -((vHigh-vLow) *0.3)) ; .
Having said that I do not know what " debug statement " is and how to use it. But anyway I am getting results by correcting the formula.
Alex please make my life easier with this too.
I am using
drawTextRelative(0, low(inv("d")) , "-" , Color.RGB(0,255,0) , Color.RGB(0,255,0), Text.BOLD | Text.CENTER | Text.TOP, null, 8, "PdLLL"+rawtime(0) ); to draw a line.
Can you help me change values
drawLineRelative(x1, y1, x2, y2, Style, Thickness, Color, TagName)
to draw a line instead of text please.
I would like to draw a line at the high/low of daily bar.
Comment