I would like an indicator that shows me if(o>c,o-c,c-o). I have many more but if someone could just explain how to get started with this simple one I think I might be on my way. Is there one place I can type this in or are many lines of coding necessary? I would appreciate any response. Thx for you time! Jim
Announcement
Collapse
No announcement yet.
Simple formula help
Collapse
X
-
Re: Simple formula help
jimcopen
You don't need to create an if else condition to accomplish what you want.
Just calculate the absolute value of open-close as shown in the enclosed sample code
If you are unfamiliar with programming in efs and are interested in learning then you may want to begin by reviewing the JavaScript for EFS video series 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.
Alex
PHP Code:function main(){
return Math.abs(open(0)-close(0));
}
Originally posted by jimcopen
I would like an indicator that shows me if(o>c,o-c,c-o). I have many more but if someone could just explain how to get started with this simple one I think I might be on my way. Is there one place I can type this in or are many lines of coding necessary? I would appreciate any response. Thx for you time! Jim
-
Re: Re: Simple formula help
Originally posted by Alexis C. Montenegro
jimcopen
You don't need to create an if else condition to accomplish what you want.
Just calculate the absolute value of open-close as shown in the enclosed sample code
If you are unfamiliar with programming in efs and are interested in learning then you may want to begin by reviewing the JavaScript for EFS video series 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.
Alex
PHP Code:function main(){
return Math.abs(open(0)-close(0));
}
Comment
-
Re: Re: Re: Simple formula help
Jim
The example I posted is a complete working script (albeit in its most basic form). Copy the contents of the PHP box, then paste them in the EFS Editor window and save the file. Then load the formula in the chart
Alex
Originally posted by jimcopen
Thanks for the quick response! If I type the code you sent to me into esignal will it come back with the correct #S or is this just an example? I am not a programmer at all. (obviously) My Thomson One or Metastock will will alow me to enter this simple formula and be on my way. Im sure Esignal is powerful once you learn to program java or whatever but I havent got that far yet. Thnaks for the quick links for learning. I might tackle that one day. I appreciate your time! Jim
Comment
Comment