|
Post by wealthwise on May 22, 2016 13:34:12 GMT
Dear AFL Experts,
The Calculation of Correlation() has below logic:
function Correlation( x, y, period ) { nom= MA( x * y, period ) - MA( x, period ) * MA( y, period ); denom = sqrt( MA( x ^ 2, period ) - MA( x, period ) ^ 2 ) * sqrt( MA( y ^ 2, period ) - MA( y, period ) ^ 2 ); return nom/denom; }
Note: X and Y are array1 and array2. period is not an array but a static number.
The issue I am facing is, I need to pass the parameter "Period" Dynamically and not Static Period. I have an array called "period".
But above function only accepts a period as a static value and not array.
Any one can help me with hacking this? It's lot more challanging for my AFL skills yet.
|
|
fxshrat
Private Group
Posts: 566
Received Likes: 211
|
Post by fxshrat on May 22, 2016 14:39:54 GMT
|
|
|
Post by wealthwise on May 22, 2016 14:45:07 GMT
I got my Answer. Thank you very much fxshrat for replying.
|
|
fxshrat
Private Group
Posts: 566
Received Likes: 211
|
Post by fxshrat on May 22, 2016 15:10:57 GMT
|
|
fxshrat
Private Group
Posts: 566
Received Likes: 211
|
Post by fxshrat on May 22, 2016 15:40:55 GMT
|
|
|
Post by wealthwise on May 23, 2016 11:45:25 GMT
Asking a qts in one forum is no guarantee that members in that forum will be able to or be even interested in that qts to answer. Asking in two forums increases the probabilities of getting an answer (pretty much what we do in investing world, always adding to the odds or probabilities). Also, it's no waste of anyone's time, If one is interested in the qts, hence will reply else they will just move on.
Please make a note, I did clearly mention that I got an Answer as a comment. That means the poster is now aware not to answer it anymore.
|
|
fxshrat
Private Group
Posts: 566
Received Likes: 211
|
Post by fxshrat on May 23, 2016 12:01:16 GMT
Asking a qts in one forum is no guarantee that members in that forum will be able to or be even interested in that qts to answer. Asking in two forums increases the probabilities of getting an answer (pretty much what we do in investing world, always adding to the odds or probabilities). Also, it's no waste of anyone's time, If one is interested in the qts, hence will reply else they will just move on. Please make a note, I did clearly mention that I got an Answer as a comment. That means the poster is now aware not to answer it anymore. Members of one forum don't know that you are asking the same question at the same time in another forum. And it is quite often to be seen that people using similar tactics don't actually re-post in any forum (they posted their question) when they got the solution! They just disappear then. You would not define that as a highly selfish attitude, would you. I even call that moronic. Also it is quite impertinent to look for a solution but just posting "I got an answer". What answer? Seriously, I just can't stop shaking my head.
|
|