Skip to content

Commit

Permalink
version 3.16
Browse files Browse the repository at this point in the history
  • Loading branch information
9nix6 committed Apr 28, 2021
1 parent eca8775 commit c20b748
Show file tree
Hide file tree
Showing 72 changed files with 406 additions and 312 deletions.
Binary file modified Experts/2MA_Cross.ex5
Binary file not shown.
61 changes: 52 additions & 9 deletions Experts/2MA_Cross.mq5
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
#property copyright "Copyright 2017-2021, Artur Zas"
// GNU General Public License v3.0 -> https://github.com/9nix6/Median-and-Turbo-Renko-indicator-bundle/blob/master/LICENSE
#property link "https://www.az-invest.eu"
#property version "1.13"
//#define ULTIMATE_RENKO_LICENSE // uncomment when used on Ultimate Renko chart from https://www.az-invest.eu/ultimate-renko-indicator-generator-for-metatrader-5
//#define TICKCHART_LICENSE // uncomment when used on a Tick chart from https://www.az-invest.eu/Tick-chart-and-volume-chart-for-mt5
#property version "1.16"

//#define ULTIMATE_RENKO_LICENSE // uncomment when used on Ultimate Renko chart from https://www.az-invest.eu/ultimate-renko-indicator-generator-for-metatrader-5
//#define VOLUMECHART_LICENSE // uncomment when used on a Tick & Volume bar chart from https://www.az-invest.eu/Tick-chart-and-volume-chart-for-mt5
//#define RANGEBAR_LICENSE // uncomment when used on a Tick & Volume bar chart from https://www.az-invest.eu/rangebars-for-metatrader-5
//#define SECONDSCHART_LICENSE // uncomment when used on a Seconds TF bar chart from https://www.az-invest.eu/seconds-timeframe-chart-for-metatrader-5
//#define LINEBREAKCHART_LICENSE // uncomment when used on a Line Break chart from https://www.az-invest.eu
//
// Uncomment only ONE of the 3 directives listed below and recompile
// Uncomment only ONE of the 5 directives listed below and recompile
// -----------------------------------------------------------------
//
//
//#define EA_ON_RANGE_BARS // Use EA on RangeBar chart
//#define EA_ON_RENKO // Use EA on Renko charts
#define EA_ON_XTICK_CHART // Use EA on XTick Chart
//#define EA_ON_RANGE_BARS // Use EA on RangeBar chart
//#define EA_ON_RENKO // Use EA on Renko charts
//#define EA_ON_XTICK_CHART // Use EA on XTick Chart (obsolete)
#define EA_ON_TICK_VOLUME_CHART // Use EA on Tick & Volume Bar Chart
//#define EA_ON_SECONDS_CHART // Use EA on Seconds Interval chart
//#define EA_ON_LINEBREAK_CHART // Use EA on LineBreak charts

//#define DEVELOPER_VERSION // used when I develop ;) should always be commented out

// Uncomment the directive below and recompile if EA is used with P-Renko BR Ultimate
// ----------------------------------------------------------------------------------
Expand All @@ -38,6 +46,18 @@
#include <AZ-INVEST/SDK/TickChart.mqh>
TickChart *customBars = NULL;
#endif
#ifdef EA_ON_TICK_VOLUME_CHART
#include <AZ-INVEST/SDK/VolumeBarChart.mqh>
TickChart *customBars = NULL;
#endif
#ifdef EA_ON_SECONDS_CHART
#include <AZ-INVEST/SDK/SecondsChart.mqh>
SecondsChart *customBars = NULL;
#endif
#ifdef EA_ON_LINEBREAK_CHART
#include <AZ-INVEST/SDK/LineBreakChart.mqh>
LineBreakChart *customBars = NULL;
#endif

#include <AZ-INVEST/SDK/TimeControl.mqh>
#include <AZ-INVEST/SDK/TradeFunctions.mqh>
Expand All @@ -49,8 +69,10 @@ enum ENUM_TRADE_DIRECTION
TRADE_DIRECTION_ALL = 1000, // Buy & Sell
};

// EA input parameters

#ifdef SHOW_INDICATOR_INPUTS
input group "EA parameters"
#endif
input double Lots = 0.1; // Traded lots
input uint StopLoss = 100; // Stop Loss (in points)
input uint TakeProfit = 250; // Take profit (in points)
Expand Down Expand Up @@ -99,6 +121,18 @@ ENUM_POSITION_TYPE validation;
static int _MA1 = TICKCHART_MA1;
static int _MA2 = TICKCHART_MA2;
#endif
#ifdef EA_ON_TICK_VOLUME_CHART
static int _MA1 = VOLUMECHART_MA1;
static int _MA2 = VOLUMECHART_MA2;
#endif
#ifdef EA_ON_SECONDS_CHART
static int _MA1 = SECONDS_MA1;
static int _MA2 = SECONDS_MA2;
#endif
#ifdef EA_ON_LINEBREAK_CHART
static int _MA1 = LINEBREAK_MA1;
static int _MA2 = LINEBREAK_MA2;
#endif

