gandalf pr o
Info
The gandalf pr o is a Expert Advisor for MetaTrader 5 that inspired by topic (in russian). warning: optimization is required.
Usage
This tool is typically used for automated trading on major forex pairs and gold.
Platform
This Expert Advisor works exclusively on MetaTrader 5 (both build 600+ and newer versions).
Setup
Place the downloaded file in MQL5/Experts folder via File ? Open Data Folder in MetaTrader 5.
How to Install and Use gandalf pr o
1. Installation: Open the "File" menu, select "Open Data Folder," navigate to MQL/Experts, paste your file, and restart the terminal.
2. Activation: Drag the EA from the Navigator onto a chart, ensure "Allow live trading" is checked in the Common tab, and verify the AutoTrading button is green.
3. Optimization: Right-click your chart, choose "Expert List," click "Properties" to adjust inputs, and save your preferred setup as a set file for future use.
4. Maintenance: Regularly check the "Experts" tab in the terminal window to monitor trade logs and potential execution errors.
Frequently Asked Questions
Q: Why is my EA not opening trades? A: Check the "AutoTrading" button, ensure "Allow live trading" is enabled, and verify your broker allows automated trading on your account type.
Q: Can I run multiple EAs on one chart? A: No, each chart can only host one active EA; however, you can open multiple charts for different currency pairs to run several EAs.
Q: What does the "smiley face" icon mean? A: A smiley face in the top-right corner of the chart indicates the EA is successfully running; a frowny face means it is disabled.
What this tool does
inspired by topic (in russian).
Typical Use Case
This Expert Advisor excels in automated trading and technical analysis on MetaTrader 5.
Compatible Platform & Setup
This Expert Advisor works on MetaTrader 5. Place the file in the MQL5/Experts folder and restart the terminal.
Description & Settings
Related: universal breakout study expert advisor for mt4/mt5 - another powerful expert for MetaTrader 5 traders.
inspired by topic (in russian).
Also recommended: dynamic trailing stop loss and profit target management - similar expert with strong performance on MetaTrader 5.
warning: optimization is required!the world is changed. i feel it in the water. i feel it in the earth.
i smell it in the air. much that once was is lost...
"the lord of the rings" by j. r. r. tolkien
the idea of creating the gandalf expert advisor inspired discussion on the forum .
the ea keeps open one buy position and one sell position (two independent positions) until the market closes them either by fixed tp or sl.
it enters the market on the basis of a two-parameter exponential smoothing of a time series taking into account 2 parameters:
1st parameter: location of price - s
2nd parameter: trend slope - t
recurrence formulas are used in calculations:
s[n]=w*y[n]+(1-w)*(s[n-1]+t[n-1])
t[n]=t*(s[n]-s[n-1])+(1-t)*t[n-1]
the predicted value is: y[n+1]=s[n]+t[n]
for the source values of the 1st and 2nd parameter we can use the ratios from tejh linear regression formula - .
__________________________________________________________________________________________
expert advisor inputs >
for long positions:
in_buy=true; — allow long positions,
count_buy=24; — the number of history bars, on which the time series is smoothed (closed parameter)
w_price=0.18; — price factor,
w_trend=0.18; — trend factor,
sl_buy=62; — stop loss level in pips,
risk_buy=0; — risk level in % (depending on free margin).
for short positions: variables in_sell, count_sell, m_price, m_trend, sl_sell, risk_sell are similar to the above.
__________________________________________________________________________________________
optimization is performed in two steps, on the fixed lot, i.e. when risk_buy=0;and risk_sell =0;
step 1 for long positions:
in_buy=true; in_sell=false; count_buy from 3 to 120, with a step of 1;
w_price and w_trend from 0.05 to 0.6 with a step 0.01; sl_buy from 30 to 100, with a step 1.
step 2 for short positions:
in_buy=false; in_sell=true; the rest is similar to the above.
the expert advisor shows fascinating trading on vivid trend periods on h4 and d1 timeframes of eurusd, but you should apply an additional filter using an indicator on higher timeframes when you want to enter the market.
You may also like: reversal strategy - excellent alternative for expert users on MetaTrader 5.
Source Code
/
.......
⚠ Limitations & Risk Warning
- This tool is provided for educational and testing purposes only.
- Past performance does not guarantee future results.
- Trading involves substantial risk of loss. Use on a demo account first.
- Results may vary depending on market conditions, broker, and settings.
- We recommend thorough backtesting and forward testing before using with real funds.