請(qǐng)問(wèn)是不是序列形式數(shù)值不能賦值? - TradeBlazer公式 [開拓者 TB]
- 咨詢內(nèi)容:
以下代碼 Priceh1 priceli 能輸出結(jié)果
con11 con21 con31都是全部false 而num1 Priceturnh1 Priceturn1則是全部運(yùn)算出錯(cuò)
好像問(wèn)題出在num1上
Vars
BoolSeries Con11(false);
BoolSeries Con21(false);
BoolSeries Con31(false);
NumericSeries priceturnh1;
NumericSeries priceturnl1;
NumericSeries num1;
Numeric priceh1;
Numeric pricel1;
Begin
If(!con21[1])
{
Priceh1 = HighestFC(H,30);
Pricel1 = LowestFC(L,30);
num1=num1[1]+1;
sum=num1;
PlotNumeric("n3",sum);
PlotNumeric("n1",num1[1]);
If((num1>6 || num1[1]==0) && Priceh1/Pricel1 <= 1.01)
{
Priceturnh1 = Priceh1;
Priceturnl1 = Pricel1;
con21 = True;
con11 = False;
con31 = False;
num1=0;
}
Else If((num1>6 || num1[1]==0) && Priceh1/Pricel1 > 1.01 && con11)
{
con21 == False;
con11 == True;
con31 == False;
}
Else If((num1>6 || num1[1]==0) && Priceh1/Pricel1 > 1.01 && con31)
{
con21 == False;
con11 == False;
con31 == True;
}
Else
{
con21 = con21[1];
con11 = con11[1];
con31 = con13[1];
}
}
Else
{
If(H>Priceturnh1 && L>Priceturnl1)
{
con21 == False;
con11 == True;
con31 == False;
num1=1;
}
Else If(H<Priceturnh1 && L<Priceturnl1)
{
con21 == False;
con11 == False;
con31 == True;
num1=1;
}
Else If(H<Priceturnh1 && L>Priceturnl1)
{
con21 == True;
con11 == False;
con31 == False;
num1=0;
}
Else
{
con21 == False;
con11 == False;
con31 == False;
num1=0;
}
}
End - TB技術(shù)人員:
回復(fù) 1# smoksmsm
是的,往前引用序列值是不能被賦值的。
例如以下情況是不允許的
con[1]=true;
如果以上指標(biāo)公式不適用于您常用的行情軟件
或者您想改編成選股公式,以便快速選出某種形態(tài)個(gè)股的話,
相關(guān)文章
-
沒(méi)有相關(guān)內(nèi)容