怎么捕捉開盤30分鐘的高點和低點? [MC]
-
MC用戶求助:
var: max_open(0), min_open(0), mp(0);
if time>=900 and time<=930 then begin
if high>value1 then value1=high;
if value2>low or value2=0 then value2=low;
end
else if time[1]>=900 and time[1]<=930 then begin
max_open=value1;
min_open=value2;
value1=0;
value2=0;
end;
mp=marketposition;
if time>930 and time<2130 and mp=0 then begin
buy next bar at max_open stop;
sellshort next bar at min_open stop;
end;
以上是幫您調整的代碼,當時間在9:30到21:30之間時,以開盤30分鐘的最高價發送停損買單,以開盤30分鐘的最低價發送停損賣單。
一、關于買賣語句的使用,看一下這個帖子http://forums.icetech.com.cn/for ... 3125&extra=page%3D6
二、close>value1或者close<vvalue2返回的是布爾值,您將它用于計算委托單價格,編譯沒有問題,但是價格就是0或者1?
-
MC回復討論一:
var: max_open(0), min_open(0), mp(0);
if time>=900 and time<=930 then begin
if high>value1 then value1=high;
if value2>low or value2=0 then value2=low;
end
else if time[1]>=900 and time[1]<=930 then begin
max_open=value1;
min_open=value2;
value1=0;
value2=0;
end;
mp=marketposition;
if time>930 and time<2130 and mp=0 then begin
buy next bar at max_open stop;
sellshort next bar at min_open stop;
end;
以上是幫您調整的代碼,當時間在9:30到21:30之間時,以開盤30分鐘的最高價發送停損買單,以開盤30分鐘的最低價發送停損賣單。
一、關于買賣語句的使用,看一下這個帖子http://forums.icetech.com.cn/for ... 3125&extra=page%3D6
二、close>value1或者close<vvalue2返回的是布爾值,您將它用于計算委托單價格,編譯沒有問題,但是價格就是0或者1
有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友
可聯系技術人員 QQ: 511411198 進行 有償 編寫!(不貴!點擊查看價格!)
相關文章
-
沒有相關內容