How to add a second moving average to the attached efs file???
Announcement
Collapse
No announcement yet.
Adding moving averages to indicator pane
Collapse
X
-
bdeflorio
The first thing you need to do is to declare a global variable called for example vMAofCCI2 and set that to null (as an example see line 9 of the efs).
Once you have done that add the following after line 61
PHP Code:if (vMAofCCI2 == null) vMAofCCI2 = new MAStudy(10, 0, vCCI, MAStudy.MA, MAStudy.SIMPLE);
Lastly replace the return statement with the following
PHP Code:return new Array (vCCI.getValue(CCIStudy.CCI), vCCI.getValue(CCIStudy.CCI),
vMAofCCI.getValue(MAStudy.MA), vMAofCCI2.getValue(MAStudy.MA));
For information on the preMain statements and on the Function Parameters you may want to review the Tutorials which are available in the EFS KnowledgeBase. Also in the KB and worthwhile reading is the Guide to Developing EFS Indicators.
If instead you are not interested in learning how to program and just need to have this study written for you then you may want to see the FAQ: How can I get my custom study built?
Alex
Comment