Exp THE X FULL
これは標準的な指標に取り組んでいるMetaTrader 5のための万能自動エキスパートアドバイザーです。 UniversalEA
MetaTrader 4端末の The X EAをダウンロードすることもできます。
- Ma - 移動平均
- MACD - 移動平均収束/発散（MACD）
- STOCH - 確率オシレータ
- RSI - RSI
- CCI - コモディティチャネルインデックス（CCI）
- WPR - ウィリアムズパーセントレンジ（WPR）
- BB - ボリンジャーバンド
- 封筒 - 封筒
- ワニ - ワニ
- OsMA - オシレータの移動平均（OsMA）
- AO - 素晴らしいオシレータ（AO）
- IndSigToTrade - 信号タイプの選択。
- TF_IndSigToTrade1 - 信号のタイムフレームの選択。
- Signal _ Reverse - メインインジケータ信号を反転します。
- ClosePositionifChangeOWNSignal - 主信号が変化したときに反対側の位置を閉じる。
- OWNSIGNAL_shift - 信号の取得元：0 - 現在のものから、1 - 最初の閉じたものから、2 - 2番目の閉じたものから。
- FILTER_IndSigToTrade2 - FILTER _ IndSigToTrade6 -濾過のための信号の種類の選択（5つのフィルタを同時に使用することができます）。
- OpenBarControlOnly -バーを開くときにポジションを開くだけです（オペレーションモードのエミュレーション "Open bars only"） 。
- TypeTradeBUYSELL - 開くポジションタイプの選択（BUYSELL、OnlyBuy、OnlySell）。
- ReverseSignal - true - 戦略シグナルを反転します。
- ONlyOnePosbySignal - ポジションを1つだけ開く： 買いまたは売り、あるいはその両方。
- OnePosPerDirection -方向ごとに1つの位置を持つことを許可します（売ります） 。
- OnlyOnePositionPerMagic - （アカウント全体の）マジックナンバーでポジションを1つだけ開く。
- OnlyAlternateSignals -代替ポジションタイプ：BUY SELL BUY SELL ;
- MAX_BUY_POSITION -MAX_SELL_POSITION - 買い売りポジションの最大数。
- ClosePosifChange - 反対の信号が現れたときにポジションを閉じます。
- MaxSpreadToNotTrade - MinSpreadToNotTrade - EA操作の最小/最大許容スプレッド。
- StopOrderUSE - 未決注文または指値注文を使用します。false =オープンポジション。
- StopOrderDeltaifUSE - 未決注文の距離
- たくさん - 固定ロット。
- DynamicLot - 動的ロット。
- LotBalancePercent - 動的ロットに対するデポジットのリスク％。
- Martin - 失ったものに続く取引のマーチンゲール比率、1に設定されていない使用。
- VirtualStops、StopLoss、TakeProfit 。
- PARABOLIC SARによるトレーリングストップ
Hamster Scalping is a fully automated Expert Advisor with no use of martingale. Night scalping strategy. The RSI indicator and an ATR-based filter are used for entries. The advisor needs a hedging account type Real operation monitoring as well as my other products can be found here: https://www.mql5.com/en/users/mechanic/seller General Recommendations The minimum deposit is $100, use an ECN account with the minimum spread, default settings reccomend for eurusd m5 gmt +3 . Skype is here . Te
Smart Robot MT5 is an Expert Advisor based on Scalping, Elliot Waves and with filters such as RSI, Stochastic that managed and decided with robot smartly. Large number of inputs and settings are tested and optimized and embedded in the program thus inputs are limited and very simple. Using EA don't need any professional information or Forex Trading Knowledge. The EA works with low margin level and thus has low risk. This is Free Version and limitations is : Trade on EURJPY only with lot size
Dark Scalping is a fully automatic Expert Advisor for Scalping Trading and Intraday Trading. Dark Scalping is based on 4 different indicators, Rsi, Ma, Atr and Adx. The expert advisor is able to get a very high-rate of winning trades. Why do you choose a robot ? Backtest ? look at the pictures, Live Trading ? follow the link! https://www.mql5.com/en/signals/571485 The expert advisor was tested from mid-2017 to present on eurusd and other pairs. You can download the demo and test it yourse
Bober Real MT5 is a fully automatic Forex trading Expert Advisor. This robot was made in 2014 year and did a lot of profitbale trades during this period. So far over 7000% growth on my personal account. There was many updates but 2019 update is the best one. The robot can run on any instrument, but the results are better with EURGBP, GBPUSD, on the M5 timeframe. Robot doesn't show good results in tester or live account if you run incorrect sets. Set files for Live accounts availible only for c
"MACD Scalper EA"はすべての通貨ペアを取引するための信頼性の高いダフ屋です。作業時間枠はH1です。 VPSを使うのが良いです。 このアルゴリズムは、MACD、RSI指標、およびローソク足パターンの読み取り値に基づいています。この組み合わせはあなたが利益/損失のより良い比率を達成することを可能にします。 ほとんどの場合、インディケータは横方向の価格変動、つまり上昇または下降（統合）後のコースの安定期間中の取引シグナルを識別するために使用されます。通常、「買い」シグナルは、下のゾーンの短い期間（図では青い線）のスライドが下から長い期間のスライド（赤い線）を横切るときに考慮されます。信号「Ｓｅｌｌ」は、上側ゾーン内でより小さな周期で滑動するときに、より大きな周期で上から下に交差するときに考慮される。時間枠（1つのチャート要素の期間）が長いほど、誤ったシグナルは少なくなります。良い結果は、それほどではありませんが、毎週と毎日のスケジュールによって提供されます。小規模の時間スケールでは、相対的な価格のボラティリティは高くなります。
This is a half scalping system that analyzes the market using a transmission function. The system can be scalping or not depending on the "takeprofit" and "stoploss" parameters. This Expert Advisor is intended for trading on EURUSD,GBPUSD,EURCHF,EURAUD however it can work on other currency pairs. You should use timeframe M1 for trading. Parameters Bobra Adept Mode_trade (Market_Oders) - type of order placed. type_order (ORDER_FILLING_FOK) - type of order filling. Magic (123) - magic number. Us
Santa Scalping is a fully automated Expert Advisor with no use of martingale. Night scalping strategy. The SMA indicator filter are used for entries. This EA can be run from very small accounts. As small as 50 EUR. General Recommendations The minimum deposit is 50 USD, default settings reccomend for eurusd m5 gmt +2 . Please use max spread 10 if you will not have orders change it to -1. Use a broker with good execution and with a spread of 2-5 points. A very fast VPS is required, preferably w
The Expert Advisor recommended for trade on EUS/USD M5. It is based on free indicator "UpdatedRSI". The robot calculates the market entry/exit points based on signals from indicator "UpdatedRSI". The trading volume for opening a position depends on results of previous trades. It is possible to limit the amount of risk (the AutoMM parameter). It uses an efficient trailing, which automatically adjusts the take profit and stop loss parameters to minimize losses. It is also possible to set the maxi
https://youtu.be/ESyXnmwdT9U <---- CHECK OUT HOW IT TRADES VISUALLY HERE C urrency - Eur/Usd(Can work on others but might need tuning) Candle Time - 5m for best results(works on multiple timeframes) Recomended Broker - IG(works on most) Leverage - 1:200 Fully Automated EA for Longs and Shorts You can adjust to whichever RSI period and value you want. -RSI PERIODS & VALUES WHEN THEY CROSS ARE ALL ADJUSTABLE IN THE INPUTS & THE TAKE PROFIT AND STOPLOSS OF HEDGING LONG AND SHORT TRADES. Def
This is a half scalping system that analyzes the market using a transmission function. The system can be scalping or not depending on the "takeprofit" and "stoploss" parameters. This Expert Advisor is intended for trading on EURUSD,GBPUSD,EURCHF,EURAUD however it can work on other currency pairs. You should use timeframe M1 for trading. Parameters Bobra Stable Mode_trade (Market_Oders) - type of order placed. type_order (ORDER_FILLING_FOK) - type of order filling. Magic (123) - magic number
CAP Zone Recovery EA is your tool to turn losing trades into winning trades by using a smart "back-and-forth" hedging mechanism. I call it the "Never Lose Again Strategy". Let the price move to anywhere it likes - the awesome CAP Zone Recovery EA will make profits out of the situation. Guaranteed! The secret behind this amazing EA is a famous trading algorithm known as "Zone recovery algorithm" or "The Surefire Forex Hedging Strategy" . CAP Zone Recovery EA is extremely easy to use. You jus
This is an expert that uses MACD and Bollinger Bands as the main recipe of an operation. The main objective of this algorithm is to recognize good price movement reversal zones. Signals: Bollinger Bands: occurs when price reaches/passes a certain distance between the mid-band and the external band. MACD: Histogram above Signal Line, and both are positive, Sell signal. Histogram below Signal Line and both are negative, Buy signal. Confirmation Signal: can be either Bollinger or MACD sig
Max ScalperSpeed MT5 is a fully automated expert advisor. This system has been developed to improve the efficiency of generating more returns. Rely on scalping trading strategies and recovery strategies with appropriate trading frequencies, and also able to work well in all market conditions, whether trend or sideways, able to trade full time in all conditions. Enable or disable news filtering according to user needs. Added the function of automatic risk management control parameters, which us
BB King EA MT5 BB King Expert Advisor uses a reversal strategy using Bollinger Bands and short term trend detection. It is designed to be easily used by newbies with very few parameters. Please try the demo and leave feedback. The default version is optimised for EUR/USD M1. Set files for other pairs will be made available when ready. Minimum deposit : $100 Lots : use 0.01 per each $100 Risk Management Each order is placed with a Stop Loss and Take Profit. These are controlled by th
RE-LAUNCH PROMO: 1 COPY LEFT AT 350$! NEXT PRICE -> 450$ (final price: 490$) !! THE NEW VERSION (2019) IS THE RESULT OF 3 YEARS LIVE FORWARD TESTING !! MOMENTUM EA is a price action swing system which does 2 things: First strategy will hunt down strong price movements. It will then start opening multiple trades in the direction of that trend. The trades will either hit Take profit or Stop loss, or the EA will close the group of trades when it exceeds a certain profit. It is NOT a grid system
Exp-TickSniper - high-speed tick scalper with auto-selection of parameters for each currency pair automatically. Do you dream of an adviser who will automatically calculate trading parameters? Automatically optimized and tuned? The full version of the system for MetaTrader 4: TickSniper scalper for MetaTrader 4 The EA has been developed based on experience gained in almost 10 years of EA programming. The EA strategy works with any SYMBOLS. The timeframe does not matter. The robot is based o
EURUSD DECODER EA is a fully automated mid-term, medium-risk expert advisor. Adaptive price pattern analysis is used to identify potential trade entries and exit. The EA does not use any unfair money management practices like grid and martingale. Each position includes a stop loss and all open positions are monitored by an advanced loss control algorithm, which decides when to close profit and when to accept loss. Before you buy all of my product please be aware of the risks involved: 1) Ple
DevilFish is a fully automatic, multi-currency trading system. Trading is based on explosions of price activity. Big profits, low drawdowns and good hedging results. Minimum Deposit: $ 150. No configuration required. Accounts: Netting, Hedging. Currency pairs: EURUSD, GBPUSD, AUDUSD, NZDUSD, USDCHF, USDCAD, USDJPY. It works on hourly bars and is not demanding on the quality of the Internet connection. Works in the strategy tester in the "open prices only" mode. Does not use the super short tra
Smart Robot MT5 is an Expert Advisor based on Scalping, Elliot Waves and with filters such as RSI, Stochastic that managed and decided with robot smartly. Large number of inputs and settings are tested and optimized and embedded in the program thus inputs are limited and very simple. Using EA don't need any professional information or Forex Trading Knowledge. The EA works with low margin level and thus has low risk. Trading Strategy : Smart Robot can trade on all symbols and all time fram
The Heiken Ashi VPS is a proposal to trade using Heiken Ashi Indicator. It is designed to kept a single order all the time. And use the stop loss as a direction switch. EA have 2 types of stoploss, first stoploss and interval level stoploss. The first stoploss using the lowest level of the market level at the time by using same shift as interval level stoploss. Interval level use the low or high of Heiken Ashi Indicators. I add the risk and lots as input. In the case of risk value read as zero E
Grid King is a revolution in grid trading. The main focus when developing the EA was safety, by eliminating the margin-call risk which is usually associated with most grid systems on the market. It also strives to achieve much higher returns than the average grid system, by spreading risk amongst multiple pairs and strategies which all have a limited effect on the account-equity. Where almost all grid systems will blow your account when things get bad, Grid King will only take a small loss an
Ilan for MetaTrader 5 Due to using the virtual trades, trading in both directions (buy and sell) simultaneously became possible. This allows users to adapt the popular strategy for the net accounting of positions applied by MetaTrader 5. Expert Advisor Settings The Expert Advisor setup is simple. However, all the important settings of the strategy are available for adjusting. Available tools: Unique MagicNumber for identification of trades; Trade direction option ( Trade direction ): buy on
Ilanis is an Expert Advisor for stock trading, it can be used for trading on Forex and other markets, including commodities, metals and index markets. To determine the market entry, the EA uses the modern and ultra-light adaptive indicator FourAverage. Principle of position maintaining is similar to that of the popular Forex robot Ilan, using averaging. But unlike Ilan, Ilanis uses an accurate entry into the market. The robot pays a lot of attention to position control, if the price goes in the
The Expert Advisor helps reduce the account drawdown. To do this, the losing deal is split into multiple small parts, each of these parts is closed separately. The EA can interact with other experts. For example, when a certain drawdown is reached, Open Lock can disable the other expert and start working with its orders. Open lock for MetaTrader 4 is available here The algorithm of the EA uses counter transactions and a large number of open positions, therefore, need to use it on a hedge account
Expert Advisor Duplicator repeats trades a preset number of times on your account MetaTrader 5 . The following functions are supported: custom lot for copied trades, copying Stop Loss, Take Profit, use of trailing stop and much more. It copies all deals opened manually or by another Expert Advisor. It is possible to increase the lot size of the signals. Copies signals and increases the lot from signals! MQL5 Signal Lot Increase Note : This is not a copier for trade between terminals. A trade co
Indicator specifications: -Based on ATR -Multi-timeframe. -Can be integrated in Expert Advisors(has buffer). -works on all time frame all kind of markets. -High accuracy. -For greater efficiency can optimize its settings. -You do not need to see the signal, you can enter the trade by hitting the price on the upper and lower bands. Version MT4: https://www.mql5.com/en/market/product/53508 Push Notification To get notification on your smart phone enable this input Email Alert
PROMO: ONLY 10 LEFT AT $1299! Next price: $1499 Price will be kept high to limit number of users for this strategy. This EA starts trading at the open of London (UK) Session . It is based on analysis of advanced statistical distributions combined with short to medium term reversal patterns which have mean-reversion attributes. The EA has smart features for the Grid and money management. The EA is adaptable to be used by both experienced traders and beginners. The EA includes several
This robot is designed for major currency pairs and trades three strategies. 1- swing, 2- gap, 3- support and resistance. It uses the algorithm for analysis of price data and finds the best parameters. Trades are filtered by results of analysis of daily and monthly chart for the last 12 periods. The Swing strategy can be used on TF H1 or M30, or also on M15 or M5 (more trades but higher risk) The Gap strategy is recommended on M30 or H1 The Sup./Res. strategy is recommended on M30, H1 or H4 Defa
Indicator-free Price Action Trading System Surfing EA - long-term trading strategy that looks for an signal candle to catch a trend wave. Stoploss / Takeprofit / Split / Trailing levels based on a signal candle body size. Surfing EA MT4 >> https://www.mql5.com/en/market/product/49969 Features Indicator-free Relative levels Hard Stoploss / Takeprofit Manual / Risk / Auto volume Split system / Trailing Stop (optional) Spread / Time control 2017-2020 99% tick quality optimized Moni
Adertha is a MetaТrader 5 trading robot. Trading Strategy The strategy of this expert is based on the technical analysis methods developed by John Tirone, described in the book "Classical Technical Analysis as a Powerful Trading Methodology", as well as the cyclic oscillator by Doug Schaff. Requirements for the EA operation: Minimum deposit: $200 or above; 5(3) -digit quotes with spread size of 0-5 (0-50 for 5-digit) points. Leverage: 1:300 or higher; Quotes: EURUSD ; Recommended account type
We made a very important and difficult decision regarding The X/The xCustomEA for MetaTrader 5 and the use of the multi-currency mode (PAIR1-PAIR12)
Due to the fact that the use of different methods of multi-currency operation does not bring 100% accuracy in obtaining quotes,
we were forced to turn off this mode.
We explored many topics on the forum about the problem of using multi-currency mode in MetaTrader!
Each method of implementing a multi-currency trading mode has its pros and cons!
But in each of these methods there are Cons: Reward resources on computers, skipping ticks, looping the main trade flow.
We made the decision: Remove the multi-currency trading algorithm in The X/The xCustomEA to eliminate trading problems on real charts!
We apologize for any inconvenience caused.
IMPORTANT: As soon as we find the ideal solution for working in multi-currency mode (PAIR1-PAIR12) we will turn on these parameters again, for the convenience of taming and optimization.
IMPORTANT: On a real chart, I recommend installing an adviser on each chart of a currency pair separately from each other (do not use PAIR1-PAIR12)
If the comment is longer than 12 characters, then the advisor will trim the extra characters.
Attention! For the EA to work correctly, set a comment no longer than 12 characters.
Not Right: Expforex The X Set # 12345
(Например закрытие в 22:49 а ТФ = H1 )
-- UPDATE: Bar - trade in the direction of the bar
New Parametr Min_Points_of_Bar_OpenClose = 100
If candle Close is above of 100 points the candle Open (Bullish candlestick) - BUY
If candle Close is below of 100 points the candle Open (Bearish candlestick) - SELL
if Min_Points_of_Bar_OpenClose 0 same old version
- if true, the Advisor starts the modification only when the position is gaining profit to Breakeven (setting stop loss on the break-even point) + TrailingStop profit points.
- if false - TrailingStop starts working immediately after opening a position and making a profit of 0 points and leaving a position as a profit.
In other words: IfProfTrail = false, then the trailing stop starts working immediately after the position is in profit.
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.!
Запрет на вывод Print в оптимизаторе
1. Function ControlNewBarforSIGNAL Changed:
ControlNewBarforSIGNALType = 1 = True smallest TF of the settings: New mode!
The EA selects the smallest TimeFrame, which was set by the parameters TF_IndSigToTrade1, FILTER_TF_IndSigToTrade1, FILTER_TF_IndSigToTrade2 ....
In this mode, the EA does not check the signal on the currently set TimeFrame, but on the TimeFrame for receiving a signal from indicators!
This mode is useful for those who use TF_IndSigToTrade1, FILTER_TF_IndSigToTrade1, FILTER_TF_IndSigToTrade2, other than Current.
ControlNewBarforSIGNALType = 2 = True current bar of the current TF: Old mode!
In this mode, the EA checks signals every new bar of the current TimeFrame!
If you use TF_IndSigToTrade1, FILTER_TF_IndSigToTrade1, FILTER_TF_IndSigToTrade2 other than Current, the results on each TimeFrame may be
We advise you to install the adviser on the TimeFrame M1!
ControlNewBarforSIGNALType = 1 = False: Do not use the control of the new bar to determine the signal!
Attention: When off, the EA checks signals every new tick! There may be delays in tapping and optimization!
2. Added variable ControlNewBarforOpenbySignal:
ControlNewBarforOpenbySignal = true: Old mode! Open positions on a signal only every new current bar of the current TimeFrame!
The EA opens positions, if there is a signal, only when a new bar of the current TimeFrame arrives!
ControlNewBarforOpenbySignal = false: New mode! Open positions on a signal every new bar from the signal Timeframe!
The EA opens positions, if there is a signal, immediately upon detection of a signal.
This mode is useful for those who use TF_IndSigToTrade1, FILTER_TF_IndSigToTrade1, FILTER_TF_IndSigToTrade2, other than Current.
When two different directions BUY and SELL are in operation and averaging works, then BUY does not allow to modify the take profit for SELL positions!
Starting the calculation of the average spread only when the user uses at least one parameter for the average spread.
Added DistanceMartinAdditional - Coefficient of distance for additional order opening.
Added MinTimebeforenextAverage - Minimum time to the next averaging in minutes.
If the positions have a different take profit, then the expert sets a single total take profit.
- EAPADPRO v25 update
- 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;
- Added a control unit and control the speed of the quotes and the speed of testing.
- Added block output table open deals and positions.
Added new variables:
- LotAdditional - additional lot for averaging a position for opening against the trend.
- LotAdditionalOpening - additional lot for an additional position for an additional opening by trend.
Update panel EAPAPDPRO v21:
-Add information about the ban on trade for various reasons
Now you can set the maximum number of positions by magic number on the entire account.
For example, OnlyOnePositionPerMagic = 5 - means that a maximum of 5 positions can be opened on the account by the magic number.
Fixed TrailingStop error when using the parameter in spreads!
Added option SeparateBuySell - Separate calculation and closing of positions in two different directions BUY and SELL.
This function separately closes two directions for total profit or loss.
Actual, If ONlyOnePosbySignal = false and OnePosPerDirection = false.
Or any settings that allow you to open more than one direction and more than one position in the direction.
The algorithm for the function is taken from our automated tickSniper scalper sales advisor.
Added parameters to the Stops options block:
- TimeToCheckAverageSpread The number (milliseconds, 20,000 = 20 seconds) for determining the average spread
- AutoCheckLowSpread Auto-determination of the low spread.
Automatically determines the spread too low (Less than 1 point) and leads all system settings to the lowest possible spread.
Allows you to protect the system from reducing the spread on the broker.
How to use:
In order for the parameter calculated in points to be calculated from the average spread of the currency pair, you need to specify the parameter with sign -
StopLoss = 2000 means that StopLoss of each position will be 2000 points!
StopLoss = -100 means that StopLoss of each position will be equal to 100 * Average spread, which was calculated by the advisor for TimeToCheckAverageSpread milliseconds.
If the spread is 20 points, then stop loss at the time of opening will be 2000 points.
With a floating spread, this value always changes.
The parameters available for setting in the spread mode: Distance, DistanceAdditionalOpening, StopOrderDeltaifUSE, StopLoss, TakeProfit, TrailingStop, TakeProfitALL, StopLossALL, LevelWLoss, LevelProfit.
The average and current spread, as well as the level of the Auto Spread Low spread will be displayed in our panel in the section Strategy Info
In the Limiting losses and profits block, a new type NOTIME was added to the LimitFor parameter , when using this type, the adviser checks the limits during the time from the last close!
Attention: works only when using ClosebyLIMITING = true!
This type allows you to take into account closed positions and current positions since the last closing of the total limit. It does not count for a day, a week, but for the period between the last closing according to the terms of this block and the current time. When closing by Limits, the counter sets the current time.
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.
Only_Current_Symbol_Magic - Counts the drawdown by the current symbol and the current magic number;
Only_Current_Symbol_ALLMagic - Counts the drawdown by the current symbol and any magic number;
All_Account - Allows for drawdown of the entire account.
In the indicator Mooving Average, the selection of the price type and the averaging method for the two MAs
Parameter TypeTradeBUYSELL was updated.
Now this parameter participates in functions, including: "Closing on the total profit and loss", averaging, additional opening, trailing stop,break-even.
The filter parameters are added to the averaging and additional trend opening blocks.
The Expert Advisor checks the indications of the selected indicator (Filter) and allows or forbids the opening of new positions of a averaging or additional opening on a trend.
The following options are available: Selection of the indicator for the filter, Timeframe, Reverse signals
- МТ5: When using the multicurrency mode (specifying multiple currency pairs in the EA):
When using the function of closing by the total profit and loss, the EA will count and close all positions of all currency pairs specified in the settings (PAIR1-PAIR12)
- Added the data to the information panel:
When using the "CloseALL when Profit or LOSS options" block, the panel will display the data on the current profit and loss, as well as the values of the total trailing, if enabled.
- When opening a position, the information on the signal is output to the log!
Attention!!!! The parameters have been renamed!
Update and check your *.set files
These are forced measures:
1. to make the setting files uniform for the two terminals.
2. to make the instruction the same for the two versions.
Sorry for inconvenience!
- МТ5 version:
- МТ4 version:
- When using OpenBarControlOnly, the virtual stop loss and take profit will be executed on each tick.
- Added the check of conditions for setting stop loss and tale profit to the function:
Stop loss for BUY orders can be placed only below the current price.
Take profit for BUY orders can be placed only above the current price.
Stop loss for SELL orders can be placed only above the current price.
Take profit for SELL orders can be placed only below the current price.
The CloseAllTradesByOutOfTime function:
Division into type of closing by expiration of trading time:
- Not Use = do not use the function
- Positions and Orders = close positions and pending orders
- Only Positions = close only positions
- Only Orders = close only pending orders
Added new signals:
19: Trading based on Average Directional Movement Index by Welles Wilder (available only in the MetaTrader 5 terminal)
The indicator signals are similar to signals from the ADX indicator;
20: Trading based on Money Flow Index
Money Flow Index (MFI) indicates the rate at which money is invested into a security and then withdrawn from it. Construction and interpretation of the indicator is similar to Relative Strength Index with the only difference that volume is important to MFI.
The indicator signals are similar to signals from the RSI indicator;
21: Trading based on Fractals
Signal for opening positions is generated when the level of the last fractal is crossed:
When the price crosses the last upper fractal upwards, a BUY position is opened;
When the price crosses the last lower fractal downwards, a SELL position is opened;
Filter: similar to the main signal:
If the price is higher than the last upper fractal, only BUY positions;
If the price is lower than the last lower fractal, only SELL positions;
Attention! A fractal can be drawn at least on the 2 closed bar and can be drawn in the past in an unlimited number of bars back. Consider this when analyzing the signal!
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 LevelWLoss = 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 LevelWLoss parameter
When LevelWLoss = 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 LevelWLoss = 1, the EA will set breakeven to 1 point!
Some parameters have been renamed:
LotBalancePcnt has been replaced with LotBalancePercecnt
- Optimized the EA code;
- Increased the EA operation speed;
- Updated the operation of averaging;
- Updated the commission calculation algorithm;
- ControlNewBarforSIGNAL: checking the indicator signals only at new bars (without checking every tick), works only when OWNSIGNAL_shift>=1 and IndSigToTrade!=NoSignal (at NoSignal the EA checks the filter values every tick)
When ControlNewBarforSIGNAL=true, the optimization speed is increased by 1.5 times
- Added the ClosePosition_After_X_Minutes parameter: close positions after the specified number of minutes.
The EA also checks if the CloseChangeOnlyInProfit parameter is enabled: close only the profitable positions.
- Added the OnTester_Custom_max variable to the Tester block, which allows writing a custom criterion for genetic optimization.
More on testing results: https://www.mql5.com/en/docs/constants/environment_state/statistics
Written as a formula. For example: OnTester_Custom_max="STAT_PROFIT*STAT_TRADES/STAT_EQUITY_DD"
Make sure to specify the variable names as in the reference!
- Added 2 types of virtual pending orders to the order type selection (Positions, StopOrders, LimitOrders):
Use Virtual Stop Orders: place a virtual pending stop order at a distance of StopOrderDeltaifUSE points;
Use Virtual Limit Orders: place a virtual pending limit order at a distance of StopOrderDeltaifUSE points;
Attention: only works in the visualization mode or on a live chart, only when the terminal is switched on.
Does not work in optimization mode!
Added the new parameter ReInstallStopOrdersNewSignalAppears - re-set pending orders if a new indicator signal arrives. It allows removing the current BUYSTOP pending order and place a new BUYSTOP on a new level after indicators have informed of a new signal.
No Signal option has been added to the main signal.
If selected, the EA will ignore the main signal and will trade based on filters.
When using the main indicator, the signal is generated 'as is' on the current bar.
This means the open signal is regarded a signal completion. If a signal arrives, while the filter does not allow opening a position, then the signal is ignored.
When using No Signal, you can ignore the fact of the main signal completion and follow the filters.
When using the filters, the current position of indicators is regarded as a signal.
Added the OnlyAlternateSignals parameter
It allows opening positions one by one only.
If the last closed position is SELL, the next one can be only BUY!
It is needed to let the main indicator trade in No Signal mode.
Update of ADX Filter
ADX shows the trend strength.
If ADXLevel is 0, DI- > DI+ is used as a permission to sell
If ADXLevel is 0, DI+ > DI- is used as a permission to buy
If ADXLevel is not 0, DI- > DI+ и DI- > ADXLevel is used as a permission to sell
If ADXLevel is not 0, DI+ > DI- и DI+ > ADXLevel is used as a permission to buy
Added new ATR filter.
ATR shows the market volatility.
Trading strategies applying ATR as a filter confirm the current trend.
When ATR grows, this means high market volatility.
Low ATR values means low market volatility.
ATR_period=14 - ATR calculation period
ATRprice=PRICE_CLOSE - price type used to calculate the filter (Close, Open, High, Low...)
ATR_MA_period=1 - number of candles for calculating the Middle line (MA), 1 - the indicator calculates the signal direction from the current and previous bar (depending on the 'shift' parameters)
ATR_MULTIPLIER=1 - ATR ratio, for example EURUSD ATR=0.0020, when using ATR_MULTIPLIER=2; calculation will include ATR=0.0040.
Filter ATR logic:
The price(ATRprice) of the current bar exceeds the price(ATRprice) of the previous bar + (ATR*ATR_MULTIPLIER) = high volatility BUY filter
The price(ATRprice) of the current bar is lower than the price(ATRprice) of the previous bar - (ATR*ATR_MULTIPLIER) = high volatility SELL filter
StopOrderDayToExpiration= order expiration time in days.
0 - ORDER_TIME_GTC - the order will stay in the queue until it is manually canceled
1 - ORDER_TIME_DAY - the order will be valid only during the current trading day
2...X - ORDER_TIME_SPECIFIED - the order will be valid until the specified date
StopOrderBarToExpiration - pending order expiration time in bars.
If StopOrderBarToExpiration=10, and TF = лю1, the pending order will be canceled 10 minutes after it is placed.
Attention: each broker has custom minimal parameter for expiration time.
Added the parameters of total stop loss and take profit to the averaging block.
The stop loss/take profit level is calculated based on the middle line.
TakeProfitALL - the total take profit distance when opening averaging trades.
This option is useful only when AverageUSE is activated.
StopLossALL - the total stop loss distance when opening averaging trades.
This option is useful only when AdditionalOpening is activated.
When opening additional trades or averaging trades, the algorithm for breakeven and trailing stop is activated based on the middle line. The entire series of positions in one direction is calculated from the average level.
VirtualStops - enable the virtual (hidden) levels of stop loss/take profit/trailing stop/breakeven
Completely revised the algorithm of virtual stop loss\take profit\trailing stop\breakeven.
Now all virtual stops are displayed on the chart and are the key level for closing positions.
Data are displayed in the form of lines and written in global variables.
Note: if the stop line is removed from the chart along with the global variables, the virtual closure for this line will not work.
Note: check if your experts and indicators delete lines from the chart and global variables!
Attention: virtual levels are triggered at the current price, after which the closure occurs.
During closing, there may be a few points of slippage!
Note: enabling VirtualStops significantly reduces the speed of testing.
When closing all positions, the EA closes the positions starting from the first opened one.
Added selection of the pending stop/limit order type in StopOrderUSE
Added the signal bar number for the main signal and filter
OWNSIGNAL_shift - signal bar shift for the main signal.
FILTERSIGNAL1_shift - signal bar shift for the filter.
Added a parameter to disable opening positions instead of notifying the user of a new signal.
Show_alert_without_opening_positions - when enabled, the EA will not open a new position based on the signal, but will only notify the user that a new signal has appeared. In this case, all other functions will work in the normal mode.
Added the SaveTPafterTrailingStop option. When enabled, take profit of the modified positions will be saved in its place.
SaveTPafterTrailingStop = false: when trailing stop is active, take profit of the modified position is deleted.
SaveTPafterTrailingStop = true: when trailing stop is active, take profit of the modified position is saved.
Updated the Extra BUY and Extra SELL buttons. The stop loss/take profit specified in the EA settings is now also considered when opening positions.
Updated the MACD filter
When using the MACD filter, the location of the MACD lines relative to the MACD_BUYLEVEL and MACD_SELLLEVEL levels is now taken into account, similar to the signal.
Added ZIGZAG signals
Intersections of ZIGZAG extremums serve as position opening signals.
When using these signals, it is important to configure the shift parameter.
If set to 0, a position is immediately opened towards the intersection of the current Bid price and the latest ZIGZAG extremum.
If set to 1, a position is opened when the intersection is registered on 1 closed bar.
The last extremum is the fixed extremum 1, when a new ZIGZAG segment is plotted starting from that extremum. Intersection of the maximum and minimum point is a signal for opening a position.
The direction of the last ZIGZAG 0 segment is considered to be the ZIGZAG filter.
If OnePosPerDirection= false, then OnlyOnePositionPerMagic=true works like this: 1 position per magic number is allowed;
If OnePosPerDirection= true, then OnlyOnePositionPerMagic=true works like this: 1 position in each direction per magic number is allowed;
strategy of signals from the reference: https://www.metatrader5.com/en/terminal/help/indicators/trend_indicators/admi
this signal can take two types of signals for opening
if ADXLevel =0, then this strategy is used:
Wilder suggests buying when +DI crosses -DI upward and selling when +DI crosses -DI downward.
if ADXLevel !=0, then this strategy is used:
Wilder suggests buying when +DI crosses -DI upward with +DI above ADXLevel, and selling when +DI crosses -DI downward -DI above ADXLevel.
When using ADX as a filter, it uses the position of lines +DI>-DI = only BUY, +DI<-DI = only SELL, ADXLevel is not used.
- Added parameter ClosePositionifChangeOWNSignal - closing opposite positions when the main!! signal changes.
The difference from ClosePosifChange is that when using ClosePosifChange, a change in the signal in considered for all filters + the main signal.
And when using ClosePositionifChangeOWNSignal - a change in the signal is considered only according to the main indicator.
Using pending orders for entries instead of positions:
StopOrderUSE (true - false) and StopOrderDeltaifUSE (from the minimum allowed stop level allowed on the server) in points.
These parameters in conjunction provide the ability to place pending orders instead of positions. For example, you want to verify a signal after it appears by placing a pending order.
You set: StopOrderUSE =true StopOrderDeltaifUSE=100
If your indicator generates a signal for opening BUY, then the EA will place a pending BUYSTOP order at the price of Ask+StopOrderDeltaifUSE points.
If your indicator generates a signal for opening SELL, then the EA will place a pending SELLSTOP order at the price of Bid-StopOrderDeltaifUSE points.
If the parameter is less than the minimum allowed on the server, the Expert Advisor will show the error 130.
Default is 10 seconds! This is done to reduce the CPU load.
- Fixed the error of the virtual trailing stop for SAR and averaging.
- 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.
- Added the drawdown management block - DrawDown options.
This block prevents the EA from opening new deals by new signals from the algorithm, or closes all deals on the account and stops trading after a certain drawdown.
DrawDown_Level - enable the drawdown management block
Type_DrawDownHR - type of the drawdown calculation based on the deals in history and current deals
DrawDown_Level_One - the first drawdown level in percent
Type_Deal_Level_One - action when passing the first drawdown level
(disable new signals \ disable averaging deals or additional opening \ disable all deals \ output a message)
DrawDown_Level_Two - the second drawdown level in percent
Type_Deal_Level_Two - action when passing the second drawdown level
(close all profitable positions \ close all unprofitable positions \ close all \ output a message)
DrawDown_Level =true DrawDown_Level_One =50 Type_Deal_Level_One =No_NewDeal DrawDown_Level_Two =90 Type_Deal_Level_Two =Close_All
With these settings, once the current drawdown of deals in history and current deals exceeds the level of 50% of the current deposit, the EA is not allowed to open new deals by new signals. At the same time, the averaging functions will work.
Once the drawdown exceeds 90%, the EA immediately closes all deals.
- Fixed the error of the virtual trailing stop for SAR and averaging.
- 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".
testerwd="========= Tester Withdrawal =========";
Withdrawal - enable virtual withdrawal in the Strategy Tester;
Withdrawal_mode - in deposit currency or percent of the current balance (currency/percentage);
Withdrawal_amount - amount of money to withdraw;
Withdrawal_periodicity_days - distance between withdrawals as a number of days;
Withdrawal_Max - maximum withdrawal amount;
Withdrawal_EndOfTest - money withdrawal after the end of testing;
Fixed errors based on user reports
Added output of the signal information to the journal when a trade is opened.
Fixed the multi-currency operation mode of the EA.
Operation by time feature
Attention: Trading by time involves only filtering for opening new deals based on new signals.
All other functions: Trailing stop, Breakeven, Averaging, Scaling up along the trend and other works around the clock.
Attention: All parameters for trading by time can be optimized in the tester.
If TradeStartStopbyTime = false, the EA trades around the clock.
If TradeStartStopbyTime = true, the trading by time is activated:
The trading by time period starts on Monday.
The EA starts working on Monday at OpenHourMonday:OpenMinuteMonday if TradeStartbyTimeMonday=true
For example, OpenHourMonday=3 and OpenMinuteMonday=40, then the EA starts trading on Monday at 03:40 server time
(time of your broker, indicated in the Market Watch).
Next, the EA checks the trading time according to the parameters: OpenHour:OpenMinute - trading start and CloseHour:CloseMinute - trading end time for one day.
For example: OpenHour=5 and OpenMinute=0, as well as CloseHour=18 and CloseMinute=59, then the EA will trade every day from 5:00 to 18:59.
To set a trading period from the starting time, set the ClosePeriod_Minute parameter - period in minutes.
For example, OpenHour=6 and OpenMinute=0 and ClosePeriod_Minute=180, then the EA sets the trading time from 6:00 to 9:00(6+180 minutes = 9 hours).
You can also set multiple time intervals for trading in the SeveralTimeWork parameter. Entry format: HH:MM-HH:MM;
where: Hour to start trading:Minute to start trading - Hour to stop trading: Minute to stop trading.
For example, SeveralTimeWork=3:00-5:00;7:30-8:50;12:00-15:00;
then the EA will trade during 3 time intervals. from 3:00 to 5:00, from 7:30 to 8:50 and from 12:00 to 15:00. The EA will not open order during the remaining time.
You can also close all open deals and pending orders outside the trading time, CloseAllTradesByOutOfTime=true.
The EA will trade during the time specified above, and when the trading time ends, the EA will close all open positions and orders.
TradeStartStopbyTimeFriday - Trading time for Friday.
This EA allows the users to set the trading time for the EA on Friday.
Time parameters for Friday: OpenHourFriday:OpenMinuteFriday - CloseHourFriday:CloseMinuteFriday
For example, the EA should not open new deals on Friday after 18:00, set:
OpenHourFriday=0:OpenMinuteFriday=0 - CloseHourFriday=18:CloseMinuteFriday=0
In this case, the EA will not open new deals after 18:00
It is also possible to close all open deals and pending orders on Friday at the specified time - 18:00, CloseFriday=true.
The block for operation by time allows to set the trading days: TradeByDays
For example, TradeByDays=true Days=1,2,3 - in this case, the EA will trade only on Monday, Tuesday and Wednesday during the time specified above. Or it will trade around the clock those 3 days, if the time is not specified.
If you set Days=1,2,3,4,5 but with TradeStartStopbyTimeFriday=false, the EA will not trade on Friday.
It is also possible to set 1 day for optimization in the DayForOptimization parameter.
This option is useful to determine the most profitable days in optimization.
For example, DayForOptimization = 3, then the EA will trade only on Wednesdays.
You can set the trading to start on Monday and to stop on Friday, while the EA trades around the clock on the remaining days.
You can set the start on Monday and specific hours on other days.
OpenBarControlOnly - the EA operation on opened bars only. This mode allows to model the EA operation at the opening of bars (as in the strategy tester).
When this mode is enabled, the EA will trade just like in the OpenPriceOnly testing mode.
All! functions of the EA will be executed 1!! time at the opening of the bar (depending on the TF), including Modification, Trailing stop, Averaging, opening signals, etc.
Fixed working with long tickets
Added 3 additional filters
- Added the EAPADPRO information panel
Details on the panel in our blog:
The following data has been moved to the Strategy Info block:
OWN Signal = Name of the signal + Timeframe of the signal + Reverse
Current Signal = Current signal from the main indicator
Filter 1/2 - Name of the filter 1/2
Current Filter - Current signal from filters 1/2
BUY Average/Lot - Next averaging in points for BUY / Next averaging lot
SELL Average/Lot - Next averaging in points for SELL / Next averaging lot
Buy Additional/Lot - Next additional opening in points for BUY / Next lot for additional opening
Sell Additional/Lot - Next additional opening in points for SELL / Next lot for additional opening
Average Price Buy - Average price for BUY deals
Price Sell - Average price for SELL deals
-Fixed error with the DistanceMartin
Block of Parabolic SAR based trailing stop
-Added parameter TrailingStopSAR_TimeFrame - Timeframe of the SAR indicator for the trailing stop.
-To the МТ5 version: Added Parabolic SAR based trailing stop
TrailingStopSAR (true - false) step and maximum (parameters of the Parabolic SAR)
These parameters allow the modification of stop loss based on the specified Parabolic
The stop loss will be modified at every new value of the Parabolic SAR.
Accordingly, Buy is modified when the Parabolic SAR is below the price, Sell is modified when the Parabolic is above the price.
Block of signals
-Added parameter Signal_Reverse,Filter1_Reverse,Filter2_Reverse - they allow to inverse signals
based on specific indicators (Main signal, Filter 1 and Filter 2)
-Changed the MinuteToOpenNextPosition parameter (Allow opening the next signal after the last opened position),
if there are no open positions, the EA considers the time since the last closed position.
The time is considered for the same type. If the signal is BUY, the time is calculated from the last opened \ closed BUY....
-Changed the function for receiving signal when using signal inversion.
*If you use WPR as signal source, with the levels:
WPRLowLevel = -80;
Buy is opened, if WPR crosses WPRLowLevel (-80) upwards
SELL is opened, if WPR crosses WPRHighLevel (-20) downwards
*If you enable the option: Signal_Reverse=true
SELL is opened, if WPR crosses WPRLowLevel (-80) upwards
Buy is opened, if WPR crosses WPRHighLevel (-20) downwards
*If you enable the option: Signal_Reverse=true and set the parameters:
WPRLowLevel = -20;
Buy is opened, if WPR crosses WPRHighLevel (-80) downwards
SELL is opened, if WPR crosses WPRLowLevel (-20) upwards
- added parameters for the MACD signal
Which are involved in determining the signal.
for example: MACD_BUYLEVEL=3,MACD_SELLLEVEL=-3
For the long trade, the signal crosses the MACD line and at the end of that candle the MACD is greater than 0 and MACD is less than 3,0 (the signal line and MACD line must be both above the origin and less than 3.0).
For the short trade, the signal crosses the MACD line and at the end of that candle the MACD is less than 0 and MACD is greater than -3,0 (the signal line and MACD line must be both below the origin and greater than 3.0).
-Added automatic checking and normalization for all stops to tick size on the current currency pair.
For example, if the tick size on the WING17 symbol is 5 points, then all stop loss and take profit values will be normalized.
For example, the contract price is 58840 and the automatic stop loss calculation resulted in 1211 points, the final stop loss will be normalized to 1210 points.
Now trailing stop only triggers after a position covers the commission amount.
Added limit of losses over 1 day\week\month
Limiting LimitFor - limit type day\week\month
LimitForLosses - profit based limit
LimitForProfits- loss based limit
LimitType - limit type on dollars, points, percent of deposit
ClosebyLIMITING - close EA;s trades when exceeding the limit
UseCurrentProfit - when calculating the limit, take into account current loss/profit
This feature can disable the EA operation, if it reaches a certain profit\loss in the deposit currency during one day\month\week. The EA will resume working on the next day/week/month
Example: LimitFor=DAY LimitForProfits=1 Close at a total profit of $10
You can also set LimitType for calculations. In dollars, points, percentage of the account balance.
If you need to close and delete all trades of the Expert Advisor once the limit is exceeded, you can set ClosebyLIMITING = true
UseCurrentProfit enables/disables the inclusion of current floating profit/loss into limit calculation
AC - similar to the AO indicator
Ichimoku - crossover of TENKANSEN and KIJUNSEN lines,
If TENKANSEN is above KIJUNSEN - BUY
If TENKANSEN is below KIJUNSEN - SELL
Bar - trade in the direction of the bar
If candle Close is above the candle Open (Bullish candlestick) - BUY
If candle Close is below the candle Open (Bearish candlestick) - сигнал SELL
AC - operation similar to AO
Ichimoku - positions of TENKANSEN and KIJUNSEN lines,
Bar - bar direction
Bar relatively MA - signals are filtered using the bar close price and the fast/slow MA
If the bar close price is above MAfast and MAslow - only BUY
If the bar close price is below MAfast and MAslow - only SELL
Added support for working on the Brazilian market.
Added the new variable:
SeveralTimeWork = EA working time via enumeration,
start hour:start minute-end hour:end minute;start hour:start minute-end hour:end minute;
means that the EA works from 9:00 to 10:00, as well as from 12:00 to 13:00, as well as from 15:00 to 17:30
Added the MinuteToOpenNextPosition parameter - the number of minutes for opening the next trade based on the indicator signals. This parameter counts the number of minutes elapsed from the last opened position. It allows to filter trades when using the ONlyOnePosbySignal=false
Added the OpenOppositePositionAfterStoploss parameter - opening an opposite position when closing the current position by stop loss. It allows to open an opposite trade right after the stop loss of the previous is triggered without using the indicator signals.
Added the MAX_BUY_POSITION and MAX_SELL_POSITION parameters for limiting the maximum number of trades.
Added the Magic number
Fixed the error in balance calculation in the block of closing by profit for the accounts that use the day trading mode and equal to 0.
Added new functions to the 'Profit or Loss' block:
TrailOptions - The number of profit "units", after which profit trailing is activated;
TrailOptionsStep - Trailing step in "units";
Trailing Stop at Closing
A new function for trailing profits has been implemented on user demand. In this case, the profit is fixed with some correction. As soon as the profit reaches the specified value, the Expert Advisor saves the current profit level and starts trailing the profit. If you made settings for closing at the profit of 10 dollars:
CloseProfit - Close in profit.
prifitessss - The amount to close in profit.
TrailOptions - the distance from prifitessss, when reached the profit trailing is activated.
If prifitesss is set to 10 and TrailOptions is set to 5, the Trailing Stop will be set at 5 dollars. The Trailing Stop will come into play when the Expert Advisor passes the 10 dollar line and start moving following the profit. The Journal will show entries about the current profit status.
When the total profit falls below the last fixed level, TrailOptions, the Expert Advisor will perform forced closing of all positions.
Improved the OnePosPerDirection parameter: Open 1 trade per 1 direction
if OnePosPerDirection=true and ONlyOnePosbySignal = false
then the EA can open 1 Buy according to signal and 1 Sell according to signal
if OnePosPerDirection=false and ONlyOnePosbySignal = true
then the EA can open only 1 trade according to signal, either Buy or Sell
if OnePosPerDirection=false and ONlyOnePosbySignal = false
then the EA can open any trade according to any signal of the indicators
Added the OnlyOnePositionPerMagic parameter: Opening 1 position per 1 magic,
The EA checks if there are open positions with the specified magic number on other currency pairs. If there are no positions - the EA opens a trade according to the signal, and other experts will wait for this trade to be completed.
Added the CloseChangeOnlyInProfit parameter - close trades in case of a reverse signal only when the current position is in profit.
The parameters enables/disables sound for the operations of position opening, closure, modification, as well as sounds of errors returned by the server.
Added the parameters MaxSpreadToNotTrade and MinSpreadToNotTrade
MaxSpreadToNotTrade - maximum spread, at which EA can open a position
MinSpreadToNotTrade - minimum spread, at which EA can open a position
Note: The filter is used only to open a position by signal or averaging. All other functions work as usual.
Added a parameter to select the type of opened positions:
Added the SetMinStops variable:
In case of AutoSetMinLevel, stop levels are reduced to the minimum possible levels allowed on the server;
In case of ManualSet, a user receives a message that stop levels in the EA are less than the minimum allowed ones, and the EA stops operation.
Increases the last lot of the open position according to the last trade.
Fixed the time calculation for VPS.
Added Rounding parameter:
Without rounding - place stop orders without rounding
To 1 digit - rounding to 1 digit. For example, if Stoploss= 1.23456, the trade will be opened with a stop loss of 1.23450
To 2 digits - rounding to 2 digits. For example, if Stoploss= 1.23456, the trade will be opened with a stop loss of 1.23400
- Fixed the error in the determination of the last lot, if the position was closed by several requests.
Before: A trade opens only when the two signals match at the same time.
Now: If the IndSigToTrade signal appeared, then the FILTER_IndSigToTrade2 and FILTER_IndSigToTrade3 indicators are checked. If their signals go on, the trade is opened.
I.e. If the IndSigToTrade is selected as the main signal, then the FILTER_IndSigToTrade2 and FILTER_IndSigToTrade3 parameters only trigger as filters.
MaxOrders = maximum number of smoothing deals (deals against the main position);
MaxOrdersOpenAdditionalOpen = maximum number of additional deals (deals along the main position);
For an additionally opened trade, take profit is equal to the TakeProfit parameter
AdditionalOpen - use opening additional orders by trend;
DistanceAdditionalOpen - distance of opened grid positions, adding by trend;
LotsMartinAdditionalOpen - increase lot for a position grid;
MaxOrdersOpenAdditionalOpen - maximum additions, 0 - unlimited.
If you want to open additional positions by trend (for example, if you buy and the price goes up through DistanceAdditionalOpen points, a new position should be opened equal to "previous lot * LotsMartinAdditionalOpen"). The maximum amount of deals in a single position should not exceed MaxOrdersOpenAdditionalOpen deals.
added option CloseAllTradesByOutOfTime
When using the trading permission block:
input int OpenHour = 0;
input int OpenMinute = 0;
input int CloseHour = 23;
input int CloseMinute = 59;
If CloseAllTradesByOutOfTime open positions remain after the time is up - all positions are closed.
- NO=0 - No signal
- Ma=1 - Moving Average
- MACD=2 - Moving Average Convergence/Divergence (MACD)
- STOCH=3 - Stochastic Oscillator
- RSI=4 - RSI
- CCI=5 - Commodity Channel Index (CCI)
- WPR=6 - Williams Percent Range (WPR)
- BB=7 - Bollinger Bands
- Envelopes=8 - Envelopes
- Alligator=9 - Alligator
- OsMA=10 - Moving Average of Oscillator (OsMA)
- AO=11 - Awesome Oscillator (AO)
- ISH=12 - Ichimoku
Fixed averaging error.
Removed the limitation on the minimum averaging distance.
This fill policy means that an order can be executed only with the specified volume. If the required volume for a given financial instrument is currently unavailable in the market, the order will not be executed. The required volume can be filled using several offers currently available in the market.
This means that a trade will be executed with the maximum volume available in the market within the value indicated in the order. In case entire order volume is not available in the market at the moment, a partial fulfillment is possible, but any portion that cannot be filled immediately is canceled.
This fill policy is used for market, Limit and Stop Limit orders and only in the Market Execution and Exchange Execution modes. In case of partial filling a market or Limit order with remaining volume is not canceled but processed further.
When a Stop Limit order triggers, a relevant Limit order will be placed with the Return fill policy.
Modifies stop loss and take profit after opening the position.
- Added logging of actions of the EA.
- Fixed Martingale used for averaging.
When using initial trailing stop and a set of signals for modifying the stop loss, the initial stop loss is reset and the TrailingStop function starts working instead.