中文VAR2:=SMA(ABS(LOW -VAR1),13,1)/SMA(MAX(LOW-VAR1 ‚0), 10,1);
时间: 2023-05-31 12:02:55 浏览: 112
这是一个计算指标的公式,具体意义如下:
VAR2 = ABS(LOW - VAR1)的13日简单移动平均 / (LOW - VAR1的最大值和0的差的10日简单移动平均)
其中,LOW是指股票或指数的最低价,VAR1是另一个变量,可以是任何数字。ABS表示取绝对值,MAX表示取最大值,SMA表示简单移动平均。这个公式可以用于技术分析中,帮助投资者判断趋势和价格走势。
相关问题
VAR2:=SMA(ABS(LOW-VAR1),13,1)/SMA(MAX(LOW-VAR1,0),10,1);
This formula calculates the Volatility Ratio (VAR2) using the Simple Moving Average (SMA) of the absolute difference between the Low Price and a reference value (VAR1) divided by the SMA of the maximum difference between the Low Price and VAR1 and 0.
The calculation steps are as follows:
1. ABS(LOW-VAR1): Calculates the absolute difference between the Low Price and VAR1.
2. SMA(ABS(LOW-VAR1),13,1): Calculates the 13-period SMA of the absolute difference.
3. LOW-VAR1: Calculates the difference between the Low Price and VAR1.
4. MAX(LOW-VAR1,0): Calculates the maximum difference between the Low Price and VAR1 and 0.
5. SMA(MAX(LOW-VAR1,0),10,1): Calculates the 10-period SMA of the maximum difference.
6. VAR2:=SMA(ABS(LOW-VAR1),13,1)/SMA(MAX(LOW-VAR1,0),10,1): Divides the SMA of the absolute difference by the SMA of the maximum difference to obtain the Volatility Ratio (VAR2).
var1:=ref((low+open+close+high)/4,1); var2:=sma(abs(low-var1),13,1)/sma(max(
var1 在这段代码中是一个变量,使用 ref() 函数计算得到。ref() 函数的参数为 (low open close high)/4,表示使用最低价、开盘价、收盘价和最高价的平均值。
var2 在这段代码中也是一个变量,使用了两个函数来计算。首先使用了 abs() 函数来求得最低价和 var1 的绝对值,然后使用了 sma() 函数来计算这个绝对值的简单移动平均值。sma() 函数的参数为 abs(low-var1),表示用最低价和 var1 的差的绝对值作为计算的数据。13 表示计算 13 个周期的简单移动平均值。1 表示从第 2 个周期开始计算。
接着又使用了 sma() 函数来计算 max() 函数的返回值的简单移动平均值。max() 函数的参数是一个空的参数列表,表示不需要输入任何值。max() 函数的作用是返回一组数值中的最大值。在这里,由于没有传入数值,所以返回的最大值就是一个空值。然后将这个空值作为 sma() 函数的参数,表示计算这个空值的简单移动平均值。
综上所述,这段代码的主要作用是计算出 var1 和 var2 两个变量的值。var1 是最低价、开盘价、收盘价和最高价的平均值,var2 是最低价和 var1 的差的绝对值的简单移动平均值与一个空值的简单移动平均值。