This is just to show the correct long colour change. You can see that the close is above the green (albeit still below the khaki) yet correctly turns blue.
Announcement
Collapse
No announcement yet.
2005 Feb: The Truth About Volatility
Collapse
X
-
Doesn't work. 2 answers!
Needs to be; if red bar & close >entry line = blue
or if blue bar & close < exit line = red.
Can you add an additional first question, i.e. if red bar do this, if blue bar do that. I guess the efs only computes on the close, unaware of present red or blue bar.
Comment
-
James 88
So the formula is favouring the long side.
Having said that if what you are trying to do is to color the bars blue when prices cross over the Entry line and in red when they cross under the Exit line then you would need to replace the following section of your code
with the following.
Once you implement these changes you should get the results you are looking for (see screenshot enclosed below)
Hope this helps
Alex
Comment
-
this is the study I'm trying to modify the alerts to on/offAttached Files
Comment
-
James
In the preMain function add a BOOLEAN type FunctionParameter and set it to default to true or false as you prefer eg
PHP Code:var fpx = new FunctionParameter("function_parameter_name", FunctionParameter.BOOLEAN)
fpx.setDefault(true/false);
Then add to the list of arguments of the main() function the name you have assigned to the FunctionParameter
Lastly change the condition in line 63 from
PHP Code:if(vColor1!=vColor2){
PHP Code:if(vColor1!=vColor2&&function_parameter_name==true){
Once you make these changes you should be able to switch on and off the alerts from Edit Studies
Alex
Originally posted by James 88
Hi Alex
How can I select "alerts" on/off in edit studies. (I've tried to understand the tutorials but became a little confused.)
Kind Rgds
James
Comment
Comment