Like the BollingerStudy function referenced earlier in this thread, the getValue function [not to be confused with the similarly named getValue method of the series object] is a legacy function and only accepts specific inputs. sPriceSource is not a valid input within the context of your script hence the error. See this article in the EFS KnowledgeBase for information regarding the function and this article regarding the method
As to your latest script to resolve the error you need to
- remove or comment out lines 45, 46 and 47
- replace in the for loop every instance of aSource[i] with nrg.getValue(-i)
I am not sure I understand why you would use yet another script [which still makes use of legacy functions anyhow] rather than fixing your previous script with the suggested changes. Irrespective once you implement the simple changes I suggested in this case this formula will also work.
Alex
Originally posted by maninjapan
View Post
Leave a comment: