Mohamed Abdelmaaboud / Profile
- Information
8+ years
experience
|
2
products
|
0
demo versions
|
3
jobs
|
0
signals
|
0
subscribers
|
✅ Certified Financial Technician® (CFTe®) holder from IFTA (International Federation of Technical Analysts).
✅ Certified ESTA Technical Analyst (CETA ) holder from ESTA (The Egyptian Society of Technical Analysts).
✅ The founder of Trades Coding for trading software products and services.
👉 Check out the website through the link: https://tradescoding.com/
✅ The founder of Trades Analysis for trading training and consulting services.
👉 Check out the website through the link: https://tradesanalysis.com/
✅ I am passionate about what I do and interested in adding more value using my experience in the field.
✅ I am the author of many articles here on the MQL5 website about algorithmic trading and how to create a trading system based on the most popular technical indicators.
You can find them through the following link:
👉 https://www.mql5.com/en/users/m.aboud/publications
✅You can join my telegram channel through the following link:
👉 https://t.me/tradescoding
✅ I author trading tools for MetaTrader 4 and MetaTrader 5.
You can find them through the following link:
👉 https://www.mql5.com/en/users/m.aboud/seller
Welcome to our new article from our series about learning how to design a trading system by the most popular technical indicator. Through this new article, we will learn how to design a trading system by the Chaikin Oscillator indicator.
Here is a new article in our series about how to design a trading system by the most popular technical indicators in MetaTrader 5 trading platform. In this new article, we will learn how to design a trading system by Standard Deviation indicator.
A new article in our series about learning how to design a trading system by the most popular technical indicators by MQL5 to be used in the MetaTrader 5. In this article, we will learn how to design a trading system by the Williams' %R indicator.
Here is a new article in our series about how to design a trading system b the most popular indicators, we will talk about the Ichimoku indicator in detail and how to design a trading system by this indicator.
Here is a new article from our series about learning how to design a trading system based on the most popular technical indicators. The current article will be devoted to the Volumes indicator. Volume as a concept is one of the very important factors in financial markets trading and we have to pay attention to it. Through this article, we will learn how to design a simple trading system by Volumes indicator.
The new article from our series about designing a trading system based on the most popular technical indicators considers a new technical indicator - the Money Flow Index (MFI). We will learn it in detail and develop a simple trading system by means of MQL5 to execute it in MetaTrader 5.
Welcome to the new article from our series about learning how to design trading systems based on the most popular technical indicators. In this article, we will learn about a new technical indicator called Accumulation/Distribution indicator and find out how to design an MQL5 trading system based on simple AD trading strategies.
//| TRENDLINE_RVI_DeMarker_ADX_ACMA_AO SYSTEM.mq5 |
//| Copyright 2022, MetaQuotes Ltd. |
//| https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2022, MetaQuotes Ltd."
#property link "https://www.mql5.com"
#property version "1.00"
//+------------------------------------------------------------------+
//| Expert initialization function |
//+------------------------------------------------------------------+
int OnInit() {
//--- create timer EventSetTimer(60); //--- return(INIT_SUCCEEDED); }
//+------------------------------------------------------------------+
//| Expert deinitialization function |
//+------------------------------------------------------------------+
void OnDeinit(const int reason) {
//--- destroy timer EventKillTimer(); }
//+------------------------------------------------------------------+
//| Expert tick function |
//+------------------------------------------------------------------+
void OnTick() {
////////////////////////Trend Lines//////////////////////////////////// long candlesUp = ChartGetInteger(0, CHART_FIRST_VISIBLE_BAR, 0); double pLow[]; ArraySetAsSeries(pLow, true); CopyLow(_Symbol, _Period, 0, candlesUp, pLow); long candleLow = ArrayMinimum(pLow, 0, candlesUp); MqlRates pArrayUp[]; ArraySetAsSeries(pArrayUp, true); long DataUp = CopyRates(_Symbol, _Period, 0, candlesUp, pArrayUp); ObjectDelete(_Symbol,"UpwardTrendline"); ObjectCreate(_Symbol, "UpwardTrendline", OBJ_TREND, 0, pArrayUp[candleLow].time, pArrayUp[candleLow].low, pArrayUp[0].time, pArrayUp[0].low); ObjectSetInteger(0, "UpwardTrendline", OBJPROP_COLOR, Blue); ObjectSetInteger(0, "UpwardTrendline", OBJPROP_STYLE, STYLE_SOLID); ObjectSetInteger(0, "UpwardTrendline", OBJPROP_WIDTH, 1); ObjectSetInteger(0, "UpwardTrendline", OBJPROP_RAY_RIGHT, true); long candlesDown = ChartGetInteger(0, CHART_FIRST_VISIBLE_BAR, 0); double pHighDown[]; ArraySetAsSeries(pHighDown, true); CopyHigh(_Symbol, _Period, 0, candlesDown, pHighDown); long candleHighDown = ArrayMaximum(pHighDown, 0, candlesDown); MqlRates pArrayDown[]; ArraySetAsSeries(pArrayDown, true); int DataDown = CopyRates(_Symbol, _Period, 0, candlesDown, pArrayDown); ObjectDelete(_Symbol, "DownwardTrendline"); ObjectCreate(_Symbol, "DownwardTrendline", OBJ_TREND, 0, pArrayDown[candleHighDown].time, pArrayDown[candleHighDown].high, pArrayDown[0].time, pArrayDown[0].high); ObjectSetInteger(0, "DownwardTrendline", OBJPROP_COLOR, Blue); ObjectSetInteger(0, "DownwardTrendline", OBJPROP_STYLE, STYLE_SOLID); ObjectSetInteger(0, "DownwardTrendline", OBJPROP_WIDTH, 1); ObjectSetInteger(0, "DownwardTrendline", OBJPROP_RAY_RIGHT, true); long candlesSupport = ChartGetInteger(0, CHART_FIRST_VISIBLE_BAR, 0); double pLowSupport[]; ArraySetAsSeries(pLowSupport, true); CopyLow(_Symbol, _Period, 0, candlesSupport, pLowSupport); long candleLowSupport = ArrayMinimum(pLowSupport, 0, candlesSupport); MqlRates pArraySupport[]; ArraySetAsSeries(pArraySupport, true); int DataSupport = CopyRates(_Symbol, _Period, 0, candlesSupport, pArraySupport); ObjectDelete(_Symbol, "supportLine"); ObjectCreate(_Symbol, "supportLine", OBJ_HLINE, 0, pArraySupport[candleLowSupport].time, pArraySupport[candleLowSupport].low, pArraySupport[0].time, pArraySupport[0].low); ObjectSetInteger(0, "supportLine", OBJPROP_COLOR, Green); ObjectSetInteger(0, "supportLine", OBJPROP_STYLE, STYLE_SOLID); ObjectSetInteger(0, "supportLine", OBJPROP_WIDTH, 3); ObjectSetInteger(0, "supportLine", OBJPROP_RAY, true); long candlesResistance = ChartGetInteger(0, CHART_FIRST_VISIBLE_BAR, 0); double pHighResistance[]; ArraySetAsSeries(pHighResistance, true); CopyHigh(_Symbol, _Period, 0, candlesResistance, pHighResistance); long candleHighResistance = ArrayMaximum(pHighResistance, 0, candlesResistance); MqlRates pArrayResistance[]; ArraySetAsSeries(pArrayResistance, true); long DataResistance = CopyRates(_Symbol, _Period, 0, candlesResistance, pArrayResistance); ObjectDelete(_Symbol, "resistanceLine"); ObjectCreate(_Symbol, "resistanceLine", OBJ_HLINE, 0, pArrayResistance[candleHighResistance].time, pArrayResistance[candleHighResistance].high, pArrayResistance[0].time, pArrayResistance[0].high); ObjectSetInteger(0, "resistanceLine", OBJPROP_COLOR, Red); ObjectSetInteger(0, "resistanceLine", OBJPROP_STYLE, STYLE_SOLID); ObjectSetInteger(0, "resistanceLine", OBJPROP_WIDTH, 3); ObjectSetInteger(0, "resistanceLine", OBJPROP_RAY_RIGHT, true); /////////////////////////////////////VIDYA///////////////////////////////////////////// MqlRates priceArrayVIDYA[]; double vidyaArray[]; double vidyaArray1[]; int DataVIDYA = CopyRates(_Symbol, _Period, 0, 3, priceArrayVIDYA); ArraySetAsSeries(vidyaArray, true); ArraySetAsSeries(vidyaArray1, true); int vidyaDef = iVIDyA(_Symbol, _Period, 9, 12, 0, PRICE_CLOSE); int vidyaDef1 = iVIDyA(_Symbol, _Period, 20, 50, 0, PRICE_CLOSE); CopyBuffer(vidyaDef, 0, 0, 3, vidyaArray); CopyBuffer(vidyaDef1, 0, 0, 3, vidyaArray1); double currentCloseVIDYA = NormalizeDouble(priceArrayVIDYA[2].close, 6); double vidyaVal = NormalizeDouble(vidyaArray[0], 6); double vidyaVal1 = NormalizeDouble(vidyaArray1[0], 6); ///////////////////RVI Moving Average///////////////////////////////////////////////// MqlRates pArrayRVI_MA[]; double maArrayRVI_MA[]; double rviArray[]; double rviSignalArray[]; int DataRVI_MA = CopyRates(_Symbol, _Period, 0, 1, pArrayRVI_MA); ArraySetAsSeries(maArrayRVI_MA, true); ArraySetAsSeries(rviArray, true); ArraySetAsSeries(rviSignalArray, true); int rviDef = iRVI(_Symbol, _Period, 10); int maDefRVI_MA = iMA(_Symbol, _Period, 100, 0, MODE_EMA, PRICE_CLOSE); CopyBuffer(rviDef, 0, 0, 3, rviArray); CopyBuffer(rviDef, 1, 0, 3, rviSignalArray); CopyBuffer(maDefRVI_MA, 0, 0, 3, maArrayRVI_MA); double rviValue = NormalizeDouble(rviArray[0], 3); double rviSignalValue = NormalizeDouble(rviSignalArray[0], 3); double maValueRVI_MA = NormalizeDouble(maArrayRVI_MA[0], 3); ////////////////////ACELERATOR_OSCILLATOR////////////////////////////////////// MqlRates pArrayACMA[]; double acArray[]; double maArrayACMA[]; int DataACMA = CopyRates(_Symbol,_Period, 0, 1, pArrayACMA); ArraySetAsSeries(acArray, true); ArraySetAsSeries(maArrayACMA, true); int acDefACMA = iAC(_Symbol, _Period); int maDefACMA = iMA(_Symbol, _Period, 50, 0, MODE_EMA, PRICE_CLOSE); CopyBuffer(acDefACMA, 0, 0, 3, acArray); CopyBuffer(maDefACMA,0, 0, 3, maArrayACMA); int acMaxArray = ArrayMaximum(acArray, 1, WHOLE_ARRAY); int acMinArray = ArrayMinimum(acArray, 1, WHOLE_ARRAY); double closingPriceACMA = pArrayACMA[0].close; double acValue = NormalizeDouble(acArray[0], 7); double acMaxValue = NormalizeDouble(acArray[acMaxArray], 7); double acMinValue = NormalizeDouble(acArray[acMinArray], 7); double maValueACMA = NormalizeDouble(maArrayACMA[0], 7);
///////////////////////AWESOME_OSCILLATOR/////////////////////////////////////////// MqlRates pArrayAO[]; double aoArray[]; double maArrayAO[]; int DataAO = CopyRates(_Symbol, _Period, 0, 1, pArrayAO); ArraySetAsSeries(aoArray, true); ArraySetAsSeries(maArrayAO, true); int aoDef = iAO(_Symbol, _Period); int maDefAO = iMA(_Symbol, _Period, 50, 0, MODE_EMA, PRICE_CLOSE); CopyBuffer(aoDef, 0, 0, 3, aoArray); CopyBuffer(maDefAO, 0, 0,3, maArrayAO); double closingPriceAO = pArrayAO[0].close; double aoValue = NormalizeDouble(aoArray[0], 7); double maValueAO = NormalizeDouble(maArrayAO[0], 7); ///////////////////////////DeMARKER_DIVERGENCE////////////////////////////////////////// double deMarkerArray[]; MqlRates pArrayDeMarker[]; ArraySetAsSeries(deMarkerArray, true); ArraySetAsSeries(pArrayDeMarker, true); int deMarkerDef = iDeMarker(_Symbol, _Period, 14); int pDataDeMarker = CopyRates(_Symbol, _Period, 0, 14, pArrayDeMarker); CopyBuffer(deMarkerDef, 0, 0, 14, deMarkerArray); double deMarkerVal = NormalizeDouble(deMarkerArray[0], 4); double deMarkerPrevVal = NormalizeDouble(deMarkerArray[1], 4); double currentHighDeMarker = NormalizeDouble(pArrayDeMarker[0].high, 6); double currentLowDeMarker = NormalizeDouble(pArrayDeMarker[0].low, 6); double prevHighDeMarker = NormalizeDouble(pArrayDeMarker[1].high, 6); double prevLowDeMarker = NormalizeDouble(pArrayDeMarker[1].low, 6); /////////////////////////////////////ADX//////////////////////////////////////
//creating a variable for signal //Create arrays for current ADX value, previous ADX value, +DI value and -DI value double ADXArray0[]; double ADXArray1[]; double PDIArray[]; double NDIArray[]; //Identifying the ADX, positive DI, negative DI. int ADXDef = iADX(_Symbol, _Period, 14); //Sort price arrays from current data ArraySetAsSeries(ADXArray0,true); ArraySetAsSeries(ADXArray1,true); ArraySetAsSeries(PDIArray,true); ArraySetAsSeries(NDIArray,true); //Filling data according to created ADX CopyBuffer(ADXDef,0,0,3,ADXArray0); CopyBuffer(ADXDef,0,0,2,ADXArray1); CopyBuffer(ADXDef,1,0,3,PDIArray); CopyBuffer(ADXDef,2,0,3,NDIArray); //Getting values of the current data double ADXValue=NormalizeDouble(ADXArray0[0], 2); double ADXValueLast=NormalizeDouble(ADXArray1[1], 2); double PDIValue=NormalizeDouble(PDIArray[0], 2); double NDIValue=NormalizeDouble(NDIArray[0], 2); //////////////////////////CONDITIONS//////////////////////////////////////////// bool BUY_CONDITION_1 = (vidyaVal > vidyaVal1); bool BUY_CONDITION_2 = (acValue > acMaxValue) && (closingPriceACMA > maValueACMA); bool BUY_CONDITION_3 = (aoValue > 0) && (closingPriceAO > maValueAO); bool BUY_CONDITION_4 = (pArrayRVI_MA[0].close > maValueRVI_MA) && (rviValue > rviSignalValue); bool BUY_CONDITION_5 = (ADXValue > 25) && (ADXValue > ADXValueLast); bool BUY_CONDITION_6 = (PDIValue > NDIValue); bool BUY_CONDITION_7 = (currentHighDeMarker > prevHighDeMarker) && (deMarkerVal < deMarkerPrevVal); //For BEARISH DIVERGENCE. bool SELL_CONDITION_1 = (vidyaVal < vidyaVal1); bool SELL_CONDITION_2 = (acValue < acMinValue) && (closingPriceACMA < maValueACMA); bool SELL_CONDITION_3 = (aoValue < 0) && (closingPriceAO < maValueAO); bool SELL_CONDITION_4 = (pArrayRVI_MA[0].close < maValueRVI_MA) && (rviValue < rviSignalValue); bool SELL_CONDITION_5 = (ADXValue > 25) && (ADXValue > ADXValueLast); bool SELL_CONDITION_6 = (PDIValue < NDIValue); bool SELL_CONDITION_7 = (currentLowDeMarker < prevLowDeMarker) && (deMarkerVal > deMarkerPrevVal); //For BULLISH DIVERGENCE. if((BUY_CONDITION_1) == 1) { Comment("BUY","\n", "Current Close Value is ",currentCloseVIDYA,"\n", "Current VIDYA (9,12) Value is ",vidyaVal,"\n", "Current VIDYA (20,50) Value is ",vidyaVal1); if((BUY_CONDITION_5 && BUY_CONDITION_6) == 1) { Comment("AC Closing Price Is ", closingPriceACMA, "\n", "AC Value Is ", acValue, "\n", "AC Max Value Is ", acMaxValue, "\n", "AC Min Value Is ", acMinValue, "\n", "AC MA Value Is ", maValueACMA, "\n", "AO Closing Price is ", closingPriceAO, "\n", "AO Value Is ", aoValue, "\n", "AO MA Value Is ", maValueAO, "\n", "RVI Closing price is ", pArrayRVI_MA[0].close, "\n", "RVI MA Value is ", maValueRVI_MA, "\n", "Relative Vigor Index Is ", rviValue, "\n", "RVI Signal Value Is ", rviSignalValue, "\n", "ADX Value is ", ADXValue, "\n", "ADX Value Last is ", ADXValueLast, "\n", "+DI Value is ", PDIValue, "\n", "-DI Value is ", NDIValue, "\n", "Current High Is ", currentHighDeMarker, "\n", "Prev. High Value Is ", prevHighDeMarker, "\n", "Current DeMarker Value Is ", deMarkerVal, "\n", "Prev. DeMarker Value Is ", deMarkerPrevVal); } } if((SELL_CONDITION_1) == 1) { Comment("SELL","\n", "Current Close Value is ",currentCloseVIDYA,"\n", "Current VIDYA (9,12) Value is ",vidyaVal,"\n", "Current VIDYA (20,50) Value is ",vidyaVal1); if((SELL_CONDITION_5 && SELL_CONDITION_6) == 1) { Comment("AC Closing Price Is ", closingPriceACMA, "\n", "AC Value Is ", acValue, "\n", "AC Max Value Is ", acMaxValue, "\n", "AC Min Value Is ", acMinValue, "\n", "AC MA Value is ", maValueACMA, "\n", "AO Closing Price Is ", closingPriceAO, "\n", "AO Value Is ", aoValue, "\n", "AO MA Value Is ", maValueAO, "\n", "RVI Closing Price Is ", pArrayRVI_MA[0].close, "\n", "RVI MA Value Is ", maValueRVI_MA, "\n", "Relative Vigor Index Is ", rviValue, "\n", "RVI Signal Value Is ", rviSignalValue, "\n", "ADX Value is ", ADXValue, "\n", "ADX Value Last is ", ADXValueLast, "\n", "+DI Value is ", PDIValue, "\n", "-DI Value is ", NDIValue, "\n", "Current Low Is ", currentLowDeMarker, "\n", "Prev. Low Is ", prevLowDeMarker, "\n", "Current DeMarker Value Is ", deMarkerVal, "\n", "Prev. DeMarker Value Is ", deMarkerPrevVal); } } } //+------------------------------------------------------------------+
//| Timer function |
//+------------------------------------------------------------------+
void OnTimer() {
//--- }
//+------------------------------------------------------------------+
//| Trade function |
//+------------------------------------------------------------------+
void OnTrade() {
//--- }
//+------------------------------------------------------------------+
//| TradeTransaction function |
//+------------------------------------------------------------------+
void OnTradeTransaction(const MqlTradeTransaction& trans, const MqlTradeRequest& request, const MqlTradeResult& result) {
//--- }
//+------------------------------------------------------------------+
//| Tester function |
//+------------------------------------------------------------------+
double OnTester() {
//--- double ret=0.0;
//--- //--- return(ret); }
//+------------------------------------------------------------------+
//| TesterInit function |
//+------------------------------------------------------------------+
void OnTesterInit() {
//--- }
//+------------------------------------------------------------------+
//| TesterPass function |
//+------------------------------------------------------------------+
void OnTesterPass() {
//--- }
//+------------------------------------------------------------------+
//| TesterDeinit function |
//+------------------------------------------------------------------+
void OnTesterDeinit() {
//--- }
//+------------------------------------------------------------------+
//| ChartEvent function |
//+------------------------------------------------------------------+
void OnChartEvent(const int id, const long &lparam, const double &dparam, const string &sparam) {
//--- }
//+------------------------------------------------------------------+
//| BookEvent function |
//+------------------------------------------------------------------+
void OnBookEvent(const string &symbol) {
//--- }
//+------------------------------------------------------------------+ //+------------------------------------------------------------------+ //+------------------------------------------------------------------+ //+------------------------------------------------------------------+ //+------------------------------------------------------------------+ //+------------------------------------------------------------------+ //+------------------------------------------------------------------+ //+------------------------------------------------------------------+ //+------------------------------------------------------------------+ //+------------------------------------------------------------------+ //+------------------------------------------------------------------+ //+------------------------------------------------------------------+ //+------------------------------------------------------------------+ //+------------------------------------------------------------------+ //+------------------------------------------------------------------+ //+------------------------------------------------------------------+ //+------------------------------------------------------------------+
This is a new article to continue our series for beginners about how to design a trading system based on some of the popular indicators. We will learn a new indicator that is On Balance Volume (OBV), and we will learn how we can use it and design a trading system based on it.
In this article, we will continue our series about how to design a trading system using the most popular indicators. In this article, we will learn about the Parabolic SAR indicator in detail and how we can design a trading system to be used in MetaTrader 5 using some simple strategies.
In this article, we will learn a new technical tool that can be used in trading, as a continuation within the series in which we learn how to design simple trading systems. This time we will work with another popular technical indicator: Average True Range (ATR).
In this article, we will continue our series about designing a trading system using the most popular indicators and we will talk about the average directional index (ADX) indicator. We will learn this indicator in detail to understand it well and we will learn how we to use it through a simple strategy. By learning something deeply we can get more insights and we can use it better.
In this article, we continue our learning series — this time we will learn how to design a trading system using one of the most popular and useful indicators, which is the Stochastic Oscillator indicator, to build a new block in our knowledge of basics.
In this article, we will learn a new tool from our series: we will learn how to design a trading system based on one of the most popular technical indicators Moving Average Convergence Divergence (MACD).
In this new article from our series for learning how to design trading systems, I will present the Commodities Channel Index (CCI), explain its specifics, and share with you how to create a trading system based on this indicator.
In my previous article, I mentioned the importance of identifying the trend which is the direction of prices. In this article I will share one of the most important concepts and indicators which is the Momentum indicator. I will share how to design a trading system based on this Momentum indicator.
In this article, I will share with you one of the most popular and commonly used indicators in the world of trading which is RSI. You will learn how to design a trading system using this indicator.
In this article, I will share with you one of the methods of how to trade bands. This time we will consider Envelopes and will see how easy it is to create some strategies based on the Envelopes.
In this article, we will learn about Bollinger Bands which is one of the most popular indicators in the trading world. We will consider technical analysis and see how to design an algorithmic trading system based on the Bollinger Bands indicator.
There are many strategies that can be used to filter generated signals based on any strategy, even by using the moving average itself which is the subject of this article. So, the objective of this article is to share with you some of Moving Average Strategies and how to design an algorithmic trading system.
This article shows the basics of MQL for beginners to design their Algorithmic trading system (Expert Advisor) through designing a simple algorithmic trading system after mentioning some basics of MQL5