Equivalent function of Trading View's pinescript function "variance" in Amibroker AFL


Can anyone let me know what is the equivalent function for "variance" of pinescript (https://in.tradingview.com/study-script-reference/#fun_variance) in amibroker AFL? Is it STDEV in amibroker AFL?

Any pointers appreciated.


Std.Dev. is square root of Variance.
So if former is the square root of variance and since there is StDev function in AmiBroker... you can easily answer the question yourself how to get variance out of std.dev. Yes?


Thank you @fxshrat.

So Variance = StDev( Array, range) ^ 2;