老師,幫忙轉碼成文華8.2 [文華財經]
- 咨詢內容:
If (Time
{
//多頭開倉
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;
}
//空頭開倉
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;
}
//多頭平倉-回撤平倉
If (MarketPosition==1 And HigherAfterEntry-Low>=Trailing*MinPoint)
{
TmpPrice = HigherAfterEntry-Trailing*MinPoint;
If(Open < tmpPrice) tmpPrice = Open;
Sell(0,TmpPrice);
Return;
}
//多頭平倉-跌破Exit_Length周期最低價
If (MarketPosition==1 And Low<=myLowest1-1*MinPoint)
{
TmpPrice = myLowest1-1*MinPoint;
If(Open < tmpPrice) tmpPrice = Open;
Sell(0,TmpPrice);
Return;
}
//空頭平倉-回撤平倉
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 - 文華技術人員:
您提供的源碼是不完整的,只有交易條件部分,很多變量都沒有定義。單獨這一部分代碼這樣修改。
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;
有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友
可聯系技術人員 QQ: 511411198 進行 有償 編寫!(不貴!點擊查看價格!)
相關文章
-
沒有相關內容