I try to make an EA for any Moving Average Cross strategy, try to make it universal. So please let me know should you have any suggestion to add to this EA.
Common Setting :
StopLoss (default 100)
Set your Stop Loss. Use 0 (zero) if you don't like to use Stop Loss ( not recommended ).
TakeProfit (default 200)
Set your Take Profit. Use 0 (zero) if you like to use open target.
Trailing Stop Setting :
ver.6 TrailingStopType (default 1)
Set trailing stop type. 1:will start trailing if profit in pips is greater / same with TrailingStop. 2:will start trailing as soon as trade in profit. (will add other type of trailing stop if suggested, latest suggestion is SafeZone trailing stop post #99 https://www.mql5.com/en/forum/general )
TrailingStop (default 40)
Set the Trailing Stop. Use 0 (zero) if you don't use trailing stop feature.
Moving Average Setting :
FastMAPeriod (default 10)
Fast Moving Average Period.
FastMAType (default EMA / 1)
Fast Moving Average Type 0:SMA 1:EMA 2:SMMA 3:LWMA
FastMAPrice (default Close / 0)
Fast Moving Average Applied Price 0:Close 1:Open 2:High 3:Low 4:Median 5:Typical 6:Weighted
ver.7.2 FastMAshift (default 0)
Fast Moving Average Shift
SlowMAPeriod (default 80)
Slow Moving Average Period.
SlowMAType (default EMA / 1)
Slow Moving Average Type 0:SMA 1:EMA 2:SMMA 3:LWMA
SlowMAPrice (default Close / 0)
Slow Moving Average Applied Price 0:Close 1:Open 2:High 3:Low 4:Median 5:Typical 6:Weighted
Slow Moving Average Shift
Minimum Cross Distance :
ver.2 MinCrossDistance (default 0)
Set the pip distance between FastMA and SlowMA to be consider as a valid cross. Use 0 (zero) to disable this filter.
ver.7 MaxLookUp (default 1)
Set number of bar after the cross to keep checking on the entry condition in regards with the minimum distance between FastMA and SlowMA. Need MinCrosDistance > 0 to enable this feature. Use 0 (zero) to disable this feature.
Exit Setting :
StopAndReverse (default true)
If set to TRUE, will exit any trade and reverse position when signal change.
PureSAR (default false)
If set to TRUE, will use no Stop Loss - Take Profit - and Trailing Stop. This is always in play setting.
ver.7.2 ExitOnCross (default false)
If set to TRUE, will exit any trade if there is an opposite cross without consider any additional filter. So exit purely base on moving average cross.
Third MA Setting :
ver.5 UseThirdMA (default false)
If set to TRUE (and UseCounterTrend = FALSE), will only trade according to ThirdMA direction, above for BUY and below for SELL.
ver.5 UseCounterTrend (default false)
If set to TRUE will keep trade even if counter ThirdMA direction, but with different StopLoss and TakeProfit. Need UseThirdMA = TRUE to enable this feature.
ver.7 OnlyCounterTrend (default false)
If set to TRUE will set the EA only to trade counter trend trade, mean BUY if cross below ThirdMA and SELL if cross above ThirdMA. Need UseCounterTrend = TRUE to enable this feature.
ver.5 ThirdMAPeriod (defaul 100)
Third Moving Average Period.
ver.5 ThirdMAType (default EMA / 1)
Third Moving Average Type 0:SMA 1:EMA 2:SMMA 3:LWMA
ver.5 ThirdMAPrice (default Close / 0)
Third Moving Average Applied Price 0:Close 1:Open 2:High 3:Low 4:Median 5:Typical 6:Weighted
ver.7.2 ThridMAshift (default 0)
Third Moving Average Shift
ver.5 CTStopLoss (default 0)
Set your Stop Loss for CounterTrend trade. Use 0 (zero) if you don't like to use Stop Loss ( not recommended ).
ver.5 CTTakeProfit (default 0)
Set your Take Profit for CounterTrend trade. Use 0 (zero) if you like to use open target.
Pivot Filter Setting :
ver.8.0 Use.Pivot.Filter (default false)
Set to true if you like to filter the trade, only BUY if the cross of Slow and Fast MA occur between S1 and S2 and only SELL if the cross of Slow and Fast MA occur between R1 and R2.
Order Setting :
ReverseCondition (default false)
Set TRUE to reverse the entry condition.
ver.3 ConfirmedOnEntry (default true)
If set to TRUE, will enter/exit trade on the next bar after the cross confirmed. If set to FALSE, will enter/exit trade as soon as there is a cross.
ver.4 OneEntryPerBar (default true)
If set to TRUE, will only trade once on one bar. If set to FALSE, will trade more than once on one bar if the entry condition is still valid, although still one trade at a time.
NumberOfTries (default 5)
Number of try if the order rejected by the system.
Slippage (default 5)
MagicNumber (default 1234)
Use to generate Magic Number. Change this number ONLY if you like to run the EA on same pair and same time frame but with different setting.
Multiple Open Trade Setting :
ver.5 MaxOpenTrade (default 2)
Number of maximum open trade at one time. This setting is use when StopAndReverse / PureSAR = FALSE so the EA won't close the open order when there is an opposite signal, but rather it will open a new trade. Set the number of open trade allowed. If StopAndReverse / PureSAR = TRUE this setting will always = 1, mean one trade at a time.
ver.6 MinPriceDistance (default 5)
If multiple open trade enable (by set MaxOpenOrder>1 and OneEntryPerBar=FALSE) this number will determine the minimum distance between each trade on same direction.
Time Filter Setting :
UseHourTrade (default false)
If set to TRUE, the EA only active on certain time.
StartHour (default 10)
Time when the EA start active (use with UseHourTrade = TRUE).
EndHour (default 11)
Time when the EA stop active (use with UseHourTrade = TRUE).
Lot and Money Management Setting :
Lots (default 1)
Number of lot per trade.
MM (default false)
If set to TRUE, will use build in money management.
AccountIsMicro (default false)
If using Micro Account set this to TRUE.
Risk (default 10)
Use with MM = TRUE to set the risk per trade.
Cross Alert Setting :
ver.5 EnableAlert (default true)
Will sound an alert when there is a moving average cross, cross UP or cross DOWN.
ver.5 SoundFilename (default "alert.wav")
The filename for the alert.
BackTest Setting :
PrintControl (default true)
Print some comment on backtesting.
Show_Settings (default true)
Show setting on the chart.
Let me know if you still got problem with the setting. Thank you to codersguru and pengie for several partial code. Hope this help
- fixed ConfirmedOnEntry bug.
- add immediate trailing stop.
- add MinPriceDistance for multiple open trade.
- add MaxLookUp feature to keep checking on the entry after certain bar from the cross regarding the MinCrossDistance.
- add OnlyCounterTrend feature if using ThirdMA filter.
- fixed MinCrossDistance bug.
- fixed MinCrossDistance bug for ConfirmedOnEntry = FALSE.
- add MA shift parameter.
- add ExitOnCross feature.
- fixed on screen display COMMENT.
- added Pivot Filter.
- revised some code because Build 206 bugs.
Fast Copy MT5 allows you to copy trades between different MetaTrader 5 (netting)(hedge) and MetaTrader 4 accounts in any direction and amount, quickly and easily (without loading the system).
Any type of copying is available
MT4 → MT5 MT4 → MT4 MT5 → MT5 MT5 → MT4
* For the MetaTrader 4 terminal — Fast Copy MT4
* For the MetaTrader 5 terminal — Fast Copy MT5
** Before the purchase, you can test the program by downloading the free demo versions — Fast
The main purpose of the indicator is to draw the wave marking on the basis of maximum and minimum levels that has been reached on greater, average and smaller period. It starts to draw the point of a possible wave end if the price passes the deviation distance specified in the settings; the point is considered to be formed if the last closed candlestick hasn't made a new exteremum comparing to the previous candlestick. The fact of displaying a digit of a period itself is not a signal. You need t
qAutoActivation indicator is one of the main components of Trading Chaos Expert trading expert panel. The indicator displays the current trend on the current timeframe. This is the first indicator that is attached to the chart and saved in the trading complex template. It defines what trading signals from the expert panel should be automated for market entry (bullish or bearish ones).
When the trend changes, the indicator changes the line color and, at the same time, highlights the trading pane
Another breakthrough. Using the legendary BBSO range trading module the no 1 ROBOT AND THE AMAZING SPEED OF METATRADER 5, this scalper generates a lot of quick trades in and out using the strongest point of BBSO the ENTRY.
Self-optimizes in seconds ANY Pair on any timeframe (always check with Olivier Nomblot for current settings and pairs).
No special CPU needs or fast internet connections or set files or strategies or complicated parameters. Adapts to your broker... just drag on your screen.
Easy Order is an Expert Advisor allowing you to enter any type of trade with one click based on your RISK preferences.
You can choose to enter a trade and automatically calculate your lot size based on how much of your account you want to risk. Risk is calculated based on your Stop Loss placement. You can use a fixed lot size if you don't want to use risk based calculation of lot size. Your previous setting of risk based or fixed lot size remains saved for your next use of this Expert Advi
The indicator automatically plots and tracks buy and sell Fibo levels at any symbol and timeframe.
the trend on all timeframes and indicators values.
Fibo levels of the probable upward or downward price movements.entry points are shown using "up arrow", "down arrow" icons. The data is doubled on SELL and BUY buttons.rectangle area limited by levels 0-100. Trading is performed from one level to another (no trend).Features
calculation of the trend of indicat
This unique indicator detects reversal signals using price action and volume algorithm. It has also the ability to predict reversal power using the probability of past price movement and past volume analyzed.
To achieve more accurate trading, please use this tool in addition or support to the system you are using. This tool will perform better if combined with the right strategy.
To further boost the efficiency of this tool, you can combine this with FxGlow Zone Barr
This script help user record the value of Moving Average and OHLC at the moment once deals happen.
The datas save as .CSV format file so you can quantitative analysis someone's trading.
Please input value of MA's parameters you like. It tells you the path of data file when script is stopped.
The economic calendar is made in the form of an Expert Advisor that downloads the data from one of the most popular Forex sites (forexfactory.com/calendar.php). The data is presented in two ways. The first (primary) is represented as icons with detailed information about the event. The second is displayed as a line with a news description. Economic Calendar downloads published news in real mode with the possibility to adjust the spacing of data validation and user-friendly customizable graphical
Cluster analysis of volumes is now available in MetaTrader 5!
The YuСlusters indicator is a professional tool for analyzing the trading volumes. The cluster graph is plotted based on tick data. For the exchange financial instruments these are the volume, type and price of a deal. For the Forex instruments - the real or tick volume (depending on the broker) and Bid price.
There are 6 criteria of cluster generation:
Time interval, the criterion is set in seconds. Price range, the criteri
The indicator represents an additional chart window with a lower time frame where bars are combined into groups that are equivalent in time to main chart time frame. Bars are synchronized by the right hand side of the window, i.e. the time of the last bar in the main window corresponds to the time of the last bar group in the additional window. The maximum number of groups is 16; the maximum number of bars combined into groups in the additional window is 256. Limitations on the numbers are requi
Chart Overlay indicator displays the price action of several instruments on the same chart allowing you to evaluate how differently currency pairs fluctuate relative to each other.
Find overbought or oversold currency pairs easily Plot up to 6 currency pairs overlayed on the same chart Display inverted symbols -if you want to- Adapts to chart size, zoom and timeframe Symbols can be plotted as bars or line charts The size of the overlay chart is customizable Automatic price
Active Lines - a powerful professional tool for operations with lines on charts. Active Lines provides a wide range of actions for events when the price crosses lines. For example: notify, open/modify/close a position, place/remove pending orders. With Active Lines you can assign several tasks to one line, for each of which you can set individual trigger conditions, as well as conditions for re-activations and the number of possible activations.
Active Lines helps you easily organize various tr
This indicator has been created by a former hedge-fund employee and it automatically identifies when a divergence occurs between price and an oscillator. It can identify both bull and bear divergence and it is pre-loaded with four of the most popular oscillators. You can choose from RSI, MACD, Stochastics and CCI.
Remember: When a divergence occurs, it means that price and momentum are not in agreement. And divergence signals are widely used by institutional traders to identify potential revers
Find double top and double bottom reversal chart patterns easily with this indicator.
Easy to use Customizable colors and sizes It implements breakout signals It implements alerts of all kinds
Indicator Settings - The amplitude represents the size of the patterns to be found. The max. history bars parameter is the amount of bars in the chart to look back.
Less bars to evaluate means the indicator will load faster. Patterns - Choose the colors of the patt
The Expert Advisor for increasing (or opening) market positions.
Allows specifying the desired risk, target and searching for the best open price and trade volume.
It is included in the ActivePanel product.
Three variables are available for every strategy, any one of them can be disabled, their period can be changed.
type_order=ORDER_FILLING _FOK - order filling type.
ReverseTrade=false — trades opens in reverse direction if true. ExitOnBar=true — trades close on each bar only. spreadcover=false — Spread you pay includes in profit trades. It's like trade with zero spread but you should remember that it can decrease exact match between tester's result and live one. It
This trading panel has been developed for fast and comfortable operation of the financial markets. It is equipped with the necessary functions for manual and semi-automated trading. Due to the presence of the order trailing feature, trailing stop and automatic closure by equity, profit, time. You can use it to automate your trading system. All you have to do is open a position and set the parameters for maintenance, everything else will be handled by the EA. If you want to limit your losses, set
The indicator shows the relative "strength explosion" of a selected currency. An additional "limiting" channel is used for filtering the indicator values.
VolatilityPeriod - period to analyze currency volatility, MainPrice - price used for calculation main values of the indicator, FastPeriod - fast period for calculation, FastMethod - method of smoothing of the fast line, SlowPeriod - slow period for calculation, SlowMethod - method of smoothing of the slow line, SmoothingPeriod - resul
The OandaX product series is designed to display additional data on orders and positions provided by the Oanda FxLabs service.
The OandaX Download Manager EA is included in the OandaX product series and is designed to download data for all OandaX indicators running in the terminal.
To test your trading strategies and for historical data analysis, you can use free OandaX 5 Download Manager BETA. It is similar to Download Manager but provides data with a delay for a day.
Note. The EA uses WebRe
Purpose and functions of the indicator
The indicator determines and marks the moments of trend change on a chart based on the theory of fractal levels breakdown on any time frames. If a breakdown based on all rules is real, the horizontal lines will appear on the chart with corresponding color. If there is an up trend, the line will be blue. In the descending trend the line will be red. The blue line is a strong support level, the trader should look for buying opportunities above this line. The
Displays divergence for any custom indicator. You just need to specify the name of an indicator name; on default it uses CCI.
In addition you can set smoothing for the selected indicator as well as levels. If one of these levels is crossed, you'll receive a notification. The custom indicator must be compiled (a file with extension EX5) and it must be located in MQL5/Indicators directory of the client terminal or in one of its subdirectories. It uses zero bar of the selected indicator with defau
This is an utility for automatic scaling of a chart and making at least 140 bars visible in it. This is necessary for a correct wave analysis according to the Bill Williams' strategy "Trading Chaos". The utility can be used on any timeframe available in МetaТrader 5.
It draws a vertical line through the first bar the calculation starts from. This line allows you to see the probable starting point of the wave sequence along with a sufficient number of bars displayed in the chart. It also makes t
The EA implements a reversal strategy which uses the analysis of prices databases of ENUM_APPLIED_PRICE type for generating signals. Statistical observations of the price databases of different timeframes allows to make an assumption about a possible vector of price movement. The probability of such an event is shown as scale and as a percentage. The functionality of the trade panel allows sending requests for the broker to execute trading operations. This EA uses market orders. You can addition
The Synchronized Charts script allows comparing bars of different symbols or different periods of the same symbol.
Attach the script to a chart and move bars or change the scale, all opened chart will move synchronously with the current one. The bars on different charts aligned to the border according to their open time.
The indicator is based on the comparison of the correlation of trading instruments following an original algorithm. It determines the difference between correlated contracts (delta). The greater the difference, the more it is likely that this Delta will return to zero.
More suited to the FORTS market.
The greater the deviation from zero, the more it is likely that the price will return to zero. Also, the indicator divergence can be applied by comparing highs and lows.
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, however it can work on other currency pairs. You should use timeframe M1 for trading.
You should optimize only two parameters: Seconds_to_move and TradePrice. It is sufficient to optimize Bobra Adept only once, for example, for a half year period. After that, Bobra
The fractal analysis of the markets is used in the indicator operation algorithm. According to the fractals theory, after the breakthrough of the fractal level confirmed by the closing price located below or above the fractal, the trend wave in the direction of the breakthrough starts to develop. Until the fractal has been passed in the opposite direction, the trend is considered to be acting even if the price is flat or moves backwards. If a bullish fractal has been previously broken through on
Addition to the standard Relative Strength Index (RSI) indicator, which allows to configure various notifications about the events related with the indicator. For those who don't know what this indicator is useful for, read here. This version is for MetaTrader 5, MetaTrader 4 version - here.
Currently implemented events:
Crossing from top to bottom - of the upper signal level (default - 70) - sell signal. Crossing from bottom to top - of the upper signal level (default - 70) - sell sign
The script is intended for automatic placing of Buy Stop pending orders, Stop Losses and Take Profits on the user specified levels.
Avoiding unwanted entering a long position in case of false hitting the level as a result of widening of the spread by a dealing center. Avoiding unwanted triggering of a Stop Loss in case a quote pierces a significant level (fractal) without further confirmation with the close price. Setting a necessary virtual order and entering the marke
thanks for this effores.
I want to know will it work in one account
1 Same pair different TF.
2. will it workmore than one pair in one account.
3. will it works same pair same TF but with diffenent setting i mean TP or SL etc , if we use magin no.
Please let us know the best TF .
Hi kumawat. Yes to all of your question. I've just added MagicNumber seed to generate Order Magic Number. Change MagicNumber only if you like to use the EA for question number 3. Hope this help
Hi, I think the time frame is depend on your strategy. For default setting, you could use the EA on 1 Hour chart. Hope this help
Nice EA. Which MA's and settings have you found best?
I tried this one and it produced really good results on the 4hr.
FastMAPeriod = 10,
FastMAType = 3, //0:SMA 1:EMA 2:SMMA 3:LWMA
FastMAPrice = 1, //0:Close 1:Open 2:High 3:Low 4:Median 5:Typical 6:Weighted
SlowMAPeriod = 100,
SlowMAType = 3, //0:SMA 1:EMA 2:SMMA 3:LWMA
SlowMAPrice = 2; //0:Close 1:Open 2:High 3:Low 4:Median 5:Typical 6:Weighted
Exit_Setting = "---------- Exit Setting";
ReverseCondition = false, // TRUE:buy-sell , sell-buy
ConfirmedOnEntry = false, // TRUE:entry on the next signal bar
StopAndReverse = true, // TURE:if signal change, exit and reverse order
PureSAR = false; // TRUE:no SL, no TP, no TS
I thought that Magic Number thing you have there is excellent. I think all EA's should have this, then the user doesn't have to worry about it, its sorted for you automatically.
one more suggesation. if we can include MACD, RSI & stochestic
It may a greate EA
And very good idea!
Hi codersguru, thank you for the compliment. I'm just one of your student, it's your code all over the EA, so many thanks to you also