老師,幫忙轉(zhuǎn)碼成文華8.2 [文華財(cái)經(jīng)]
作者:文華財(cái)經(jīng) 來(lái)源:cxh99.com 發(fā)布時(shí)間:2015年07月17日 點(diǎn)擊數(shù):
【收藏到本網(wǎng)的會(huì)員中心】
- 咨詢內(nèi)容:
If (Time
{
//多頭開(kāi)倉(cāng)
If (MarketPosition<>1 And NetChange<=Range_Percent And High>=myHighest+1*MinPoint)
{
TmpPrice = myHighest+1*MinPoint;
If(Open > tmpPrice) tmpPrice = Open;
TmpLots = EveryLots;
Buy(TmpLots,TmpPrice);
Return;
}
//空頭開(kāi)倉(cāng)
If (MarketPosition<>-1 And NetChange<=Range_Percent And Low<=myLowest-1*MinPoint)
{
TmpPrice = myLowest-1*MinPoint;
If(Open < tmpPrice) tmpPrice = Open;
TmpLots = EveryLots;
SellShort(TmpLots,TmpPrice);
Return;
}
//多頭平倉(cāng)-回撤平倉(cāng)
If (MarketPosition==1 And HigherAfterEntry-Low>=Trailing*MinPoint)
{
TmpPrice = HigherAfterEntry-Trailing*MinPoint;
If(Open < tmpPrice) tmpPrice = Open;
Sell(0,TmpPrice);
Return;
}
//多頭平倉(cāng)-跌破Exit_Length周期最低價(jià)
If (MarketPosition==1 And Low<=myLowest1-1*MinPoint)
{
TmpPrice = myLowest1-1*MinPoint;
If(Open < tmpPrice) tmpPrice = Open;
Sell(0,TmpPrice);
Return;
}
//空頭平倉(cāng)-回撤平倉(cāng)
If (MarketPosition==-1 And High-LowerAfterEntry>=Trailing*MinPoint)
{
TmpPrice = LowerAfterEntry+Trailing*MinPoint;
If(Open > tmpPrice) tmpPrice = Open;
BuyToCover(0,TmpPrice);
Return;
}
If (MarketPosition==-1 And High>=myHighest1+1*MinPoint)
{
TmpPrice = myHighest1+1*MinPoint;
If(Open > tmpPrice) tmpPrice = Open;
BuyToCover(0,TmpPrice);
Return;
}
}
Else If (Time>=ExitOnCloseMins*0.01)
{
Sell(0,Close,True);
BuyToCover(0,Close,True);
}
End - 文華技術(shù)人員:
您提供的源碼是不完整的,只有交易條件部分,很多變量都沒(méi)有定義。單獨(dú)這一部分代碼這樣修改。
NetChange<=Range_Percent And High>=myHighest+MINPRICE,BK;
NetChange<=Range_Percent And Low<=myLowest-MINPRICE,SK;
BARSBK>=1 && BKHIGH-Low>=Trailing*MINPRICE,SP;
BARSSK>=1 && High-SKLOW>=Trailing*MINPRICE,BP;
Time>=ExitOnCloseMins,CLOSEOUT;
AUTOFILTER;
有思路,想編寫各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 511411198 進(jìn)行 有償 編寫!(不貴!點(diǎn)擊查看價(jià)格!)
相關(guān)文章
-
沒(méi)有相關(guān)內(nèi)容