//+------------------------------------------------------------------+
//| Expert initialization function |
Expand All @@ -116,6 +150,15 @@ int OnInit()
#ifdef EA_ON_XTICK_CHART
customBars = new TickChart(MQLInfoInteger((int)MQL5_TESTING) ? false : true);
#endif
#ifdef EA_ON_TICK_VOLUME_CHART
customBars = new TickChart(MQLInfoInteger((int)MQL5_TESTING) ? false : true);
#endif
#ifdef EA_ON_SECONDS_CHART
customBars = new SecondsChart(MQLInfoInteger((int)MQL5_TESTING) ? false : true);
#endif
#ifdef EA_ON_LINEBREAK_CHART
customBars = new LineBreakChart(MQLInfoInteger((int)MQL5_TESTING) ? false : true);
#endif
}

customBars.Init();
Expand Down
Binary file modified Experts/PriceMA_Cross.ex5
Binary file not shown.
61 changes: 52 additions & 9 deletions Experts/PriceMA_Cross.mq5
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
#property copyright "Copyright 2017-2021, Artur Zas"
// GNU General Public License v3.0 -> https://github.com/9nix6/Median-and-Turbo-Renko-indicator-bundle/blob/master/LICENSE
#property link "https://www.az-invest.eu"
#property version "1.05"
#property version "1.08"

//#define ULTIMATE_RENKO_LICENSE // uncomment when used on Ultimate Renko chart from https://www.az-invest.eu/ultimate-renko-indicator-generator-for-metatrader-5
//#define TICKCHART_LICENSE // uncomment when used on a Tick chart from https://www.az-invest.eu/Tick-chart-and-volume-chart-for-mt5
//#define VOLUMECHART_LICENSE // uncomment when used on a Tick & Volume bar chart from https://www.az-invest.eu/Tick-chart-and-volume-chart-for-mt5
//#define RANGEBAR_LICENSE // uncomment when used on a Tick & Volume bar chart from https://www.az-invest.eu/rangebars-for-metatrader-5
//#define SECONDSCHART_LICENSE // uncomment when used on a Seconds TF bar chart from https://www.az-invest.eu/seconds-timeframe-chart-for-metatrader-5
//#define LINEBREAKCHART_LICENSE // uncomment when used on a Line Break chart from https://www.az-invest.eu

//
// Uncomment only ONE of the 3 directives listed below and recompile
// Uncomment only ONE of the 5 directives listed below and recompile
// -----------------------------------------------------------------
//
//
//#define EA_ON_RANGE_BARS // Use EA on RangeBar chart
//#define EA_ON_RENKO // Use EA on Renko charts
#define EA_ON_XTICK_CHART // Use EA on XTick Chart
//#define EA_ON_RANGE_BARS // Use EA on RangeBar chart
//#define EA_ON_RENKO // Use EA on Renko charts
//#define EA_ON_XTICK_CHART // Use EA on XTick Chart (obsolete)
#define EA_ON_TICK_VOLUME_CHART // Use EA on Tick & Volume Bar Chart
//#define EA_ON_SECONDS_CHART // Use EA on Seconds Interval chart
//#define EA_ON_LINEBREAK_CHART // Use EA on LineBreak charts

//#define DEVELOPER_VERSION // used when I develop ;) should always be commented out

// Uncomment the directive below and recompile if EA is used with P-Renko BR Ultimate
// ----------------------------------------------------------------------------------
Expand All @@ -38,6 +47,18 @@
#include <AZ-INVEST/SDK/TickChart.mqh>
TickChart *customBars = NULL;
#endif
#ifdef EA_ON_TICK_VOLUME_CHART
#include <AZ-INVEST/SDK/VolumeBarChart.mqh>
TickChart *customBars = NULL;
#endif
#ifdef EA_ON_SECONDS_CHART
#include <AZ-INVEST/SDK/SecondsChart.mqh>
SecondsChart *customBars = NULL;
#endif
#ifdef EA_ON_LINEBREAK_CHART
#include <AZ-INVEST/SDK/LineBreakChart.mqh>
LineBreakChart *customBars = NULL;
#endif

#include <AZ-INVEST/SDK/TimeControl.mqh>
#include <AZ-INVEST/SDK/TradeFunctions.mqh>
Expand All @@ -49,8 +70,9 @@ enum ENUM_TRADE_DIRECTION
TRADE_DIRECTION_ALL = 1000, // Buy & Sell
};

// EA input parameters

#ifdef SHOW_INDICATOR_INPUTS
input group "EA parameters"
#endif
input double Lots = 0.1; // Traded lots
input uint StopLoss = 0; // Stop Loss
input uint TakeProfit = 0; // Take profit
Expand Down Expand Up @@ -103,6 +125,18 @@ ENUM_POSITION_TYPE validation;
static int _MA1 = TICKCHART_MA1;
static int _MA2 = TICKCHART_MA2;
#endif
#ifdef EA_ON_TICK_VOLUME_CHART
static int _MA1 = VOLUMECHART_MA1;
static int _MA2 = VOLUMECHART_MA2;
#endif
#ifdef EA_ON_SECONDS_CHART
static int _MA1 = SECONDS_MA1;
static int _MA2 = SECONDS_MA2;
#endif
#ifdef EA_ON_LINEBREAK_CHART
static int _MA1 = LINEBREAK_MA1;
static int _MA2 = LINEBREAK_MA2;
#endif

