国内新闻
请教高手这段代码 的意思?
2019-01-12 01:51  浏览:109
马上注册,结交更多好友,下载更多资源

您需要 登录 才可以下载或查看,没有帐号?注册 double maxProfitPrice = 0.0;
void posProcess(){
    int orders = OrdersTotal();
   if(orders == 0) maxProfit =0.0;
   if(orders 0){
     for(int i=orders-1;i i--){
       if(!OrderSelect(i,SELECT_BY_POS,MODE_TRADES)) continue;
       if(isBuySymbol() ){
         if(Bid OrderStopLoss()+dTsp*pPoint ){
           orderModifyTrailStop(Bid-dTsp*pPoint);
           maxProfit = OrderProfit();
           maxProfitPrice = Bid;
         }
         if(OrderProfit() maxProfit NormalizeDouble(maxProfit,Digits) 0.0){
           maxProfit = OrderProfit();
           maxProfitPrice = Bid;

    int orders = OrdersTotal();//获取订单数
   if(orders == 0) maxProfit =0.0;
   if(orders 0){//订单数大于0
     for(int i=orders-1;i i--){
       if(!OrderSelect(i,SELECT_BY_POS,MODE_TRADES)) //选择失败,继续选择下一个
         continue;
       if(isBuySymbol() ){//isBuySymbol()这个函数什么意思?
         if(Bid OrderStopLoss()+dTsp*pPoint ){//当前卖价大于订单的止损价加上dTsp*pPoint(具体意思联系上下文)
           orderModifyTrailStop(Bid-dTsp*pPoint);//应该是修改止损?
           maxProfit = OrderProfit();//代码太少懒得写了。。。
           maxProfitPrice = Bid;
         }
         if(OrderProfit() maxProfit NormalizeDouble(maxProfit,Digits) 0.0){
           maxProfit = OrderProfit();
           maxProfitPrice = Bid;
           }
外汇交易有很大的风险性,本站所有资源均来自网络,请选择使用,如若出现亏损,本站不承担任何责任!

发表评论
0评