资料简介
利用均线间隔距离来进行交易的系统(据说价格300欧元)//userinputexterndoubleLots=0.1;//howmanylotstotradeatatimeexternintSlippage=2;//howmanypipsofslippagecanyoutolorateexternintFast_TimeFrame=0;externintFast_Period=28;externintFast_Price=PRICE_OPEN;externintFast_Mode=MODE_SMA;externintFast_Shift=0;externintSlow_TimeFrame=0;externintSlow_Period=73;externintSlow_Price=PRICE_OPEN;externintSlow_Mode=MODE_SMA;externintSlow_Shift=0;externdoubleDVBuySell=0.002;externintMAXTrades=5;//numberoftradestohaveopenatonceexterndoubleProfitMade=100;//howmuchmoneydoyouexpecttomakeexterndoubleLossLimit=72;//howmuchlosscanyoutolorateexternintTrailStop=999;//trailingstop(999=notrailingstop)externintPLBreakEven=999;//setbreakevenwhenthismanypipsaremade(999=off)externintStartHour=0;//yourlocaltimetostartmakingtradesexternintStopHour=24;//yourlocaltimetostopmakingtradesexternintBasketProfit=9999;//ifequityreachesthislevel,closetradesexternintBasketLoss=9999;//ifequityreachesthisnegativelevel,closetrades//namingandnumberingintMagicNumber=200601182020;//allowsmultipleexpertstotradeonsameaccountstringTradeComment="2MA_DivergenceTrader_04_";//Barhandlingdatetimebartime=0;//usedtodeterminewhenabarhasmovedintbartick=0;//numberoftimesbarshavemovedintobjtick=0;//usedtodrawobjectsonthechartinttickcount=0;//TradecontrolboolTradeAllowed=true;//usedtomanagetrades//Min/MaxtrackingdoublemaxOrders;doublemaxEquity;doubleminEquity;doubleCECount;doubleCEProc;
doubleCEBuy;doubleCESell;//+-------------+//|Custominit|//|-------------+//CalledONCEwhenEAisaddedtochartorrecompiledintinit(){inti;stringo;//removetheoldobjectsfor(i=0;i=0;cnt--){OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);if(OrderSymbol()==Symbol()&&OrderMagicNumber()==MagicNumber){OrdersPerSymbol++;if(OrderType()==OP_BUY){OrdersBUY++;}if(OrderType()==OP_SELL){OrdersSELL++;}}}if(OrdersPerSymbol>maxOrders)maxOrders=OrdersPerSymbol;//+-----------------------------+//|Insertyourindicatorhere|//|AndseteitherBUYmeor|//|SELLmetruetoplaceorders|//+-----------------------------+diverge=divergence(0);Comment("CurrentDivergence=",diverge);if(diverge>=DVBuySell)BUYme=true;if(diverge=(ProfitMade*p)||CurrentProfit=PLBreakEven*p&&OrderOpenPrice()
查看更多