相關(guān)標(biāo)簽:er模型圖范例,dnf多玩模型修改專區(qū),dnf17173補(bǔ)丁模型專區(qū),cs模型下載專區(qū),dnf鬼劍士模型專區(qū),魔獸爭(zhēng)霸模型專區(qū),dnf武器補(bǔ)丁模型專區(qū),高頻交易策略模型,怎么把a(bǔ)r模型轉(zhuǎn)換成ma,
模型策略源碼:variable:cc1=0,cc2=0; //第一個(gè)模型,大于上10周期最高價(jià)買入,低于5周期最低價(jià)平倉(cāng)。做空反之 //第二個(gè)模型,連續(xù)2根K線收陽(yáng)線買入,做空反之 //用于測(cè)試使用。如果實(shí)盤,需用專業(yè)版的后臺(tái),因?yàn)榭赡芡桓鵎線圖產(chǎn)生2個(gè)同向信號(hào) //或者信號(hào)相反時(shí)持倉(cāng)對(duì)沖的處理。 yl:=ref(hhv(h,10),1); zc:=ref(llv(l,10),1); yl1:=ref(hhv(h,5),1); zc1:=ref(llv(l,5),1); b2:=ref(c>o,1) and ref(c>o,2); s2:=ref(c<o,1) and ref(c<o,2); /////////////////////////////////////////第二個(gè)模型是開盤價(jià)觸發(fā),寫在最前面 if cc2>0 and s2 then begin cc2:=0; if holding>0 then sell(1,1,limitr,o); else buyshort(1,1,limitr,o); end if cc2<0 and b2 then begin cc2:=0; if holding<0 then sellshort(1,1,limitr,o); else buy(1,1,limitr,o); end if cc2=0 and b2 then begin cc2:=1; if holding<0 then sellshort(1,1,limitr,o); else buy(1,1,limitr,o); end if cc2=0 and s2 then begin cc2:=-1; if holding>0 then sell(1,1,limitr,o); else buyshort(1,1,limitr,o); end //////////////////////////////////////////////////////////////////////////////////////// if cc1>0 and l<zc1 then begin cc1:=0; if holding>0 then sell(1,1,limitr,min(o,zc1-mindiff)); else buyshort(1,1,limitr,min(o,zc1-mindiff)); end if cc1<0 and h>yl1 then begin cc1:=0; if holding<0 then sellshort(1,1,limitr,max(o,yl1+mindiff)); else buy(1,1,limitr,max(o,yl1+mindiff)); end if cc1=0 and h>yl then begin cc1:=1; if holding<0 then sellshort(1,1,limitr,max(o,yl+mindiff)); else buy(1,1,limitr,max(o,yl+mindiff)); end if cc1=0 and l<zc then begin cc1:=-1; if holding>0 then sell(1,1,limitr,min(o,zc-mindiff)); else buyshort(1,1,limitr,min(o,zc-mindiff)); end 點(diǎn)擊復(fù)制上述代碼粘貼到到公式管理器
{別忘了將本網(wǎng)告訴您身邊的朋友,向朋友傳達(dá)有用資料,也是一種人情,你朋友會(huì)感謝你的。}