I am trying to add another moving average to this rsi indicator but it doesnt want to plot it. any suggestions . The first is the original and the 2nd is the one i am trying to modify.
Announcement
Collapse
No announcement yet.
how add another MA
Collapse
X
-
watchdaride
To add another moving average you need to first declare the study as a global variable (ie outside of function main) and set it to null. You could call the study vMA2ofRSI for example.
Then in main you create the study right after the existing one as shown in the following image
In the return statement (or in any conditions) you will then use vMA2ofRSI.getValue(MAStudy.MA) to access the value of the study.
To add user defined parameters for the study use the existing FunctionParameters as examples.
Alex
Comment
-
watchdaride
You have a couple of errors in the efs. The first one is that you added a space in MAStudy. SIMPLE which should be MAStudy.SIMPLE (see the example in my prior message)
The second error is in the return statement where you are not retrieving the value of the study you created (see image below)
Alex
Comment
-
Anyone out there make formulas on the side? I have spent nearly 2 days trying to add on a stupid MA . I would rather pay someone to do this so i can make money trading. I thought this efs2 was suppose to be easier . I guess it must be my thick head. If anyone want to make a few bucks making this and some other formulas pm me .i can pay by paypal.
thanks
Comment
-
Hello watchdaride,
If you do not receive a response, you may contact one or our EFS Consultants directly.Jason K.
Project Manager
eSignal - an Interactive Data company
EFS KnowledgeBase
JavaScript for EFS Video Series
EFS Beginner Tutorial Series
EFS Glossary
Custom EFS Development Policy
New User Orientation
Comment
-
watchdaride
Actually EFS2 is easier to code but you are not using any EFS2 logic in your script.
Here is a basic version of your formula using EFS2 functions
Alex
PHP Code:function main(){
return new Array (rsi(21),sma(5,rsi(21)),sma(45,rsi(21)))
}
Comment
Comment