SUMMARY I need an EA in MT5 that trades based on volatility with market orders. It must check and correctly process possible errors in trading operations. Entry and exits based on volatility threshold. VOLATILITY VARIABLE Volatility to be calculated in same way as in EasyLanguage function called VolatilityStdDev. Here is the function in easylanguage: Inputs: Period(100); Variables: NoOfDaysPerYear = 252; NoOfBarsPerDay = 1; // this variable needs to be automatically updated based on number of bars per day in case of intraday timeframe. For example in case of hourly timeframe and chart has 24 bars per day, it should automatically calculate 24 NoOfBarsPerYear = NoOfDaysPerYear*NoOfBarsPerDay; VolatilityStdDev = SquareRoot(NoOfBarsPerYear) * StandardDev( Log( close / close[1] ), Period) ; To crosscheck calculation is correct, for reference on US500 index as of June 2 the volatility indicator is around 0.11 The volatility indicator should be displayed on chart when backtest the EA. INPUTS Period = 100 // Volatility Period VolatilityStdDev = 0.2 // Volatility ratio MONEY MANAGEMENT Position size 1 lot RULES TO OPEN LONG POSITION Sellshort position when VolatilityStdDev >0.2 and exit short when crosses under 0.2. Do not cumulate position, only 1 entry at a time. Entries are market orders. Orders to be sent only when market is opened Terms • EA should backtest properly as per the defined signals • EA should work under any broker execution/filling mode • EA is under full property of requester • EA shall not be given or sold by the developer to any third parties • Source code to be provided for both the volatility indicator and the EA