請幫忙把金字塔的唐奇安通道代碼改成文華,謝謝 [文華財經]
- 咨詢內容:
請幫忙把金字塔的唐奇安通道代碼改成文華,謝謝
//中間變量
INPUT:X(20,1,100,1),NMIN(10,1,100,1),SS(1,1,10000,1);
X周期高點:=REF(HHV(H,X),1);//X是參數,自行調整
X周期低點:=REF(LLV(L,X),1);
手數:=SS;
開倉時間:=TIME>OPENTIME(1) AND TIME<CLOSETIME(0)-NMIN*100;
平倉時間:=TIME>=CLOSETIME(0)-NMIN*100;
{NMIN為參數,CLOSETIME(0)-NMIN*100表示 收盤時間-提前N分鐘 N由NMIN控制}
//交易條件:
開多平空條件:=High>=X周期高點 and 開倉時間 and holding<=0;
開空平多條件:=Low<=X周期低點 and 開倉時間 and holding>=0;//交易系統
收盤平多:sell(平倉時間 and holding>0, 0, thisclose);
收盤平空:sellshort(平倉時間 and holding<0,0,thisclose);平空:sellshort(開多平空條件 and holding<0, 手數,limitr,X周期高點);
平多:sell(開空平多條件 and holding>0,手數,limitr,X周期低點);
開空:buyshort(開空平多條件 and holding=0,手數,limitr,X周期低點);
開多:buy(開多平空條件 and holding=0, 手數,limitr,X周期高點);當前持倉:HOLDING,COLORGRAY,LINETHICK0;
//當前資產:ASSET,NOAXIS,COLORGRAY;//輸出當前資產,但不影響坐標最高最低值 - 文華技術人員:
改寫需要時間,改寫好后給您及時回復
- 文華客服:
我等
- 網友回復:
HH:HV(H,20); LL:LV(L,20); H>HH&&CLOSEMINUTE>10,BPK; L<LL&&CLOSEMINUTE>10,SPK; CLOSEMINUTE<=10,CLOSEOUT; AUTOFILTER;
模型僅供參考 - 網友回復:
請再改一個金子塔到文華模型。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//收盤前清倉if time>=151000 thenbeginsellshort(holding<0,0,thisclose);
sell(holding>0,0,thisclose);end
持倉:holding,colorwhite,linethick0;
交易總數:totaltrade,colorwhite,linethick0;
盈虧:asset-1000000,noaxis,colorred,linethick1;
有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友
可聯系技術人員 QQ: 1145508240 進行 有償 編寫!(不貴!點擊查看價格!)
相關文章
-
沒有相關內容