請(qǐng)幫忙把金字塔的唐奇安通道代碼改成文華,謝謝 [文華財(cái)經(jīng)]
- 咨詢內(nèi)容:
請(qǐng)幫忙把金字塔的唐奇安通道代碼改成文華,謝謝
//中間變量
INPUT:X(20,1,100,1),NMIN(10,1,100,1),SS(1,1,10000,1);
X周期高點(diǎn):=REF(HHV(H,X),1);//X是參數(shù),自行調(diào)整
X周期低點(diǎn):=REF(LLV(L,X),1);
手?jǐn)?shù):=SS;
開(kāi)倉(cāng)時(shí)間:=TIME>OPENTIME(1) AND TIME<CLOSETIME(0)-NMIN*100;
平倉(cāng)時(shí)間:=TIME>=CLOSETIME(0)-NMIN*100;
{NMIN為參數(shù),CLOSETIME(0)-NMIN*100表示 收盤(pán)時(shí)間-提前N分鐘 N由NMIN控制}
//交易條件:
開(kāi)多平空條件:=High>=X周期高點(diǎn) and 開(kāi)倉(cāng)時(shí)間 and holding<=0;
開(kāi)空平多條件:=Low<=X周期低點(diǎn) and 開(kāi)倉(cāng)時(shí)間 and holding>=0;//交易系統(tǒng)
收盤(pán)平多:sell(平倉(cāng)時(shí)間 and holding>0, 0, thisclose);
收盤(pán)平空:sellshort(平倉(cāng)時(shí)間 and holding<0,0,thisclose);平空:sellshort(開(kāi)多平空條件 and holding<0, 手?jǐn)?shù),limitr,X周期高點(diǎn));
平多:sell(開(kāi)空平多條件 and holding>0,手?jǐn)?shù),limitr,X周期低點(diǎn));
開(kāi)空:buyshort(開(kāi)空平多條件 and holding=0,手?jǐn)?shù),limitr,X周期低點(diǎn));
開(kāi)多:buy(開(kāi)多平空條件 and holding=0, 手?jǐn)?shù),limitr,X周期高點(diǎn));當(dāng)前持倉(cāng):HOLDING,COLORGRAY,LINETHICK0;
//當(dāng)前資產(chǎn):ASSET,NOAXIS,COLORGRAY;//輸出當(dāng)前資產(chǎn),但不影響坐標(biāo)最高最低值 - 文華技術(shù)人員:
改寫(xiě)需要時(shí)間,改寫(xiě)好后給您及時(shí)回復(fù)
- 文華客服:
我等
- 網(wǎng)友回復(fù):
HH:HV(H,20); LL:LV(L,20); H>HH&&CLOSEMINUTE>10,BPK; L<LL&&CLOSEMINUTE>10,SPK; CLOSEMINUTE<=10,CLOSEOUT; AUTOFILTER;
模型僅供參考 - 網(wǎng)友回復(fù):
請(qǐng)?jiān)俑囊粋€(gè)金子塔到文華模型。input:n(13,1,20,1);
input:m(70,-200,200,1);
tn:=1;
r1:=barslast(day-ref(day,1)<>0);
r5:ref(o,r1)+0.1*m;
r6:r5+n;
r7:r5-n;
FF:cross(h,r6);
GG:cross(r7,l);
JJ:cross(r5,l);
DD:cross(h,r5);
if time>091500 and time<150000 thenbeginif FF thenbeginbuy(holding=0,tn,limitr,r6);endif GG thenbeginbuyshort(holding=0,tn,limitr,r7);endif holding>0 and JJ thenbeginsell(1,0,limitr,r5);
endif holding<0 and DD thenbeginsellshort(1,0,limitr,r5);
endend//收盤(pán)前清倉(cāng)if time>=151000 thenbeginsellshort(holding<0,0,thisclose);
sell(holding>0,0,thisclose);end
持倉(cāng):holding,colorwhite,linethick0;
交易總數(shù):totaltrade,colorwhite,linethick0;
盈虧:asset-1000000,noaxis,colorred,linethick1;
有思路,想編寫(xiě)各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 1145508240 進(jìn)行 有償 編寫(xiě)!(不貴!點(diǎn)擊查看價(jià)格!)
相關(guān)文章
-
沒(méi)有相關(guān)內(nèi)容