如果以5分K來設定,在加權開盤後5分鐘(0905),跟前日收盤價比對,如果在0905之後收高超過前日收盤價就買進,反則賣出。
以下寫法不確定哪邊有問題,一直無法編譯成功
//前日收盤價
if Value1=GetField("close", "D")[1];
//當日0905收盤價
if time = 090500 then begin value2 = close;
condition1=Value2>Value1;
condition2=Value2<Value1;
//買進訊號
if condition1 and close cross over value2 then ret = 1;
//賣出訊號
if condition2 and close cross below value1 then ret = 1;
4 評論