自編一個實現顯示分鐘線周期k線走完剩余時間的指標,顯示不正確,請版主幫助修正一下 [開拓者 TB]
- 咨詢內容:
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技術人員: 能應用在股指上就行,我的思路是定義該周期的總共時間秒數totm,然后減去當前時間和k線時間標記time差值得到剩余時間,轉化字符并顯示。 Time()>=0.0900 and Time()<=0.1129和Time()>=0.1300 and Time()<=0.1514主要是想界定交易時間和非交易時間,有沒有一個函數可以直接返回開市交易狀態的,有這樣的函數更方便一些。
有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友
可聯系技術人員 QQ: 1145508240 進行 有償 編寫!(不貴!點擊查看價格!)
相關文章
-
沒有相關內容