TraderBlazer開(kāi)發(fā)指南的例子,最終文件編譯錯(cuò)誤 [開(kāi)拓者 TB]
- 咨詢(xún)內(nèi)容:
錯(cuò)誤代碼很多:error C2143 error 2146 error 2001 error 2017.......
書(shū)上原碼如下:
//------------------------------------------------------------------------
// 簡(jiǎn)稱(chēng): Tick
// 名稱(chēng): Tick
// 類(lèi)別: 公式應(yīng)用
// 類(lèi)型: 用戶(hù)應(yīng)用
// 輸出:
//------------------------------------------------------------------------
Vars
NumericSeries TickCnt;
Numeric bartime;
Begin
bartime = GetGlobalVar(0);
If(bartime == InvalidNumeric)//bar時(shí)間初始化
{
bartime = 0;
SetGlobalVar(0,bartime);
TickCnt = 1;
SetGlobalVar(1,TickCnt);
FileAppend("d:\\Sample_13.txt","Bartime = " + DateTimeToString(date + time) + "
Global(0) = " + Text(bartime) + "\t Global(1) = " + Text(TickCnt));
}
If(Date + Time > bartime)//新的日期時(shí)間,計(jì)數(shù)器重新置1
{
bartime = Date + Time;
SetGlobalVar(0,bartime);
TickCnt = 1;
SetGlobalVar(1,TickCnt);
FileAppend("d:\\Sample_13.txt","Bartime = " + DateTimeToString(date + time) + "\t 新K線產(chǎn)
生, Global(0) = " + DateTimeToString(bartime) + "\t Global(1) = " + Text(TickCnt));
}Else If(Date + Time == bartime)//相同日期時(shí)間,計(jì)數(shù)器+1,并保存回全局變量
{
TickCnt = GetGlobalVar(1) + 1;
SetGlobalVar(1,TickCnt);
FileAppend("d:\\Sample_13.txt","Bartime = " + DateTimeToString(date + time) + "\t 原K線增
加計(jì)數(shù),Global(0) = " + DateTimeToString(bartime) + "\t Global(1) = " + Text(TickCnt));
}
Commentary("TickCnt = " + Text(TickCnt));
End
//------------------------------------------------------------------------
// 編譯版本 GS2010.12.08
// 用戶(hù)版本 2013/11/18 02:01
// 版權(quán)所有 lam888888908
// 更改聲明 TradeBlazer Software保留對(duì)TradeBlazer平臺(tái)
// 每一版本的TrabeBlazer公式修改和重寫(xiě)的權(quán)利
//------------------------------------------------------------------------ - TB技術(shù)人員: 現(xiàn)在知道了嗎?哈喇
有思路,想編寫(xiě)各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 1145508240 進(jìn)行 有償 編寫(xiě)!(不貴!點(diǎn)擊查看價(jià)格!)
相關(guān)文章
-
沒(méi)有相關(guān)內(nèi)容