想寫個(gè) 突破第一次開(kāi)倉(cāng)后的高點(diǎn)再加倉(cāng),但是圖標(biāo)上沒(méi)顯示 - TradeBlazer公式 [開(kāi)拓者 TB]
- 咨詢內(nèi)容:
請(qǐng)大神們幫忙看下,
想寫個(gè) 突破第一次開(kāi)倉(cāng)后的高點(diǎn)再加倉(cāng),但是圖標(biāo)上沒(méi)顯示
謝謝
Params
numeric length1(20);
numeric atrlength(20);
numeric mindiff(0);
Numeric lots(1);
Numeric trailstop(1.5);
Vars
NumericSeries hhv;
NumericSeries llv;
numericseries atrvalue;
Numeric tmindiff;
NumericSeries hiafterentry;
NumericSeries loafterentry;
Begin
hhv=Highest(high,length1);
llv=Lowest(low,length1);
atrvalue=AvgTrueRange(atrlength);
tmindiff=mindiff*MinMove*PriceScale;
if(MarketPosition<>1 And high>=hhv[1])
{
Buy(lots,Max(open,hhv[1])+tmindiff);
}
if(marketposition<>-1 and low<=llv[1])
{
SellShort(lots,Min(low,llv[1])-tmindiff);
}
if(marketposition==1 and barssinceentry==0)
hiafterentry=high;
if (marketposition==1 and barssinceentry>=1)
hiafterentry=Max(high,hiafterentry);
if (marketposition==-1 and BarsSinceEntry==0);
loafterentry=low;
if (marketposition==-1 and BarsSinceEntry>=1)
loafterentry=Min(low,loafterentry);
if (marketposition==1 and barssinceentry>=1 and high>=hiafterentry[1])
{
buy(lots,max(open,hiafterentry)+tmindiff);
}
if (marketposition==-1 and barssinceentry>=1 and low<=loafterentry[1])
{
sellshort(lots,min(open,loafterentry)-tmindiff);
}
End - TB技術(shù)人員: 別說(shuō)LZ限制了加倉(cāng)次數(shù)啊,,,,在交易設(shè)置里面
有思路,想編寫各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 262069696 進(jìn)行 有償 編寫!(不貴!點(diǎn)擊查看價(jià)格!)
相關(guān)文章
-
指定的模型還沒(méi)有相關(guān)內(nèi)容!