add MQL5Test Workspace Content as BKP Solution ...

This commit is contained in:
2024-04-22 07:42:50 +03:30
parent ec0a03203e
commit f7fd579a9d
197 changed files with 80113 additions and 0 deletions
@@ -0,0 +1,269 @@
2024.04.01 06:30:00 XEA > Peaks and Vales
2024.04.01 06:30:00 XEA > Supprot and Resistance:
2024.04.01 06:30:00 R1: 1.07873
2024.04.01 06:30:00 R2: 1.07986
2024.04.01 06:30:00
2024.04.01 06:30:00 S1: 1.07819
2024.04.01 06:30:00 S2: 1.07743
2024.04.01 06:30:00
2024.04.01 06:30:00
2024.04.01 06:30:00 XEA >
2024.04.01 06:30:00 XEA > Ichimoku Kinko Hyo
2024.04.01 06:30:00 XEA > Supprot and Resistance:
2024.04.01 06:30:00 R1: 1.0787149999999999
2024.04.01 06:30:00 R2: 1.0788
2024.04.01 06:30:00
2024.04.01 06:30:00 S1: 0.0
2024.04.01 06:30:00 S2: 0.0
2024.04.01 15:30:00 XEA > Peaks and Vales
2024.04.01 15:30:00 XEA > Supprot and Resistance:
2024.04.01 15:30:00 R1: 1.07849
2024.04.01 15:30:00 R2: 1.07903
2024.04.01 15:30:00
2024.04.01 15:30:00 S1: 0.0
2024.04.01 15:30:00 S2: 0.0
2024.04.01 15:30:00
2024.04.01 15:30:00
2024.04.01 15:30:00 XEA >
2024.04.01 15:30:00 XEA > Ichimoku Kinko Hyo
2024.04.01 15:30:00 XEA > Supprot and Resistance:
2024.04.01 15:30:00 R1: 1.0782349999999998
2024.04.01 15:30:00 R2: 1.07844
2024.04.01 15:30:00
2024.04.01 15:30:00 S1: 0.0
2024.04.01 15:30:00 S2: 0.0
2024.04.01 16:20:00 XEA > Peaks and Vales
2024.04.01 16:20:00 XEA > Supprot and Resistance:
2024.04.01 16:20:00 R1: 1.07855
2024.04.01 16:20:00 R2: 1.07903
2024.04.01 16:20:00
2024.04.01 16:20:00 S1: 0.0
2024.04.01 16:20:00 S2: 0.0
2024.04.01 16:20:00
2024.04.01 16:20:00
2024.04.01 16:20:00 XEA >
2024.04.01 16:20:00 XEA > Ichimoku Kinko Hyo
2024.04.01 16:20:00 XEA > Supprot and Resistance:
2024.04.01 16:20:00 R1: 1.078125
2024.04.01 16:20:00 R2: 1.07817
2024.04.01 16:20:00
2024.04.01 16:20:00 S1: 0.0
2024.04.01 16:20:00 S2: 0.0
2024.04.01 17:45:02 XEA > Peaks and Vales
2024.04.01 17:45:02 XEA > Supprot and Resistance:
2024.04.01 17:45:02 R1: 1.0781
2024.04.01 17:45:02 R2: 1.07826
2024.04.01 17:45:02
2024.04.01 17:45:02 S1: 0.0
2024.04.01 17:45:02 S2: 0.0
2024.04.01 17:45:02
2024.04.01 17:45:02
2024.04.01 17:45:02 XEA >
2024.04.01 17:45:02 XEA > Ichimoku Kinko Hyo
2024.04.01 17:45:02 XEA > Supprot and Resistance:
2024.04.01 17:45:02 R1: 1.077985
2024.04.01 17:45:02 R2: 1.078125
2024.04.01 17:45:02
2024.04.01 17:45:02 S1: 0.0
2024.04.01 17:45:02 S2: 0.0
2024.04.01 17:45:02
2024.04.01 17:45:02
2024.04.01 18:15:00 XEA > Peaks and Vales
2024.04.01 18:15:00 XEA > Supprot and Resistance:
2024.04.01 18:15:00 R1: 1.07805
2024.04.01 18:15:00 R2: 1.07853
2024.04.01 18:15:00
2024.04.01 18:15:00 S1: 0.0
2024.04.01 18:15:00 S2: 0.0
2024.04.01 18:15:00
2024.04.01 18:15:00
2024.04.01 18:15:00 XEA >
2024.04.01 18:15:00 XEA > Ichimoku Kinko Hyo
2024.04.01 18:15:00 XEA > Supprot and Resistance:
2024.04.01 18:15:00 R1: 1.07611
2024.04.01 18:15:00 R2: 1.0763449999999999
2024.04.01 18:15:00
2024.04.01 18:15:00 S1: 0.0
2024.04.01 18:15:00 S2: 0.0
2024.04.01 18:15:00
2024.04.01 18:15:00
2024.04.01 18:25:00 XEA > Peaks and Vales
2024.04.01 18:25:00 XEA > Supprot and Resistance:
2024.04.01 18:25:00 R1: 1.07805
2024.04.01 18:25:00 R2: 1.07853
2024.04.01 18:25:00
2024.04.01 18:25:00 S1: 0.0
2024.04.01 18:25:00 S2: 0.0
2024.04.01 18:25:00
2024.04.01 18:25:00
2024.04.01 18:25:00 XEA >
2024.04.01 18:25:00 XEA > Ichimoku Kinko Hyo
2024.04.01 18:25:00 XEA > Supprot and Resistance:
2024.04.01 18:25:00 R1: 1.07611
2024.04.01 18:25:00 R2: 1.0763449999999999
2024.04.01 18:25:00
2024.04.01 18:25:00 S1: 0.0
2024.04.01 18:25:00 S2: 0.0
2024.04.01 18:25:00
2024.04.01 18:25:00
2024.04.02 01:50:02 XEA > Peaks and Vales
2024.04.02 01:50:02 XEA > Supprot and Resistance:
2024.04.02 01:50:02 R1: 1.07849
2024.04.02 01:50:02 R2: 1.07903
2024.04.02 01:50:02
2024.04.02 01:50:02 S1: 1.07363
2024.04.02 01:50:02 S2: 1.07342
2024.04.02 01:50:02
2024.04.02 01:50:02
2024.04.02 01:50:02 XEA >
2024.04.02 01:50:02 XEA > Ichimoku Kinko Hyo
2024.04.02 01:50:02 XEA > Supprot and Resistance:
2024.04.02 01:50:02 R1: 1.074205
2024.04.02 01:50:02 R2: 1.07428
2024.04.02 01:50:02
2024.04.02 01:50:02 S1: 1.0740675
2024.04.02 01:50:02 S2: 1.074025
2024.04.02 01:50:02
2024.04.02 01:50:02
2024.04.02 02:05:00 XEA > Peaks and Vales
2024.04.02 02:05:00 XEA > Supprot and Resistance:
2024.04.02 02:05:00 R1: 1.07416
2024.04.02 02:05:00 R2: 1.0744
2024.04.02 02:05:00
2024.04.02 02:05:00 S1: 1.07366
2024.04.02 02:05:00 S2: 0.0
2024.04.02 02:05:00
2024.04.02 02:05:00
2024.04.02 02:05:00 XEA >
2024.04.02 02:05:00 XEA > Ichimoku Kinko Hyo
2024.04.02 02:05:00 XEA > Supprot and Resistance:
2024.04.02 02:05:00 R1: 1.074025
2024.04.02 02:05:00 R2: 1.0740675
2024.04.02 02:05:00
2024.04.02 02:05:00 S1: 1.073385
2024.04.02 02:05:00 S2: 0.0
2024.04.02 02:05:00
2024.04.02 02:05:00
2024.04.02 03:35:00 XEA > Peaks and Vales
2024.04.02 03:35:00 XEA > Supprot and Resistance:
2024.04.02 03:35:00 R1: 1.07399
2024.04.02 03:35:00 R2: 1.07425
2024.04.02 03:35:00
2024.04.02 03:35:00 S1: 0.0
2024.04.02 03:35:00 S2: 0.0
2024.04.02 03:35:00
2024.04.02 03:35:00
2024.04.02 03:35:00 XEA >
2024.04.02 03:35:00 XEA > Ichimoku Kinko Hyo
2024.04.02 03:35:00 XEA > Supprot and Resistance:
2024.04.02 03:35:00 R1: 1.073385
2024.04.02 03:35:00 R2: 1.073705
2024.04.02 03:35:00
2024.04.02 03:35:00 S1: 0.0
2024.04.02 03:35:00 S2: 0.0
2024.04.02 03:35:00
2024.04.02 03:35:00
2024.04.02 06:25:00 XEA > Peaks and Vales
2024.04.02 06:25:00 XEA > Supprot and Resistance:
2024.04.02 06:25:00 R1: 1.07366
2024.04.02 06:25:00 R2: 1.07512
2024.04.02 06:25:00
2024.04.02 06:25:00 S1: 1.07312
2024.04.02 06:25:00 S2: 0.0
2024.04.02 06:25:00
2024.04.02 06:25:00
2024.04.02 06:25:00 XEA >
2024.04.02 06:25:00 XEA > Ichimoku Kinko Hyo
2024.04.02 06:25:00 XEA > Supprot and Resistance:
2024.04.02 06:25:00 R1: 1.073485
2024.04.02 06:25:00 R2: 1.0736249999999998
2024.04.02 06:25:00
2024.04.02 06:25:00 S1: 0.0
2024.04.02 06:25:00 S2: 0.0
2024.04.02 06:25:00
2024.04.02 06:25:00
2024.04.10 19:00:04 XEA > Peaks and Vales
2024.04.10 19:00:04 XEA > Supprot and Resistance:
2024.04.10 19:00:04 R1: 1.07795
2024.04.10 19:00:04 R2: 1.08617
2024.04.10 19:00:04
2024.04.10 19:00:04 S1: 0.0
2024.04.10 19:00:04 S2: 0.0
2024.04.10 19:00:04
2024.04.10 19:00:04
2024.04.10 19:00:04 XEA >
2024.04.10 19:00:04 XEA > Ichimoku Kinko Hyo
2024.04.10 19:00:04 XEA > Supprot and Resistance:
2024.04.10 19:00:04 R1: 1.073705
2024.04.10 19:00:04 R2: 1.07374
2024.04.10 19:00:04
2024.04.10 19:00:04 S1: 1.073275
2024.04.10 19:00:04 S2: 1.0732050000000002
2024.04.10 19:00:04
2024.04.10 19:00:04
2024.04.10 19:40:00 XEA > Peaks and Vales
2024.04.10 19:40:00 XEA > Supprot and Resistance:
2024.04.10 19:40:00 R1: 1.07742
2024.04.10 19:40:00 R2: 1.08584
2024.04.10 19:40:00
2024.04.10 19:40:00 S1: 0.0
2024.04.10 19:40:00 S2: 0.0
2024.04.10 19:40:00
2024.04.10 19:40:00
2024.04.10 19:40:00 XEA >
2024.04.10 19:40:00 XEA > Ichimoku Kinko Hyo
2024.04.10 19:40:00 XEA > Supprot and Resistance:
2024.04.10 19:40:00 R1: 1.0732050000000002
2024.04.10 19:40:00 R2: 1.073275
2024.04.10 19:40:00
2024.04.10 19:40:00 S1: 1.072805
2024.04.10 19:40:00 S2: 0.0
2024.04.10 19:40:00
2024.04.10 19:40:00
2024.04.11 03:10:00 XEA > Peaks and Vales
2024.04.11 03:10:00 XEA > Supprot and Resistance:
2024.04.11 03:10:00 R1: 1.07425
2024.04.11 03:10:00 R2: 1.07542
2024.04.11 03:10:00
2024.04.11 03:10:00 S1: 0.0
2024.04.11 03:10:00 S2: 0.0
2024.04.11 03:10:00
2024.04.11 03:10:00
2024.04.11 03:10:00 XEA >
2024.04.11 03:10:00 XEA > Ichimoku Kinko Hyo
2024.04.11 03:10:00 XEA > Supprot and Resistance:
2024.04.11 03:10:00 R1: 1.074115
2024.04.11 03:10:00 R2: 1.07416
2024.04.11 03:10:00
2024.04.11 03:10:00 S1: 1.0738750000000001
2024.04.11 03:10:00 S2: 1.0738050000000001
2024.04.11 03:10:00
2024.04.11 03:10:00
+361
View File
@@ -0,0 +1,361 @@
///////////////////////////////////////////////////////
//
// SaherElm IT Center MQL5 Candle Indicator
// ---------------------------------------------
// Name: XTM
// Description: Trend Magic Indicator ...
//
//
// Maintainer:
// ------------
// Hadi Khazaee Asl (hadi_khazaee_asl@yahoo.com)
//
//////////////////////////////////////////////////////
//
// Global Properties ...
#property copyright "Copyright 2023, SaherElm IT Center"
#property link "https://saherelm.ir"
#property version "1.00"
#property description "SaherElm XTM Indicator"
#property strict
//
// START Constants ...
//
#define ShortName "XTM"
//
// XTM Indicator States ...
enum ENUM_X_XTM_STATES
{
X_XTM_BULLISH = 1,
X_XTM_BEARISH = -1,
X_XTM_NEUTURAL = 0,
};
//
// END Constants ...
//
//
// START Inputs ...
//
//
input group "Makret";
input int maPeriod = 35; // Period
input int maShift = 0; // Shift
input ENUM_MA_METHOD maMethod = MODE_SMA; // Method
input ENUM_APPLIED_PRICE maAppliedTo = PRICE_LOW; // Applied To
input group "Presentation";
input bool showLine = true; // Show Line
//
// END Inputs ...
//
//
// Includes Logging Library ...
#include "../Libraries/x-saherelm.log.lib.mq5"
//
// Includes Common Library ...
#include "../Libraries/x-saherelm.common.lib.mq5"
//
// START Buffers ...
//
#property indicator_chart_window
//
#property indicator_buffers 3
#property indicator_plots 1
//
// maBuffer ...
#define maBufferIndex 0
#define maColorBufferIndex 1
#define stateBufferIndex 2
double maBuffer[];
double maColorBuffer[];
double stateBuffer[];
#property indicator_label1 "XTM"
#property indicator_type1 DRAW_COLOR_LINE
#property indicator_color1 clrLime, clrGray, clrRed
#property indicator_style1 STYLE_SOLID
#property indicator_width1 1
//
// END Buffers ...
//
//
// START Global Definitions: Variables, Properties and etc ...
//
int maHandler = INVALID_HANDLE;
//
// END Global Definitions: Variables, Properties and etc ...
//
//
// START Event Handlers ...
//
//
// Initialization ...
int OnInit()
{
//
// Validate Inputs ...
if (!ValidateInputs())
{
return INIT_PARAMETERS_INCORRECT;
}
//
logTag = ShortName;
//
// Initializing MA Handler ...
maHandler = iMA(
_Symbol,
_Period,
maPeriod,
maShift,
maMethod,
maAppliedTo);
if (maHandler == INVALID_HANDLE)
{
//
string message = "Error Initializing Ma Handler ...";
LogMessage(message);
//
return INIT_FAILED;
}
//
// Define Index Buffers ...
DefineBuffers();
//
// Set Indicator ShortName ...
SetIndicatorName();
//
// Init Succeed ...
return INIT_SUCCEEDED;
}
//
// DeInitialization ...
void OnDeinit(const int reason)
{
//
// REASON_PROGRAM 0 The EA has stopped working calling the ExpertRemove() function
// REASON_REMOVE 1 Program removed from a chart
// REASON_RECOMPILE 2 Program recompiled
// REASON_CHARTCHANGE 3 A symbol or a chart period is changed
// REASON_CHARTCLOSE 4 Chart closed
// REASON_PARAMETERS 5 Inputs changed by a user
// REASON_ACCOUNT 6 Another account has been activated or reconnection to the trade server has occurred due to changes in the account settings
// REASON_TEMPLATE 7 Another chart template applied
// REASON_INITFAILED 8 The OnInit() handler returned a non-zero value
// REASON_CLOSE 9 Terminal closed
//
// Here we can handle De Initialization Reasons ...
}
//
// Calculations ...
//
// Calculating what we want ...
int OnCalculate(
//
// total Candles on chart ...
const int rates_total,
//
// total calculated Candles on charts ...
const int prev_calculated,
//
// history of Candles Open Time ...
const datetime &time[],
//
// history of Candles Open Price ...
const double &open[],
//
// history of Candles High Price ...
const double &high[],
//
// history of Candles Low Price ...
const double &low[],
//
// history of Candles Close Price ...
const double &close[],
//
// history of Tick Volumes on Candle ...
const long &tick_volume[],
//
// history of Trade Volumes ...
const long &volume[],
//
// history of Candles Spread Price ...
const int &spread[])
{
//
// Prepare Buffers ...
ArraySetAsSeries(time, true);
ArraySetAsSeries(open, true);
ArraySetAsSeries(high, true);
ArraySetAsSeries(low, true);
ArraySetAsSeries(close, true);
ArraySetAsSeries(tick_volume, true);
ArraySetAsSeries(volume, true);
ArraySetAsSeries(spread, true);
//
// this counts Available Bars ...
int limit;
//
// because in some cases we may have more than one input for
// calculation and we must prevent any calculation
// untill we pass the biggest input length, here we get max Input length
// and then wait until pass it ...
int maxLength = MathMax(0, maPeriod);
//
// Check Calculated Bars ...
int maCalculatedBars = BarsCalculated(maHandler);
if (maCalculatedBars < maxLength)
{
return prev_calculated;
}
//
limit = (prev_calculated > rates_total || prev_calculated <= 0) ? rates_total : (rates_total - prev_calculated) + 1;
//
// Buffers Copy ...
int copiedMas = CopyBuffer(maHandler, 0, 0, limit, maBuffer);
if (copiedMas <= 0)
{
return prev_calculated;
}
//
// Main Loop ...
for (int i = limit - 1; i >= 0 && !IsStopped(); i--)
{
//
// Do Buffers Calculation ...
CalculateBuffers(i);
}
//
return rates_total;
}
//
// END Event Handlers ...
//
//
// START Functions ...
//
//
// Validate Input Args for Initialization ...
bool ValidateInputs()
{
//
bool result = false;
//
// Validate Args ...
if (maPeriod >= 2)
{
result = true;
}
//
return result;
}
//
// Define Indexes and Styles ...
void DefineBuffers()
{
//
ENUM_DRAW_TYPE drawType = showLine ? DRAW_COLOR_LINE : DRAW_NONE;
//
string maBufferLabel = "XTM " + "(" + (string)maPeriod + ")";
//
// Ma Buffer ...
ArraySetAsSeries(maBuffer, true);
SetIndexBuffer(maBufferIndex, maBuffer, INDICATOR_DATA);
PlotIndexSetString(maBufferIndex, PLOT_LABEL, maBufferLabel);
PlotIndexSetInteger(maBufferIndex, PLOT_DRAW_TYPE, drawType);
PlotIndexSetInteger(maBufferIndex, PLOT_SHOW_DATA, showLine);
//
// Ma Color Buffer ...
ArraySetAsSeries(maColorBuffer, true);
SetIndexBuffer(maColorBufferIndex, maColorBuffer, INDICATOR_COLOR_INDEX);
//
// State Buffer ...
ArraySetAsSeries(stateBuffer, true);
SetIndexBuffer(stateBufferIndex, stateBuffer, INDICATOR_CALCULATIONS);
}
//
// Set Indicator Short Name and also we can define Buffers Labels ...
void SetIndicatorName()
{
//
string indicatorShortName = "";
StringConcatenate(indicatorShortName, ShortName, " ", "(", maPeriod, ")");
//
IndicatorSetString(INDICATOR_SHORTNAME, indicatorShortName);
}
//
// Calculate Buffers ...
void CalculateBuffers(int bar_index)
{
//
// Requirements ...
XOHCL candle = GetCandle(bar_index);
//
double maValue = maBuffer[bar_index];
//
double lineColorIndex =
maValue < candle.low ? 0 : maValue > candle.high ? 2
: 1;
//
// Define State Value ...
// lineColorIndex == 0 => Bullish => 1;
// lineColorIndex == 1 => Neutural => 0;
// lineColorIndex == 2 => Bearish => -1;
double stateValue =
lineColorIndex == 0 ? X_XTM_BULLISH : lineColorIndex == 2 ? X_XTM_BEARISH
: X_XTM_NEUTURAL;
//
// Set Ma Buffer Color Index ...
maColorBuffer[bar_index] = lineColorIndex;
//
// Set State Buffer Value ...
stateBuffer[bar_index] = stateValue;
}
//
// END Functions ...
//