Maxlots Fixed error
-Last Build Compilation
-EAPADPRO v43 (Added new languages)
EAPADPRO v40 update, according to the new rules for using the MQL5 Market
EAPADPRO v39 update;
Recompilation of the Expert Advisor in the latest build of the terminal!
The Trading Days Work function has been updated.
Permission to trade on days of weeks, with round-the-clock work, has been updated.
Recompilation with the latest version of the terminal.
Force global variables to disk.
Recompilation in the new version of the terminal.
An important update for those using the MQL5 VPS!
Due to the fact that the hosting location folder has changed and MetaQuotes added a new variable TERMINAL_VPS, new edits were applied to all experts.!
EAPADPRO v31 Update
Code optimization and increased speed.
Fixed display of the current Mooving Average signal.
Added information labels to the chart:
When activated ShowInfoAverager = to true, you will see the following information:
1. Average = Display the average (zero) line from positions of the same direction. If you move to a label, then there will be additional information about the calculation of the average line!
2. Next Average = Display the next averaging position, which will be open in this direction. If you move to a label, then there will be additional information about the distance!
- EAPADPRO v27 update
- Fixed the error of obtaining the average spread when opening a new bar on some currency pairs (when Ask and Bid = 0).
EAPadPRO version 26
- Update EAPADPRO v 25
- Additional languages added to the panel: Spanish, Portuguese (Brazil), German, Chinese, Japanese;
The translation was made using the GOOGLE Translator + MQL + Terminal site!
If you find an error in your language, please report it in messages. Thank!
- Increase the speed of the panel;
- Updating data on the block "Profit by Date" works 1 time in 5 minutes to save computer resources;
- Fixed "duplication" of lines in the help and greeting;
- Automatic closing of the panel 3 hours after the last use to save computer resources;
- Automatic closing of the panel on the VPS from METAQUOTES to save resources MQL VPS;
- Added the ability to Collapse / Expand the panel when you double-click on the window title (Analog Windows);
- By default, we collapsed the Extra Buttons block;
To increase the speed of data processing, the direction of the Moving Average indicator will be calculated only when the main signal appears.
- Update EAPADPRO panel to v23 version
- Added a control unit and control the speed of the quotes and the speed of testing.
- Added block output table open deals and positions.
Manual setting of the minimum average spread so that all parameters of the adviser are brought to this average spread.
with AutoCheckLowSpread = false and setting ManualMinimumAverageSpread = 10:
If the average spread on a currency pair is lower than 10 pips, then the adviser takes the value of the average spread ( AverageSpread ) as 10 pips, and all system parameters work from an average spread of 10 pips.
If the average spread calculated by the advisor is more than 10 points, then the advisor takes the average spread = the calculated value.
For your convenience, we have added a brief description of the parameters in the table of external variables and expert settings.
Update panel EAPAPDPRO v21:
-Added information about the ban on trade for various reasons.
-------------------------------------------------- -------------------------------------------------- ------------
EA works on the movement of currency pair quotes.
An important parameter of the system is the spread.
A zero spread is prohibited for the program.
In this version, the adviser brings the average spread to 1 if the spread on the server is 0.
This allows you to avoid erroneous opening positions with an average value of 0!
EPAPDPRO Update v20
Upgrade the EAPADPRO to version 20.
Block Limiting losses and profits updated:
Parameters LimitForLosses and LimitForProfits changed by type to double
A new CUSTOM mode has been added to the LimitType type. You can specify your monitoring values in minutes, the LimitForCustom_Minutes parameter.
Improved the operation of the Trade_by_BUYSELL_Separate function.
Fixed the issue with breakeven during simultaneous management of series of BUY and SELL positions.
To the Last Price information output block:
Added the number of points till the next averaging. Indicated in brackets from the last opening price.
To the Aver Price information output block:
Added the amount of commission and swap in points.
The CloseByMa function has been divided into 3 types of closing:
False=0 - the EA does not close positions when the MA direction changes.
OnlySignal=1 - when the MA direction changes, the EA closes only when one main signal position is open. There should be no averaging positions open.
SignalAverage=2 - when the MA direction changes, the EA closes all positions, including averaging positions.
Update New Feature:
Use the original calculation of commission and swap when enabling the functions: Breakeven, Trailing Stop, Averaging.
The original commission calculation is based on the formula for calculating the value of 1 point from the open positions on a given symbol and magic number. Negative swap and commission are taken into account during calculations. The function returns the value of the negative swap and commission in points, and considers this when working with breakeven and trailing stop.
Note: if your broker has a floating spread, commission is calculated and set during the operation of the breakeven and trailing stop functions, but the spread may increase, leading to additional loss points. This is not a calculation error!
Also, note that when a swap occurs, the EA recalculates the breakeven line and sets new stop loss levels is the server allows it (restriction on the minimum Stop Level of your broker). If the server does not allow setting breakeven and returns the minimum stop level error, the EA will be unable to modify the position and additional loss points may be received.
In order to avoid losses when using accounts with commission and when receiving a negative swap, it is recommended to increase the distance of the breakeven or trailing stop.
The breakeven level (LevelWLoss/LevelWLossMANUAL) can be calculated manually, taking the commission into account.
For example: commission for opening and closing position = 2 USD (EURUSD) per 1 lot. So, in order to cover the loss on the commission, it is necessary to set LevelWLossMANUAL = 2 (points) + 1 (confirming) = 3 points.
Thus, the EA sets breakeven to +3 points, which in turn will cover the loss on the commission.
- Added a special mode to the breakeven function through the LevelWLossMANUAL parameter
When LevelWLossMANUAL = 0, the breakeven point is calculated based on the current spread. This allows making the breakeven level dynamic and closing with the minimum profit of 1 spread. If the position's profit increases, trailing stop comes into play.
(This mode worked in previous versions of the expert)
If LevelWLossMANUAL = 1, the EA will set breakeven to 1 point!
Only the negative values are considered in calculation of the additional commission and swap points (positive swap has no effect on calculation)
- Update for the information panel EAPADPRO v2.0;
- The code of the EA has been optimized to receive a large number of signals;
- Increased the EA operation speed;
- Updated work with a small spread;
- Updated the operation of averaging;
- Updated the commission calculation algorithm;
- Updated the average spread calculation algorithm;
- Updated the operation by bars, now the EA is able to perform multiple deals if a signal is repeated on 1 bar.
- Added the ClosingPositionAtASpecificTime parameter = close all positions at a certain day and time.
The variable format: WeekDay/CloseHour:Close Minute
For example: ClosingPositionAtASpecificTime=5/20:00
This means the EA closes all open positions at 20:00 on Friday.
- Added the NoNewPosition_below_MarginLevel parameter - limit opening new trades if the margin is below the value.
- Attention: Typos have been fixed in some parameters. Check your settings if you changed them.
Fixed an error with detection of stop loss and take profit when using manual settings.
- Increased the algorithm processing speed towards performance and receiving signals.
- Added the SecondsToRefresh parameter to the EAPADPRO block - refresh rate of the information on the chart (default is 10 seconds). This is done to reduce the CPU load.
- Added the Set_StopLoss_to_the_next_profitable_position_level option. When enabled, this option monitors the open positions and transfers the stop loss to the next profitable levels. If the EA opens a BUY order, but the price moves against the position, 3 averaging positions are opened at the lower levels. Then, the price moves in the direction, but does not yet touch the middle line to activate the trailing stop. And if the price passes the opening level of lower position 2, the new option activates transferring the stop loss of the lowest position to the breakeven level. And if the price passes the level of the lower position 3, then the stop loss of the first position will be equal to the opening level of the position 2. And the stop loss of the position 2 = opening price of this position, and so on. If the price touches and goes down, the 2 positions will achieve breakeven and profit. Then the EA opens the averaging positions according to the algorithm again. But 2 profitable deals will be fixed.
- Fixed the breakeven error that occurred in accounts where the stop level = 0.
- Added the automatic spread level function. On accounts with commission, the EA may set too small levels due to the small spread. At the same time, the "Low" message will be displayed in the EAPADPRO dashboard. This function protects from using the EA on a small spread and allows to neutralize the difference between "normal trading" and trading on the accounts with the "small spread".
- Added support for the deposit currencies for the Autolot function, which are different from EUR USD RUB
- Added the RiskRate parameter - the exchange rate of your currency against the USD. The default RiskRate = 0 means that the EA will attempt to find the correct exchange rate in the "Market Watch". For the autolot to work adequately with all currency pair, it is necessary to "Show all" currency pairs in the "Market Watch".
Global update 2017
- Improved the signal detection system. Fully revised the algorithm for obtaining signals.
- Fully revised the function for determining the average spread. Changed the default value of the TimeToCheckAverageSpread parameter to 80000 (80 seconds) for determining the average spread
Note: During the first TimeToCheckAverageSpread/1000 seconds the EA does not trade, but collects information!
This done to average the floating spread of your broker and to avoid false signals during significant fluctuations in the spread values.
This option is disabled for fixed spreads.
- The DistanceMANUAL parameter has been renamed to AverageDistanceMANUAL;
- Updated the calculation of averaging and the MaxOrders parameter for hedging accounts.
- Algorithm for signal calculations will be disabled when the trading time (Time Traiding) is disabled in order to increase the testing speed of the EA.
- Modified the TrailingStep parameter. If TrailingStep =0, the TrailingStep = TrailingStop.
This means that the trailing stop modification step will be equal to the trailing stop level in spreads.
- Removed timer from the EA code, due to the unstable operation of the timer.
- When using trading by time, the calculation of the signals logic is stopped at non-trading time in order to increase the algorithm operation speed.
- Added the ReverseSignal parameter - reverses the strategy signals when enabled.
Note: When enabled, the МА filter is also reversed
- Added the CloseByMa parameter - when this parameter and the MA filter are used, the positions opened not based on the MA trend will be close
Note: if the position has averaging positions open, those positions will not be closed.
- Added support for rouble accounts for calculation of the automatic lot in DynamicLot
- Added parameter to manually set the distance for the TimeOpen signal:
DistanceTickMANUAL - set the signal distance in points.
DistanceTickMANUAL has a higher priority than DistanceTickSpred
- Added the EAPADPRO information panel
Details on the panel in our blog: http://www.expforex.com/publ/eapadpro_novyj_sovremennyj_informacionnyj_blok_dlja_nashikh_ehkspertov/6-1-0-153
Moved the technical information on the strategy to the Strategy block. Its details are not disclosed. This block helps in studying the market and subsequent signals
Added commission and swap auto calculation to the trailing stop and breakeven functions.
Now, trailing stop triggers only when a position has "repaid" the charged commission.
Added ClosePosifChange parameter - close an opposite position if a reversal signal appears.
Attention: Enable this parameter with caution and only when necessary. When enabling the parameter, the averaging algorithm stops working correctly!
Limiting losses and profits per 1 day\week\month
Limiting LimitFor - limit type day\week\month
LimitForLosses - limit by profit
LimitForProfits - limit by loss
LimitType - limit type by USD, points, % of a deposit
ClosebyLIMITING - close EA trades when exceeding a limit
UseCurrentProfit - take the current profit/loss into account when calculating the limit
The function allows disabling the EA operation if the EA reached a certain profit\loss in deposit currency per day\month\week. The subsequent EA operation occurs the next day\week\month.
For example, LimitFor=DAY LimitForProfits=1 Closing by total profit = $10
You can also select LimitType for calculations. In USD, points, % of an account balance.
If you need to close and remove all trades performed by the EA, set ClosebyLIMITING = true in case the limits are exceeded.
The UseCurrentProfit parameter prohibits or permits taking the current floating profit\loss for this EA into account.
Added parameter for selecting the trading direction:
new parameter "typeorder" - type of trading:
- Only Buy;
- Only Sell;
- Both Buy and Sell;
Added parameters for filtering deals based on MA:
MethodFilterMa - MA METHOD;
TFFilterMA - TIMEFRAMES;
Added the 0 spread condition - The EA will not trade if the broker spread = 0.
The spread of some brokers may decrease to 0, which leads to incorrect calculation of averaging.
If the spread decreases to 0 during trading - the EA waits for the spread to increase.
Updated default settings.
Changed the algorithm for reducing the parameters to the minimal stop. If the parameters are specified in the manual mode.
Added the lot value for a future position calculated based on the chart's autolot.
Added the FontSize parameter - font size for a text on a chart.
Fixed modifying take profit for buy positions when smoothing in case a new take proofit is less than the previous one (only for the settings without the total profit trailing).
Added the options:
MaxSpreadToNotTrade - maximum allowed spread
MinSpreadToNotTrade - minimum allowed spread
Modified the algorithm for trailing a series of positions:
In case of a floating spread, a distance of trailing stop is checked before modification, and a stop loss is set only if the future stop loss price is more beneficial than the average price of the position series.
HoursSleepEaAfterStopLoss = 0 - number of hours of sleep after closing by Stop Loss in the red;
MinTimebeforenextAverage = 5 - Min Time in minutes for next step for averaging
The minimum number of minutes until the next opening of an Averaging order! Useful for large candles, when a few averages are opened on a single candle. Thus, we limit the following opening by minutes;
SecondsSleepEaAfterClose = 360 - number of seconds after the last closed deal, pause before opening the next signal;
AveragingbyFilterMA - set an averaging order only if Filter MA shows the same direction as the direction of the transaction
(If you want to open an averaging order and MA is above a buy price, the averaging order is not opened).
Added feature that allows you to trade in two directions simultaneously.
Trade_by_BUYSELL_Separate - when you turn on this feature, two directions (BUY and SELL) are traded separately from each other.
For information on the expert panel added Min \ Recommended line:
It shows the minimum and recommended deposits for the trading robot on the current currency pair.
The minimum deposit is calculated using the formula - Fixed lot, the number of averages, the size of stop loss, and the average monthly movement of the currency pair.
This is the minimum deposit that is necessary for the EA on this pair to stop out.
Recommended Deposit - this is a deposit, which is necessary for the EA to withstand the drawdown in case of a stop loss.
These calculations are approximate, and are totally dependent on the current currency pairs, stop loss, lot, and leverage.
Always replenish the deposit slightly more than recommended by our calculations.
On the information panel, added a string Tick In TimeOpen - average number of ticks per unit of measurement TimeOpen;
On the information panel, added a line Point In TimeOpen - average number of points per unit of measurement TimeOpen;
On the information panel, added a line Point In mc - total number of points for elapsed time.
Added the TrailingStepa parameter - trailing stop step used by the EA to follow the price.
Averaging can now be disabled
if DistanceAverageSpred=0 and DistanceAver=0
Fixed bug with an average line on a chart.
Fixed bug in averaging when using the DistanceAverageSpred_Diferent parameter.
Parameters DistanceAverageSpred_Diferent can be used as an enumeration of averages in points, if DistanceAver(manual adjustment in points) is not equal to 0.
Parameters DistanceAverageSpred_Koef can be used as an averaging in points with a multiplier, if DistanceAver(manual adjustment in points) is not equal to 0.
Now an average line is shown for an open position with averaging applied, it shows the average price.
Added the trend filter.
Algorithm for trend determining: location of MA towards the price.
The MA period can be set in the PeriodFilterMa parameter.
MA is determined according to TF = M1
Setting the maximum number of position = 5 - updated.
If open 5 positions at the same time, closing one of them by stop loss does not open a new position.
Maximum series of losing trades = 5.
Added comission and swap calculation for position smoothing.
The test version for accounts with comission.
The system has been completely revised based on the gained experience. All settings have been made as close as possible to the functionality of TickSniper PRO MT5.
Added new averaging parameters:
DistanceAverageSpred_Koef = Koef to next step for averaging
- set spread increase/decrease ratio for trade averaging from the initial DistanceAverageSpred value.
DistanceAverageSpred_Koef = 2, DistanceAverageSpred = 50: the first averaging trade is performed at the distance of 50 current spreads. The second one is performed at the distance of 100 current spreads!
DistanceAverageSpred_Diferent = steps for averaging separated by commas
- set averaging values in spreads separated by comma.
"10,20,50,50,20,10" means that the first averaging trade is performed at the distance of 10 current spreads, the second one - 20 spreads, the third one - 50, etc.
If three values of "10,20,30" are specified, all trade distances after the third trade are equal to 30.
Added open parameters for manual setting:
TakeProfitL=TakeProfit 0 - Autoset
Distance=Distance of Averaging 0 - Autoset
TrailingStopa=Distance TrallingStop 0 - Autoset
StopLoss=StopLoss 0 - Autoset
LevelWLoss and LevelProfitMANUAL
If you want to set fixed values, for example, for a stop loss, you may set StopLossMANUAL = 1 000 points.
Or if you want to set fixed values of the averaging distance, you may set DistanceMANUAL = 100 points.
Added the following blocks:
Working at a certain time.
Moving positions to breakeven.
Working by the average spread TimeToCheckAverageSpread - number of milliseconds of the averaged spread.
Significantly increased the speed of the EA testing in the strategy tester.
Fixed too long stop loss received during a too high spread leap (if the spread is increased 10 times, the stop loss is too big).
Fixes reported bugs.
Added the info panel to the chart the EA is launched at. Displayed signal volume and power.
1. Updated the system for closing by the total profit and added the profit trailing function.
2. Loss-making deal cover system has been disabled by default!
3. Revised and enhanced the averaging system.
4. Slightly changed the system's trailing stop.
5. The system has been completely recompiled for the new МТ4 terminal build.
The number of spreads of the most loss-making deal, at which the system looks for other orders for closing the most loss-making position. If 0, MaxLossPoss_in_unit is used
The new profit trailing function. It has been implemented at the request of our clients. In this case, the profit is fixed with some correction. As soon as the profit has reached the specified value, the Expert Advisor saves the current profit status and trails it following the profit.
This parameter looks for the most loss-making position among all positions in the terminal (magic, positions and their direction can be configured in the settings separately). After that, the Expert Advisor uses the complex search of the remaining positions to calculate the series of orders, which can cover the loss, and close them.
Установил советник 9-го мая. По сегодняшний день - великолепная система! Огромное спасибо автору! Впервые за десяток лет не переживаю за депозит! Браво! Единственное небольшое замечание (может быть я просто не понимаю логики советника) - стоплосс далековато от цены и не подтягивается за нею вплотную, на этом теряется достаточно большая доля прибыли. во всём остальном - отлично!!!