同一根BAR多空轉換時出問題 [開拓者 TB]
- 咨詢內容:
0.png (12.01 KB, 下載次數: 0) 2017-2-2 17:18:53 上傳 - TB技術人員:
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客服:
好像是因為合并后BarsSinceEntry不等于0了,那怎么去解決這個問題?
- 網友回復:
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]));
}
}
好像也不是,改一下依舊不行
有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友
可聯系技術人員 QQ: 511411198 進行 有償 編寫!(不貴!點擊查看價格!)
相關文章
-
沒有相關內容