請問為何圖表上沒有開平倉信號? [金字塔]
- 咨詢內(nèi)容:
我把系統(tǒng)雙擊應(yīng)用于圖表,但是圖表沒有顯示開平倉信號,請問是怎么回事?謝謝!以下是代碼和圖表:
//函數(shù)定義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
此主題相關(guān)圖片如下:沒有開平倉信號.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 - 用戶回復(fù):
1.用戶代碼是不是用的不是上面給的?代碼是我自己寫的,用的就是貼出來的代碼;
2.用下面的代碼呢?我復(fù)制了您的代碼,應(yīng)用于圖標(biāo),居然全是信號;我對比了我的代碼和您的代碼,我沒看到有什么區(qū)別啊,為什么我用自己原來的代碼不行,用你的就可以呢? - 網(wǎng)友回復(fù):
你代碼沒編譯或者用錯代碼之類的
- 網(wǎng)友回復(fù):
我復(fù)制了您的代碼,應(yīng)用于圖標(biāo),居然全是信號;我對比了我的代碼和您的代碼,我沒看到有什么區(qū)別啊,為什么我用自己原來的代碼不行,用你的就可以呢?
有思路,想編寫各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 511411198 進行 有償 編寫!(不貴!點擊查看價格!)
相關(guān)文章
-
沒有相關(guān)內(nèi)容