Linear Regression Trader
- Experts
- Alexander Yaskevich
- Versione: 1.1
- Aggiornato: 27 agosto 2018
- Attivazioni: 7
We highly recommend you running this expert at EURUSD H1.
Linear Regression Trader employs the mathematical model of linear regression for smoothing price movements and trend recognition.
Best results can be achieved when trading at the change of the trend or when the prices form a triangle, rectangle or similar patterns.
Uses libraries for executing operations with matrices, already included into EX4 file.
The principles of work:
- Define the tangent coefficient of the line for the Large period N
- Define the tangent coefficient for the Small period n
- If the coefficients have different signs - wait for the soon change in the trend and open the corresponding position (in the direction of the small line)
- Simultaneously place Stop Loss and Take Profit.
Warning: Stop Loss is counted out from the minimum (maximum) of the preceding bar and current Bid (Ask)! Take Profit is counted from the opening price, as usual.
Positions are closed either because of stop loss or at the change of the trend, when the signal for opening the opposite position is received.
You cannot have more than 1 position open at a time.
Input parameters:
- Large period for regression - Large period for smoothing
- Small period for regression - Small period for smoothing
- Lot - Lot is fixed. We recommend increasing the lot size as your deposit grows
- Stop Loss in pips (q.v. the warning above)
- Take Profit in pips
- Tangent Line coefficient for Large period - Large tangent coeff. for position opening
- Tangent Line coefficient for Small period - Small tangent coeff. for position opening
- Magic Number - the identifier of a particular expert in a terminal. By default it is 10. If you want to run several experts in one terminal, make sure they have unique magic numbers.
Timeframes and Currencies:
We highly recommend you running this expert at EURUSD H1.
Being careful, you can also try using the expert with other currency pairs and/or timeframes, after performing backtesting.
Notes:
Default Take Profit and Stop Loss parameters are supposed to work with four-digit quotes (i.e. 1.1520). If you are trading at the account with five-digit quotes, you should multiple the parameters by 10.
Should you have any questions, please feel free to contact the author directly.