同一根BAR多空轉(zhuǎn)換時(shí)出問題 [開拓者 TB]
- 咨詢內(nèi)容:
0.png (12.01 KB, 下載次數(shù): 0) 2017-2-2 17:18:53 上傳 - TB技術(shù)人員:
If(MarketPosition<>1 and High >= DispTop[1])
{
Buy(0,Max(Open,DispTop[1]));
}
if(MarketPosition<>-1 and l <= dispbottom[1])
{
SellShort(0,min(o,dispbottom[1]));
}
If(MarketPosition == 1 and BarsSinceEntry > 0)
{
If(Low <= DispBottom[1])
{
Sell(0,Min(Open,DispBottom[1]));
}
}
if(marketposition == -1 and barssinceentry>0)
{
if(h >= disptop[1])
{
BuyToCover(0,max(o,disptop[1]));
}
}
End - TB客服:
好像是因?yàn)楹喜⒑驜arsSinceEntry不等于0了,那怎么去解決這個(gè)問題?
- 網(wǎng)友回復(fù):
If(MarketPosition<>1 and High >= DispTop[1])
{
Buy(0,Max(Open,DispTop[1]));
barssinceentryl=CurrentBar;
}
if(MarketPosition<>-1 and l <= dispbottom[1])
{
SellShort(0,min(o,dispbottom[1]));
BarsSinceEntrys=CurrentBar;
}
If(MarketPosition == 1 and BarsSinceEntryl<>CurrentBar)
{
If(Low <= DispBottom[1])
{
Sell(0,Min(Open,DispBottom[1]));
}
}
if(marketposition == -1 and BarsSinceEntrys<>CurrentBar)
{
if(h >= disptop[1])
{
BuyToCover(0,max(o,disptop[1]));
}
}
好像也不是,改一下依舊不行
有思路,想編寫各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 511411198 進(jìn)行 有償 編寫!(不貴!點(diǎn)擊查看價(jià)格!)
相關(guān)文章
-
沒有相關(guān)內(nèi)容