Does anyone have this coded as an EFS? i have seen code for Tradestation and MetaStock for this indicator and many traders that I chat with speak highly of this study. Link below - shows example code for this study available on the I-Net.
Announcement
Collapse
No announcement yet.
Polarized Fractal Efficiency
Collapse
X
-
Them guys is fast posters. Beat me to posting the link.
One note on this version: If you are familiar with PFE then you will know that the buy and sell bands set at 50 (which this EFS does) is rather arbitrary...and not recommended by the originator of the study (Han's or Al...depending on how long ago you started reading his works).
GarthGarth
Comment
-
jones24621
You need to modify the study to be able to do that. To modify the study do the following.
In the first lines of main add the following statement
if(Length==null) Length = 10;
Then to make this user defined parameter available in Edit Studies replace function main() with function main(Length)
Then look for all the instances of the value 10 in the script and replace them with Length. Also replace 9 with Length-1 in all instances of Close[9]
Once you have implemented these changes you will be able to select the length through Edit Studies (note that if the study is already loaded in the efs you need to Remove it first and then re-apply it to the chart for the changes to take effect)
Alex
Comment
-
-
Tekunda
Open your efs with the Editor and run the Syntax Check and the first error it will show is the following
line 23: ReferenceError: length is not defined
In line 23 you define the default value used for Length so it should be a number such as for example 10 as suggested in my reply to jones24621. I suspect you had initially written this correctly but then when you performed a Find and Replace 10 with Length that it got overwritten too.
Once you fix the above error run a Syntax Check again and you will find another error in line 29. Remember that JavaScript is a case sensitive language.
Once you fix that error you will get no more errors if you run the Syntax Check. However once you load the efs in a chart you will get another error. Follow the guidance provided by Formula Output Window and correct the error shown. Again as you Reload the Formula Output Window it will signal another error. Repeat the process following what the Formula Output Window is indicating until you get no more errors.
FWIW in modifying the efs you have actually followed my instructions correctly and only mis-spelled the words or used the wrong case.
If for any reason the efs should still not work post it again and I will look it over
Alex
Comment
-
Alexis, I am sorry to let you know that I tried my best (probably not good enough) but I am still getting a whole bunch of syntax errors.
Is it not possible that you post a working *.efs file here for a case like me, who apparently has his share of problems adapting efs code?Attached Files
Comment
-
Tekunda
In the efs you just posted add Length inside the brackets of function main() ie it should be function main(Length)
Also in line 29 replace
var Close = getValue("Close", 0, -10);
with
var Close = getValue("Close", 0, -Length);
I am not sure I understand why you did not use the same efs you posted earlier, anyhow once you make these changes to the efs you just posted the script will work
Alex
Comment
Comment