重復(fù)發(fā)信號并成交,怎么改? [開拓者 TB]
-
咨詢內(nèi)容:
bBuyCon = avgRateOfHTL[1] > AmplitudeSet And fastMA[1] > slowMA[1] And Close > fastMA[1] And highChannel[1]/lowChannel[1] < 1+0.001*XZ And MarketPosition != 1;
bSellCon = avgRateOfHTL[1] < avgRateOfHTL??And fastMA[1] < slowMA[1] And Close < fastMA[1] And highChannel[1]/lowChannel[1] < 1+0.001*XZ And MarketPosition != -1;
If(bBuyCon == true)
{
PlotString("bBuy","bBuy",Low,Red);
Buy(lots,Open+Offset*MinPoint);
} If(BKFLG == 0) { A_SendOrder(Enum_Buy,Enum_Entry,lots,Price("New"));
}Return;
If(bSellCon == ture)
{
Sell(lots,Open-Offset*MinPoint);
} If(SKFLG == 0) { A_SendOrder(Enum_Sell,Enum_Entry,lots,Price("New"));
}Return;
Commentary("bBuyCon = "+IIFString(bBuyCon,"True","false"));
Commentary("bSellCon = "+IIFString(bSellCon,"True","false"));
Commentary("(avgRateOfHTL) "+Text(avgRateOfHTL));
If(MarketPosition == 1 And Low <= AvgEntryPrice - stopPoint){SellShort(0,Min(Open,AvgEntryPrice - stopPoint)-Offset*MinPoint);
} If(SPKFLG == 0) { A_SendOrder(Enum_Sell,Enum_Entry,lots,Price("New"));
}Return;
If(MarketPosition == -1 And High >= AvgEntryPrice + stopPoint){BuyToCover(0,Max(Open,AvgEntryPrice + stopPoint)+Offset*MinPoint);
} If(BPKFLG == 0) { A_SendOrder(Enum_Buy,Enum_Entry,lots,Price("New"));
}Return;?
?來源:CXH99.COM
-
TB技術(shù)人員:
If(bBuyCon == true and MarketPosition <> 1)
...
If(bSellCon == ture and MarketPosition??<> -1)
...
SellShort()需要和Sell()換位置。
還有,可以刪掉return語句吧。
有思路,想編寫各種指標(biāo)公式,交易模型,選股公式,還原公式的朋友
可聯(lián)系技術(shù)人員 QQ: 262069696 或微信號:cxh99cxh99 進(jìn)行 有償收費(fèi) 編寫!
(怎么收費(fèi),代編流程等詳情請點(diǎn)擊閱讀!)
(注:由于人數(shù)限制,QQ或微信請選擇方便的一個聯(lián)系我們就行,加好友時請簡單備注下您的需求,否則無法通過。謝謝您!)
相關(guān)文章
-
沒有相關(guān)內(nèi)容