Ilan iMA - expert for MetaTrader 5

Ilan iMA - expert for MetaTrader 5

Idea by: Ingrit

mq5 code by: barabashkakvn

ATTENTION: The EA is designed to work on hedge accounts only!

Ilan based on indicator iMA (Moving Average, MA)

Signal BUYsignal SELL:

      if(ma[0]<ma[1] && ma[1]<ma[2] && ma[2]<ma[3]) // trend down
      else if(ma[0]>ma[1] && ma[1]>ma[2] && ma[2]>ma[3]) // trend up

If the position is losing at at least Step pips (1.00045-1.00055=1 pips), a new position will be opened in the same direction as that losing position. The new position will be opened with a larger lot size. The new reference lot size cannot exceed the predefined value of Lot maximum.

If there are several positions, we are waiting until their total profit is equal to or exceeds Profit minimum. As soon as such a situation is caught, we will close all positions.

We always work with the positions of only one direction. In case of both BUY and SELL positions opened, this is considered to be an erroneous situation, and the measures will be taken to close unnecessary positions.

How the volume of positions is increased: If there are more than only one position, the highest volume will be detected; the highest volume found shall be multiplied by the lot-size factor Lot exponent. Why is it done this way - by searching for the highest volume? The matter is that the price may sometimes move in a wrong direction, and some positions are opened with the minimum step - Step. In the picture below, the latest volume is equal to 0.34 lots. Suppose the price reverses in the desired direction and the position of 0.34 lots is closed by Take Profit. Logically, if the price moves again against us, we will increase 0.21 * Lot exponent. Thus, we escape overloading the deposit.

Ilan iMA

Download Ilan iMA - expert for MetaTrader 5

Related News

Latest News
Gold’s Been on a Tear This Year and 2020 May See More Reward
10.12.2019 05:12
(Bloomberg) -- Gold’s impressive advance in 2019 -- aided by trade war frictions, easier monetary policy across the world’s leading economies and sustained central-bank buying -- may be set to spill into the new decade. As 2020 looms, BlackRock Inc (NYSE:BLK)., the world’s largest money manager, remains constructive on bullion as a hedge, while
Read more
Macron Braces for Second Day of Protests Against Pension Reform
10.12.2019 05:09
(Bloomberg) -- Emmanuel Macron is bracing for round-two of a clash with labor unions over his plan to upend France’s pension system, in what could become the defining moment of his presidency. Labor unions will stage a repeat of last week’s mass protests on Tuesday to load pressure the day before Macron’s government announces the final version of
Read more
Japan’s 10-Year Yield Climbs to Zero for First Time Since March
10.12.2019 05:06
(Bloomberg) -- Japan’s 10-year bond yield rose to zero for the first time in nine months amid waning global demand for debt. The nation’s benchmark yields are rising for a fourth month after the Bank of Japan slashed debt purchases and refrained from adding any more easing measures. Bonds have also fallen as optimism that the U.S. and China may
Read more
Australia cartel case against Citi, Deutsche delayed by late night witness statement
10.12.2019 05:03
SYDNEY (Reuters) - An Australian criminal cartel lawsuit against Citigroup Inc (N:C) and Deutsche Bank AG (DE:DBKGn) was postponed on Tuesday after defense lawyers complained the prosecution had given them a redacted statement for a key witness late on the previous day. Though for just one day, the delay raises the chance of pre-trial hearings
Read more
Indonesia October retail sales grow at fastest pace in five months
10.12.2019 04:09
JAKARTA (Reuters) - Growth in retail sales in Indonesia accelerated to 3.6% in October from a year earlier, the fastest pace in five months and picking up strongly from September's 0.7%, a central bank survey showed on Tuesday. Growth was mainly driven by increased sales of food and auto parts, although sales of communication equipment
Read more