請教老師一個語句怎么表達(dá)
作者:金字塔 來源:cxh99.com 發(fā)布時間:2017年04月06日
- 咨詢內(nèi)容:
請問如何表達(dá):當(dāng)時間大于10:30后到收盤的任意時間中,股價大于10:30之前的最高價并且漲幅大于3%,就買入。 是模擬交易的語法。
請問老師這個如何寫
- 金字塔客服:
hh:=valuewhen(time=103000,hhv(h,todaybar));
zf:=(hhv(h,todaybar)-ref(c,1))/ref(c,1);
if time>103000 and zf>0.03 and h>hh then buy(holding=0,100,market);