//+------------------------------------------------------------------+
//| Expert initialization function |
Expand All @@ -120,6 +154,15 @@ int OnInit()
#ifdef EA_ON_XTICK_CHART
customBars = new TickChart(MQLInfoInteger((int)MQL5_TESTING) ? false : true);
#endif
#ifdef EA_ON_TICK_VOLUME_CHART
customBars = new TickChart(MQLInfoInteger((int)MQL5_TESTING) ? false : true);
#endif
#ifdef EA_ON_SECONDS_CHART
customBars = new SecondsChart(MQLInfoInteger((int)MQL5_TESTING) ? false : true);
#endif
#ifdef EA_ON_LINEBREAK_CHART
customBars = new LineBreakChart(MQLInfoInteger((int)MQL5_TESTING) ? false : true);
#endif
}

customBars.Init();
Expand Down
Binary file added Experts/TickChart_ExampleEA.ex5
Binary file not shown.
4 changes: 2 additions & 2 deletions Experts/TickChart_ExampleEA.mq5
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ input int InpRSIPeriod = 14; // RSI period
// You need to include the TickChart.mqh header file
//

#include <AZ-INVEST/SDK/TickChart.mqh>
#include <AZ-INVEST/SDK/VolumeBarChart.mqh>
//
// To use the TickChart indicator in your EA you need do instantiate the indicator class (TickChart)
// and call the Init() and Deinit() methods in your EA's OnInit() and OnDeinit() functions.
Expand Down Expand Up @@ -114,7 +114,7 @@ void OnTick()
double MA1[]; // array to be filled by values of the first moving average
double MA2[]; // array to be filled by values of the second moving average

if(tickChart.GetMA(TICKCHART_MA1, MA1, startAtBar, numberOfBars) && tickChart.GetMA(TICKCHART_MA2, MA2, startAtBar, numberOfBars))
if(tickChart.GetMA(VOLUMECHART_MA1, MA1, startAtBar, numberOfBars) && tickChart.GetMA(VOLUMECHART_MA2, MA2, startAtBar, numberOfBars))
{
//
// Values are stored in the MA1 and MA2 arrays and are now ready for use
Expand Down
23 changes: 19 additions & 4 deletions Include/AZ-INVEST/CustomBarConfig.mqh
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
//#define DEVELOPER_VERSION
//#define DISPLAY_DEBUG_MSG
#define MQL5_MARKET_VERSION

//#define P_RENKO_BR_PRO
//#define ULTIMATE_RENKO_LICENSE
//#define RANGEBARS_LICENSE
//#define RANGEBAR_LICENSE
//#define SECONDSCHART_LICENSE
#define TICKCHART_LICENSE
//#define VOLUMECHART_LICENSE
//#define TICKCHART_LICENSE
#define VOLUMECHART_LICENSE
//#define LINEBREAKCHART_LICENSE

#ifdef P_RENKO_BR_PRO
#include <AZ-INVEST/SDK/MedianRenkoIndicator.mqh>
#define AZINVEST_CCI MedianRenkoIndicator
#endif

#ifdef TICKCHART_LICENSE
#include <AZ-INVEST/SDK/TickChartIndicator.mqh>
#define AZINVEST_CCI TickChartIndicator
#endif

#ifdef RANGEBARS_LICENSE
#ifdef RANGEBAR_LICENSE
#include <AZ-INVEST/SDK/RangeBarIndicator.mqh>
#define AZINVEST_CCI RangeBarIndicator
#endif
Expand All @@ -31,6 +40,12 @@
#define AZINVEST_CCI VolumeChartIndicator
#endif

#ifdef LINEBREAKCHART_LICENSE
#include <AZ-INVEST/SDK/LineBreakChartIndicator.mqh>
#define AZINVEST_CCI LineBreakChartIndicator
#endif


#ifdef AZINVEST_CCI
AZINVEST_CCI customChartIndicator;
#endif
Expand Down
Binary file modified Include/AZ-INVEST/SDK/CommonSettings.mqh
Binary file not shown.
Binary file modified Include/AZ-INVEST/SDK/CustomChartInputs.mqh
Binary file not shown.
Binary file modified Include/AZ-INVEST/SDK/CustomChartSettingsBase.mqh
Binary file not shown.
31 changes: 0 additions & 31 deletions Include/AZ-INVEST/SDK/IndicatorAccess.mqh

This file was deleted.

97 changes: 0 additions & 97 deletions Include/AZ-INVEST/SDK/TickCustomChartSettings.mqh

This file was deleted.

Loading

0 comments on commit c20b748

Please sign in to comment.