黄金交易策略(Nerve Nnife.mql4):1秒救地球的第六单

一轮趋势做单,正常情况是5单便可以完成一轮盈利。但当开仓后快速追加5单也无法止盈的话,我们得找准极其苛刻的条件开出第6单,并指望完成利润覆盖。代码如下:

if(count >= 5 && count < 10 && isDown(small_timeframe,offset,small_indicator) == UP)//6~10笔单执行海豹突击队  
         {
            //空间突破3%介入海做多
            int index = iHighest(Symbol(),small_timeframe,MODE_HIGH,3,1);
            double highPrice = iHigh(Symbol(), small_timeframe, index);
            index = iLowest(Symbol(),small_timeframe,MODE_LOW,3,1);
            double lowPrice = iLow(Symbol(), small_timeframe, index);
            bool upupup = false;
            if((Ask - highPrice)/(highPrice - lowPrice) > 0.03)//向上突破3%
              {
                upupup = true;
              }
            if (!follow  && !isCrazy2 && upupup && (lastPrice - Ask) / Point > order6_10_trigger &&  TimeCurrent() > nextOrderTime)//m15绿下降超500点,海豹突击队准备入场
            {
               double buyTotalLots = calcBuyOrSellTotalLots(crazy_unwind_interval, 500);//计算买入量
               if (buyTotalLots > 0.01)
               {
                  //买入多单
                  count ++; 
                  OrderSend(Symbol(),OP_BUY,buyTotalLots,MarketInfo(Symbol(),MODE_ASK),0,0,0,"" + count,888,0,clrBlue);
                  printfPro("大小趋势相同买入多单(海豹突击队)" + count); 
                  lastPrice = MarketInfo(Symbol(),MODE_ASK);
                  nextOrderTime = TimeCurrent() + open_time;
                  isCrazy2 = true;
               }
               
               
            }
            double totalProfit = calcTotalProfit(0, "buy", 888);
            if(isCrazy2 && !follow &&  totalProfit / Point > 500)
              {
               follow = true;
               followPrice = totalProfit;
              }
            if(follow)
              {
                followPrice = followPrice < totalProfit ? totalProfit : followPrice;
              }
            
            if (follow && (followPrice - totalProfit) / Point > crazy_interval)
            {
               //平仓解套获利
               Close_All_Order_DeadLine(Symbol(),"EA","B",888);
               printfPro("海豹突击队平仓解套获利");
               reset(crazy_close_all_open_time);
            }
            
         }

大致条件是:小趋势符合、空间突破符合。

 完整EA:Nerve Knife.ex4黄金交易策略_黄金趋势ea-CSDN博客

  • 3
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值