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