老师,帮忙转码成文华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 进行 有偿 编写!(不贵!点击查看价格!)
相关文章
-
没有相关内容