請問為何圖表上沒有開平倉信號?
作者:金字塔 來源:cxh99.com 發布時間:2016年10月21日
- 咨詢內容:
我把系統雙擊應用于圖表,但是圖表沒有顯示開平倉信號,請問是怎么回事?謝謝!以下是代碼和圖表:
//函數定義a1:=valuewhen(todaybar=1,high);a2:=valuewhen(todaybar=1,low);a3:=time>=020000;a4:=time<230000;a5:=a3 and a4;a6:=time>=002300;
//做多條件if holding=0 and a5 and close>a1 then beginbuy(1,1,marketr);end
//平多條件if holding>0 and close<a2then beginsell(1,0,marketr);end
//做空條件if holding=0 and a5 and close<a2then beginbuyshort(1,1,marketr);end
//平空條件if holding<0 and close>a1then beginsellshort(1,0,marketr);end
//收盤平倉if a6 and holding>0then beginsell(1,0,marketr);end
if a6 and holding<0then beginsellshort(1,0,marketr);end
此主題相關圖片如下:沒有開平倉信號.jpg
- 金字塔客服:
這邊是有信號的, 全是信號
用戶代碼是不是用的不是上面給的?用下面的代碼呢?
a1:=valuewhen(todaybar=1,high);
a2:=valuewhen(todaybar=1,low);
a3:=time>=020000;
a4:=time<230000;
a5:=a3 and a4;
a6:=time>=002300;
//做多條件
if holding=0 and a5 and close>a1
then begin
buy(1,1,marketr);
end
//平多條件
if holding>0 and close<a2
then begin
sell(1,0,marketr);
end
//做空條件
if holding=0 and a5 and close<a2
then begin
buyshort(1,1,marketr);
end
//平空條件
if holding<0 and close>a1
then begin
sellshort(1,0,marketr);
end
//收盤平倉
if a6 and holding>0
then begin
sell(1,0,marketr);
end
if a6 and holding<0
then begin
sellshort(1,0,marketr);
end
- 用戶回復:
1.用戶代碼是不是用的不是上面給的?代碼是我自己寫的,用的就是貼出來的代碼;
2.用下面的代碼呢?我復制了您的代碼,應用于圖標,居然全是信號;我對比了我的代碼和您的代碼,我沒看到有什么區別啊,為什么我用自己原來的代碼不行,用你的就可以呢?
- 網友回復:
你代碼沒編譯或者用錯代碼之類的
- 網友回復:
我復制了您的代碼,應用于圖標,居然全是信號;我對比了我的代碼和您的代碼,我沒看到有什么區別啊,為什么我用自己原來的代碼不行,用你的就可以呢?
|