自編一個(gè)實(shí)現(xiàn)顯示分鐘線周期k線走完剩余時(shí)間的指標(biāo),顯示不正確,請(qǐng)版主幫助修正一下 [開拓者 TB]
- 咨詢內(nèi)容:
Vars
NumericSeries extm;
NumericSeries retm;
NumericSeries totm;
Begin
If(bartype()<>1)
Return;
If(Time()==0.1510 and BarType()==1 and BarInterval()==10)
totm=5*60;
Else
totm=BarInterval()*60;
If(BarStatus()==2 and Time()>=0.0900 and Time()<=0.1129 or BarStatus()==2 and Time()>=0.1300 and Time()<=0.1514)
{
retm=totm-TimeDiff(Time(),CurrentTime());
PlotString("Retm",text(retm),0);
}
Else
Return;
End - TB技術(shù)人員: 能應(yīng)用在股指上就行,我的思路是定義該周期的總共時(shí)間秒數(shù)totm,然后減去當(dāng)前時(shí)間和k線時(shí)間標(biāo)記time差值得到剩余時(shí)間,轉(zhuǎn)化字符并顯示。 Time()>=0.0900 and Time()<=0.1129和Time()>=0.1300 and Time()<=0.1514主要是想界定交易時(shí)間和非交易時(shí)間,有沒有一個(gè)函數(shù)可以直接返回開市交易狀態(tài)的,有這樣的函數(shù)更方便一些。
有思路,想編寫各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 1145508240 進(jìn)行 有償 編寫!(不貴!點(diǎn)擊查看價(jià)格!)
相關(guān)文章
-
沒有相關(guān)內(nèi)容