inputs:VL(20) vars : intrabarpersist TUpVol(0),intrabarpersist TDVol(0), intrabarpersist TUpTicks(0),intrabarpersist TDownTicks(0), intrabarpersist TPreTime_s(0),intrabarpersist TTime_s(0), TColor(0);
if LastBarOnChart_s then begin TPreTime_s=TTime_s; TTimes_s=BarNumber;
if TPreTime_s<>TTime_s then begin TUVol=0; TDVol=0; end;
if UpTicks - TUpTicks >= VL then TUVol=TUVol+UpTicks-TUpTicks; if DownTicks -TDownTicks >= VL then TDVol=TDVol+DownTicks-TDownTicks; if TUVol > TDVol then TColor = Red else TColor = green ; TUpTicks=UpTicks; TDownTicks = DownTicks; end;
Plot1(TUVol-TDVol,"",TColor);
請問您的問題是??
無法編譯....
想把每筆20口以上獨立 做指標觀察...卻無法編譯
缺紅字處,這應該算是最基本的錯誤,以後請多檢查,或看一下編譯時的訊息及游標停留的錯誤在那裡
inputs:VL(20) ; vars : intrabarpersist TUpVol(0),intrabarpersist TDVol(0), intrabarpersist TUpTicks(0),intrabarpersist TDownTicks(0), intrabarpersist TPreTime_s(0),intrabarpersist TTime_s(0), intrabarpersist TTimes_s(0), intrabarpersist TUVol(0), TColor(0); if LastBarOnChart_s then begin TPreTime_s=TTime_s; TTimes_s=BarNumber;
if TPreTime_s<>TTime_s then begin TUVol=0; TDVol=0; end; if UpTicks - TUpTicks >= VL then TUVol=TUVol+UpTicks-TUpTicks; if DownTicks -TDownTicks >= VL then TDVol=TDVol+DownTicks-TDownTicks; if TUVol > TDVol then TColor = Red else TColor = green ; TUpTicks=UpTicks; TDownTicks = DownTicks; end; Plot1(TUVol-TDVol,"",TColor);
感謝~~ 終於找出問題點了^_^
非常感謝唷!!!
請教一下,這個程式是否只能用於即時盤和playback功能中呢?
另外,如果要以每天的8:45開始重新計算累積的資料,並要一次看連續好幾天的資料,
它是 TICK級的運作,所以只能在特定情況下使用
OK。那如果要以每天的8:45開始重新計算累積的資料,並要一次看連續好幾天的資料,
累績的部份只能當天開始累績
過去的值只能使用重播功能去跑出來看
但是進入交易模式時,它又會把過去的資料清掉,從今天開始累績
你試看看細步回測的功能,但是它只對訊號程式有效,對指標無效
"但是進入交易模式時,它又會把過去的資料清掉,從今天開始累積"
請問是什麼原理,讓它每天會自動重新累積呢?
是因為用到intrabarpersist指令造成的嗎?
感謝
因為指標的回測沒有細步回測功能
指標的歷史值只有K棒的開高低收