此资源为星钻会员专享,每日更新,收录于《大白EA宝库:星钻会员专属合集》。
这是一个基于 EMA Angle Zero 指标的趋势起手 EA(Adviser Starter v6mod)。本帖文件为 MT4 源码,打包成 zip 下载,解压后在 MetaEditor 里编译使用,参数与文件开头见下方源码预览。
源码预览(先看代码,再决定下不下)
本帖是源码 EA:Starter_v6mod.mq4,全文共 741 行。下面是它的全部可调参数与文件开头,完整源码在上方下载区,星钻会员可见。
可调参数(21 个)
int Debug=0;(Change to 1 to allow print)int AccountIsMini=0;(Change to 1 if trading mini account)int LiveTrading=0;(Change to 1 if trading live.)int mm=1;(Change to 0 if you want to shutdown money management controls. Lots = 1 will be in effect and only 1 lot will be open regardless of equity.)double Riskpercent=5;(Change to whatever percent of equity you wish to risk.)double DecreaseFactor=3;(Used to decrease lot size after a loss is experienced to protect equity. Recommended not to change.)double StopLoss=35;(Maximum pips willing to lose per position.)double TrailingStop=0;(Change to whatever number of pips you wish to trail your position with.)int MaximumLosses=3;(Maximum number of losses per day willing to experience.)double Margincutoff=800;(Expert will stop trading if equity level decreases to that level.)double Maxtrades=10;(Total number of positions on all currency pairs. You can change this number as you wish.)int TakeProfit=10;(Maximum profit level achieved.)int Slippage=10;(Possible fix for not getting filled or closed)int EMAPeriod=34;(EMAAnglePeriod)double AngleTreshold=0.2int StartEMAShift=6;(Check last six bars)int EndEMAShift=0double MAPeriod=120;(Moving average period.)double MAPeriod2=40;(Moving average period 2.)double Lots=1;(standard lot size.)int Turnon=1;(Turns expert on, change to 0 and no trades will take place even if expert is enabled.)
//+------------------------------------------------------------------+ //| starter_v6mod.mq4 | //| Copyright © 2005 | //| Thanks to Starter, Maloma, Amir, Fukinagashi, Forex_trader, | //| kmrunner, and all other strategybuilderFx members that | //| contributed to the success of this expert. | //| From MrPip | //| My contibution is clean up of code | //| 10/13/05 added EMAAngleZero | //| added Maloma logic for No buy when Sell open, etc | //| removed Stop logic code uses TakeProfit instead | //| 10/15 Corrected EMAAngleZero for handling USDJPY | //| 10/18/05 Added Slippage as parameter to expert | //| 10/18/05 Added code for multiple tries to open trade | //+------------------------------------------------------------------+ #property copyright "Copyright © 2005, Strategybuilderfx members" #property link "http:/https://www.b123.com/" #include <stdlib.mqh> //---- extern int Debug=0; // Change to 1 to allow print //+---------------------------------------------------+ //|Account functions | //+---------------------------------------------------+ extern int AccountIsMini=0; // Change to 1 if trading mini account extern int LiveTrading=0; // Change to 1 if trading live. //+---------------------------------------------------+ //|Money Management | //+---------------------------------------------------+ extern int mm=1; // Change to 0 if you want to shutdown money management controls. Lots = 1 will be in effect and extern double Riskpercent=5; // Change to whatever percent of equity you wish to risk. extern double DecreaseFactor=3; // Used to decrease lot size after a loss is experienced to protect equity. Recommended not to extern double StopLoss=35; // Maximum pips willing to lose per position. extern double TrailingStop=0; // Change to whatever number of pips you wish to trail your position with. extern int MaximumLosses=3; // Maximum number of losses per day willing to experience. extern double Margincutoff=800; // Expert will stop trading if equity level decreases to that level.
风险提示:EA 交易有风险,过往与参数表现不代表未来。正式使用前先在模拟盘跑够样本,确认在自己的点差、滑点环境下仍符合预期,再决定是否上实盘。
版本说明:资源随 MT4/MT5 版本迭代可能失效,如遇失效请在本帖留言反馈。

