保定网站建设,网站建设作业,免费建微网站平台,北京市市场监督管理局官网完整EA#xff1a;Nerve Knife.ex4黄金交易策略_黄金趋势ea-CSDN博客
NK的做单量是由参数设定的#xff0c;以下分别是参数项#xff1a; 考虑到复利的情况#xff0c;若10000本金#xff0c;在以上三个参数的设计下#xff0c;第1单的购买量是0.01*10,第2单是0.01*10*2… 完整EANerve Knife.ex4黄金交易策略_黄金趋势ea-CSDN博客
NK的做单量是由参数设定的以下分别是参数项 考虑到复利的情况若10000本金在以上三个参数的设计下第1单的购买量是0.01*10,第2单是0.01*10*2第3单是0.01*10*4...
对应的开单代码如下
//跟踪点差是否满足开仓条件if (count 0 (TimeLocal() End_Time_After_H*60*60) StrToTime(End_Time))//第一笔开仓{if(follow)//一定是m1_down同向{followPrice followPrice Bid ? Bid : followPrice;if(isDown(1, 0, HeikenAshiSmoothed) UP || breakThrough(up, Ask)) //追踪开仓的过程中1分钟上行情反转或反向突破即停止追踪{follow false;followPrice 0;nextOrderTime TimeCurrent() 60 * 1;//等待60秒printfPro(反向突破等待 (60 * 1) 秒, false);}}if (isDown(small_timeframe,offset,small_indicator) DOWN follow (followPrice - Bid) / Point order1_interval TimeCurrent() nextOrderTime){OrderSend(Symbol(),OP_SELL,order1_lots * multiple,MarketInfo(Symbol(),MODE_BID),0,0,0,1,888,0,clrGreen);printf(大小趋势相同买入空单1);count 1;lastPrice MarketInfo(Symbol(),MODE_BID);nextOrderTime TimeCurrent() open_time;follow false;followPrice 0;}}else if (count 1 count 5 )//第二到五笔开仓{//落差大于500点小趋势反过来开始跟踪买入空单if (isDown(small_timeframe,offset,small_indicator) DOWN !follow (Bid - lastPrice) / Point order2_5_trigger TimeCurrent() nextOrderTime){follow true; followPrice Bid;}if(follow){followPrice Bid followPrice ? Bid : followPrice;if(isDown(1, 0, HeikenAshiSmoothed) UP || breakThrough(up, Ask)) //追踪开仓的过程中1分钟上行情反转即停止追踪{follow false;followPrice 0;nextOrderTime TimeCurrent() 60 * 1;//等待60秒printfPro(反向突破等待 (60 * 1) 秒, false);}}if (isDown(small_timeframe,offset,small_indicator) DOWN follow (followPrice - Bid) / Point order2_5_interval)//下降300点买入{//买入空单count ;double buyTotalLots calcBuyOrSellTotalLots((int)((Bid - lastPrice) / Point / 2), 0);//计算买入量OrderSend(Symbol(),OP_SELL,buyTotalLots (order2_5_lots * multiple * MathPow(2,count - 1)) ? order2_5_lots * multiple * MathPow(2,count - 1) : buyTotalLots,MarketInfo(Symbol(),MODE_BID),0,0,0, count,888,0,clrGreen);printf(大小趋势相同买入空单 count);lastPrice MarketInfo(Symbol(),MODE_BID);nextOrderTime TimeCurrent() open_time;follow false;followPrice 0;}}