編了個(gè)公式,編譯時(shí)總說(shuō)我第7行缺少個(gè)分號(hào)? 不懂 明明有分號(hào)的,求正解 [開(kāi)拓者 TB]
- 咨詢內(nèi)容:
Params
Numeric Length(35);
Numeric StdDevUp(2.0);
Numeric StdDevDn(-2.0);
Numeric Lots(1);
Vars
NumericSeries UpperBand; //上軌
NumericSeries LowerBand; //下軌
NumericSeries AveMa; //均線
Numeric StdValue; //標(biāo)準(zhǔn)偏差?
Begin
AveMa=AverageFC(Close[1],Length);
StdValue = StandardDev(Close[1],Length);
UpperBand=Avema+StdDevUp*StdValue;
LowerBand=Avema-StdDevUp*StdValue;
PlotNumeric("LowerBand",LowerBand);
PlotNumeric("AveMa",AveMa);
If(MarketPosition!=1 && CrossOver(Close[1],UpperBand[1]))
{ Buy(Lots,Open);
}
If(MarketPosition!=-1 &&CrossUnder(Close[1],LowerBand[1]))
{
SellShort(Lots,Open);
}
If(MarketPosition==1 && Close[1]<AveMa[1])
{ Sell(Lots,Open);
}
If(MarketPosition==-1 && Close[1]>AveMa[1])
{ BuyToCover(Lots,Open);
}
return Numeric;
End
- TB技術(shù)人員:
乍一看沒(méi)少分號(hào),不曉得你是不是輸入的中文分號(hào)了
不過(guò)你倒數(shù)第二句return Numeric;是想做啥啊?
有思路,想編寫(xiě)各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 1145508240 進(jìn)行 有償 編寫(xiě)!(不貴!點(diǎn)擊查看價(jià)格!)
相關(guān)文章
-
沒(méi)有相關(guān)內(nèi)容