Meet the Creators: The genius behind this idea is Vit, while the mastermind who crafted the mq5 code is barabashkakvn.
Input Parameters Explained
- N-seconds ago - How many seconds back you want to analyze price movements.
- Step (in pips) - The step value you’ll be using for your strategy.
- Lots - The volume of your position.
- Stop Loss (in pips) - Your predefined risk limit.
- Take Profit (in pips) - Your target profit level.
- Coefficient if Stop Loss is Triggered - The ratio by which your lot size will increase after hitting a stop loss.
This Expert Advisor (EA) takes a deep dive into the last 'N-seconds ago' seconds of data and compares it with the current price action.
It keeps a close eye on whether your Stop Loss or Take Profit levels get triggered by utilizing the robust enumeration found in the ENUM_DEAL_REASON:
| Identifier | Description |
|---|---|
| *** | |
| DEAL_REASON_SL | This deal was executed due to Stop Loss activation. |
| DEAL_REASON_TP | This deal was executed due to Take Profit activation. |
| *** |
When a Stop Loss is triggered, your next position's lot size will increase based on the 'Coefficient if Stop Loss is Triggered' parameter.
Position Opening Rules
- BUY - Ensure bar #1 is bullish (Close > Open) and that the current price is above the price from 'N-seconds ago' by at least 'Step'.
- SELL - Confirm bar #1 is bearish (Close < Open) and that the current price is below the price from 'N-seconds ago' by at least 'Step'.
Comments 0