Posted By: gtell
SETSERIES - 04/21/17 06:40
Dear all,
Dear jcl,
I am looking at the indicators.c just to see how to write indicators and found you often have use SETSERIES.
For example:
I have tried to search in the help but I could not find it.
Could you please explain me what is the meaning of this function?
Thanks.
Best regards.
Dear jcl,
I am looking at the indicators.c just to see how to write indicators and found you often have use SETSERIES.
For example:
Code:
// ALMA, Arnaud Legoux Moving Average // © 2013 acidburn @ Zorro Trader Forum var ALMA(var *Data, int Period, int sigma, var offset) { checkLookBack(Period); if(sigma == 0) sigma = 6; if(offset == 0.) offset = 0.85; Period = Max(Period,2); var m = floor(offset * (Period - 1)); var s = Period / sigma; var alma = 0., wSum = 0.; int i; for (i = 0; i < Period; i++) { var w = exp(-((i - m) * (i - m)) / (2 * s * s)); alma += Data[Period - 1 - i] * w; wSum += w; } SETSERIES(Data,Period); return alma / wSum; }
I have tried to search in the help but I could not find it.
Could you please explain me what is the meaning of this function?
Thanks.
Best regards.