遇到自帶海龜公式中的一個(gè)問題 [開拓者 TB]
- 咨詢內(nèi)容:
Params
Numeric bolength(20);
Numeric Telength(10);
Vars
Numeric MinPoint;
NumericSeries DonchianHi;
NumericSeries DonchianLo;
Numeric myEntryPrice;
Numeric myExitPrice;
NumericSeries ExitHighestPrice;
NumericSeries ExitLowestPrice;
Begin
MinPoint = MinMove*PriceScale;
donchianhi =HighestFC(High[1],bolength);
DonchianLo = LowestFC(low[1],bolength);
ExitHighestPrice = HighestFC(High[1],Telength);
ExitLowestPrice = LowestFC(low[1],Telength);
If(marketposition == 0)
{
Commentary("donchianhi="+Text(donchianHi));
If(High > donchianHi)
{
myEntryPrice = donchianhi + MinPoint ;
myEntryPrice = IIF(myEntryPrice < Open,Open,myEntryPrice);
Buy(1,myEntryPrice);
}
}
If(marketposition == 1)
{
Commentary("ExitLowestPrice="+Text(ExitLowestPrice));
If(Low<ExitLowestPrice)
{
myEntryPrice = ExitLowestPrice - MinPoint;
myEntryPrice = IIF(myEntryPrice > Open,Open,myEntryPrice);
Sell(1,myExitPrice);
}
}
End
這個(gè)是海龜法則例子中的一部分,其中平多的位置應(yīng)該是ExitLowestPrice - MinPoint 或跳空的open,可是為啥都是平倉點(diǎn)在收盤價(jià)
ps:開倉以及空單開倉平倉沒有問題 - TB技術(shù)人員:
你這個(gè)是自帶海龜系統(tǒng)里面的代碼嗎?我的怎么和你的不一樣。
你去公式管理器打開TurtleTrader,再看一看
有思路,想編寫各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 1145508240 進(jìn)行 有償 編寫!(不貴!點(diǎn)擊查看價(jià)格!)
相關(guān)文章
-
沒有相關(guān)內(nèi)容