[原创]想买wh9实盘但是不知道tb的模型能不能在这边用 [文华财经]
-
咨询内容:
//------------------------------------------------------------------------// 简称: zhaoxin11// 名称: zhaoxin11// 类别: 公式应用// 类型: 用户应用// 输出://------------------------------------------------------------------------
Params Numeric AfStep( 0.02); Numeric AfLimit( 0.2 ) ; Numeric Length(50); //均线周期 Numeric Tiao(0); //跳数 Numeric Lots(1); //仓量 Numeric lostPoint(100); // 50个点,止损 Vars Numeric oParCl( 0 ); Numeric oParOp( 0 ); Numeric oPosition( 0 ); Numeric oTransition( 0 ); NumericSeries sar; Numeric ma; NumericSeries isDo; NumericSeries lastOpen; // NumericSeries sar; Numeric minpoint; NumericSeries myenterPrice; Numeric zhisunPrice; Begin
ma = AverageFC(Close[1],Length); ParabolicSAR( AfStep, AfLimit, oParCl, oParOp, oPosition, oTransition ) ;
COMMENTARY("oParCl="+ Text(oParCl)); // COMMENTARY("oParOp"+ Text(oParOp)); // COMMENTARY("oPosition"+ Text(oPosition)); // COMMENTARY("oTransition"+ Text(oTransition)); // COMMENTARY("MarketPosition"+ Text(MarketPosition)); // COMMENTARY("isDo[0]"+ Text(isDo)); // COMMENTARY("isDo[1]"+ Text(isDo[1])); COMMENTARY("ma="+ Text(ma)); PlotNumeric("oParCl" , oParCl); minpoint = MinMove*PriceScale; zhisunPrice = MinMove * PriceScale * lostPoint; isDo = oParCl - ma - 10 * Tiao;
If(MarketPosition==1 ) { // If(isDo[0] > 0 && isDo[1] <= 0){ If(oParCl > H){ Sell(Lots, (h+l)/2); SellShort(Lots, (h+l)/2); lastOpen = O; } // zhisunPrice else if(close[1] < lastOpen - zhisunPrice) { sell(LOTS, open); } }Else If(MarketPosition==-1){ If(oParCl < L){ BuyToCover(Lots, (h+l)/2); Buy(Lots, (h+l)/2); lastOpen = O; // zhisunPrice }else if (close[1] > lastOpen + zhisunPrice) { BuyToCover(LOTS,o);
} }Else If(MarketPosition==0){ If(oParCl < L){ Buy(Lots, O); lastOpen = O; }Else If(oParCl > H){ SellShort(Lots, O); lastOpen = O; } } End
是否可以辅助翻译成文华9.谢谢来源:程序化99
-
文华技术人员:
Params
Numeric Length(50); //均线周期
Numeric Tiao(0); //跳数
Numeric Lots(1); //仓量
Numeric lostPoint(100); // 50个点,止损
Vars
Numeric AfStep;
Numeric AfLimit ;
Numeric oParCl( 0 );
Numeric oParOp( 0 );
Numeric oPosition( 0 );
Numeric oTransition( 0 );
Numeric ma1;
NumericSeries isDo;
NumericSeries lastOpen;
// NumericSeries sar;
Numeric minpoint;
NumericSeries myenterPrice;
Numeric zhisunPrice;
Numeric H,L,O,C;
Begin
AfStep=0.02;
AfLimit=0.2;
ma1 = AverageFC(Close[1],Length);
COMMENTARY("oParCl="+ Text(oParCl));COMMENTARY("ma="+ Text(ma1));PlotNumeric("oParCl" , oParCl); L=LOW; O=OPEN; C=CLOSE; H=HIGH; minpoint = MinMove*PriceScale; zhisunPrice = MinMove * PriceScale * lostPoint; isDo = oParCl - ma1 - 10 * Tiao;
If(MarketPosition==1 ) { // If(isDo[0] > 0 && isDo[1] <= 0){ If(oParCl > H){ SP(Lots, (h+l)/2); SPK(Lots, (h+l)/2); lastOpen = O; } // zhisunPrice else if(close[1] < lastOpen - zhisunPrice) { SP(LOTS, open); } }Else If(MarketPosition==-1){ If(oParCl < L){ BP(Lots, (h+l)/2); BPK(Lots, (h+l)/2); lastOpen = O; // zhisunPrice }else if (close[1] > lastOpen + zhisunPrice) { BP(LOTS,o);
} }Else If(MarketPosition==0){ If(oParCl < L){ BPK(Lots, O); lastOpen = O; }Else If(oParCl > H){ SPK(Lots, O); lastOpen = O; } } End
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信号:cxh99cxh99 进行 有偿收费 编写!
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容