The Edge trading algorithm determines the levels the price bounces off and opens a position. In case the price breaks a levels and moves against the open position, the volume is increased. The position is closed at the nearest price rollback if the appropriate signal is available. External parameters of the program allow fine-tuning the operation of the algorithm.
We have prepared the article on how to work with this trading algorithm and receive reliable combinations of parameters:
If you need the source code of this Expert Advisor, write to me in a personal message. The deal can be executed via Freelance service.
Description and recommendations
- The algorithm works on Hedge and Netting accounts. It is recommended to select parameters for each account type separately.
- It is possible to trade and optimize the parameters in the tester on multiple symbols simultaneously.
- The EA features a control panel for emergency closure of all open positions or only for the specified symbols.
- In the control panel, it is possible to specify the direction to open trades for all symbols at once or for the selected symbols only.
- The EA's graphic interface contains a table with the statistic values of last testing results and parameters used during that testing, as well as a table with the current account statistics.
To achieve stable results, it is recommended to perform optimization for the longest available time period and on multiple symbols simultaneously.
Parameters of the Expert Advisor
- Symbols - comma-separated list of symbols to be traded. If empty, only the current chart symbol will be used.
- Start hour - hour to start trading.
- End hour - hour to stop trading.
- Trade weekdays - days of the week for trading.
- Period - period of the indicator.
- Signal level - signal level of the indicator.
- ATR period - period of the ATR indicator.
- TP ATR coefficient 1 - ATR coefficient to calculate take profit.
- TP reduction factor 1 - coefficient for take profit after each averaging.
- TP reduction factor 2 - take profit coefficient to be used after reaching the averaging limit set below.
- TP increase limit - averaging limit.
- TP average price limit (only hedge) - the number of averagings to start calculating take profit based on the last deal price (only for hedge accounts).
- Stop loss points - limit losses.
- Points increase coefficient - the first minimum range that must be passed for averaging based on the ATR coefficient.
- Next points increase coefficient - coefficient to calculate each subsequent range for averaging.
- Bars increase - the minimum number of bars for the first averaging.
- Next bars increase coefficient - multiplier for the number of bars to be used in each subsequent averaging.
- Increase limit - averaging limit.
- Close in parts - the number of parts for closing positions.
- Close first trade after limit (only hedge) - close the first position in the averaging series only after the specified limit (only for hedge accounts).
- Close last profit trade on opposite signal (only hedge) - close the last profitable position at the opposite signal after reaching this limit (only for hedge accounts).
- Close when leaving time range - close positions outside this time range (hours and days of the week).
- Start lot - initial lot.
- Step lot - lot step.
- Delta - the amount of profit, after which the initial lot is increased by the specified step.
- Custom max - custom criterion for finding parameters during optimization.
- Withdrawal - test the partial withdrawal after reaching the specified profit.
- Stop optimization pass by DD - an optimization run is stopped if the specified drawdown is reached.
2. Added a table with the parameters used in the last testing.
3. Minor corrections in the graphic interface.
2. Fixed incorrect display of the balance of symbols in the graphical interface of the expert in some cases.
3. Increased the speed of testing and optimization. Now you will spend less time searching for optimal parameters.