Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

Dematus - MetaTrader 5 Expert | Forex Indicators Download - MT4/MT5 Resources

author EAcpu | 4 reads | 0 comments |

Author of the idea : Igor

MQL5 code author : Balabashka Kong

If there is a position and the price is at a specified distance relative to the last position opening price (stored in the m_last_deal_price_IN internal variable), when the iDeMarker (DeMarker, DeM) indicator gives permission, the opening volume is the coefficient of the position * the last opening volume (stored in the internal m_lot variable). If there are currently no open positions, we expect permission from the indicator and a lot of volume.

Stop Loss ( Stop Loss parameter) defaults to 999 pips and is therefore almost never activated :), there is no Take Profit in the settings. If the position exists, the usual trailing ( trailing stops and trailing steps ) can be applied to it.

Tracking taking into account available funds is managed by the Track Stock , Virtual Stop Stock and Track Starting Equity variables.

When the position is finally closed, the opening price ( m_last_deal_price_IN internal variable) is set to zero, while the m lot internal variable is reset to many . This resets the "Last Price Entry" parameter to "false" by default after the trade is over . If set to "true", the m_last_deal_price_IN internal variable is set to zero after each close.

Passed all symbol tests, M5, reset "Last Price Entry" = true after end of trade , Deposit: 10 000 USD.

Passed all symbol tests, M5, reset "Last Price Entry" = false after end of trade , Deposit: 10 000 USD.


Attachment download

📎 dematus.mq5 (50.86 KB)

Source: MQL5 #21639

Verification code Refresh