당사 팬 페이지에 가입하십시오
Ilan iMA - MetaTrader 5용 expert
- 게시자:
- Vladimir Karputov
- 조회수:
- 9638
- 평가:
- 게시됨:
- 2019.02.07 09:00
- 업데이트됨:
- 2019.02.07 09:01
- 이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동
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 BUY, signal SELL:
if(ma[0]<ma[1] && ma[1]<ma[2] && ma[2]<ma[3]) // trend down { if(m_symbol.Bid()>ma[0]) m_need_open_sell=true; } else if(ma[0]>ma[1] && ma[1]>ma[2] && ma[2]>ma[3]) // trend up { if(m_symbol.Ask()<ma[0]) m_need_open_buy=true; }
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.
MetaQuotes Ltd에서 러시아어로 번역함.
원본 코드: https://www.mql5.com/ru/code/23540
The EA compares the difference between the Close price of bar #1 and the Close price of bar #Candle shift.
XXDPO_Candle_AlertsIndicator XXDPO_Candle can provide alerts and send email and push notifications when trading signals occur. Possible signal options