last works ...

This commit is contained in:
2025-10-02 20:23:31 +03:30
parent bb8ab13739
commit b77771b2fc
8 changed files with 3537 additions and 87 deletions
+55 -15
View File
@@ -82,8 +82,8 @@ input double sarMax = 0.2; // SAR Maximum
input ENUM_MA_METHOD maMethod = MODE_EMA; // MA Method
input ENUM_APPLIED_PRICE maAppliedTo = PRICE_CLOSE; // MA Applied To
input int maFastLength = 7; // Fast MA Length
input int maSlowLength = 20; // Slow MA Length
input int maBandLength = 7; // MA Band Length
input int maSlowLength = 21; // Slow MA Length
input int maBandLength = 21; // MA Bond Length
input int zigzagDepth = 12; // ZigZag Depth
input int zigzagDeviation = 5; // ZigZag Deviation
input int zigzagBackStep = 3; // ZigZag Back Step
@@ -101,7 +101,8 @@ input bool showHK = true; // Show HK
input bool showSAR = true; // Show Sar
input bool showMAFast = true; // Show MA Fast
input bool showMASlow = true; // Show MA Slow
input bool showMABand = true; // Show MA Band
input bool showMABand = true; // Show MA Bond
input bool showHKBond = true; // Show HK Bond
input bool showZigZag = true; // Show ZigZag
input bool showFiboZone = true; // Show Fibo Zone
@@ -137,8 +138,8 @@ input int valeArrowCode = 159; // Vales Arrow Code
#property indicator_chart_window
//
#property indicator_buffers 38
#property indicator_plots 12
#property indicator_buffers 40
#property indicator_plots 14
//
// Plot Buffers ...
@@ -282,7 +283,7 @@ double zigzagBuffer[];
#property indicator_width9 2
//
// MA Upper Boundary ...
// MA Upper ...
//
#define maUpperBufferIndex 12
@@ -292,11 +293,11 @@ double maUpperBuffer[];
//
#property indicator_label10 "UpperMA"
#property indicator_type10 DRAW_LINE
#property indicator_color10 clrAqua
#property indicator_color10 clrLime
#property indicator_width10 3
//
// MA Lower Boundary ...
// MA Lower ...
//
#define maLowerBufferIndex 13
@@ -306,7 +307,7 @@ double maLowerBuffer[];
//
#property indicator_label11 "LowerMA"
#property indicator_type11 DRAW_LINE
#property indicator_color11 clrMagenta
#property indicator_color11 clrRed
#property indicator_width11 3
//
@@ -338,11 +339,33 @@ double hkColorBuffer[];
#property indicator_type12 DRAW_COLOR_CANDLES
#property indicator_color12 CLR_NONE, clrAqua, clrMagenta, clrGray
//
#define hkBondUpperBufferIndex 19
double hkBondUpperBuffer[];
//
#define hkBondUpperBufferPlotIndex 12
#property indicator_label13 "UpperHK"
#property indicator_type13 DRAW_LINE
#property indicator_color13 clrAqua
#property indicator_width13 3
//
#define hkBondLowerBufferIndex 20
double hkBondLowerBuffer[];
//
#define hkBondLowerBufferPlotIndex 13
#property indicator_label14 "LowerHK"
#property indicator_type14 DRAW_LINE
#property indicator_color14 clrMagenta
#property indicator_width14 3
//
// Data Buffers ...
//
#define mLastBufferIndex 18
#define mLastBufferIndex 20
//
// MA ...
@@ -982,13 +1005,13 @@ void DefineBuffers()
PlotIndexSetDouble(zigzagBufferPlotIndex, PLOT_EMPTY_VALUE, 0);
//
// MA Band ...
// MA Bond ...
//
ENUM_DRAW_TYPE maBandDrawType = showMABand ? DRAW_LINE : DRAW_NONE;
//
// MA Upper Band ...
// MA Upper Bond ...
//
ArraySetAsSeries(maUpperBuffer, true);
@@ -1002,7 +1025,7 @@ void DefineBuffers()
PlotIndexSetDouble(maUpperBufferPlotIndex, PLOT_EMPTY_VALUE, 0);
//
// MA Lower Band ...
// MA Lower Bond ...
//
ArraySetAsSeries(maLowerBuffer, true);
@@ -1048,6 +1071,19 @@ void DefineBuffers()
ArraySetAsSeries(hkCloseBuffer, true);
SetIndexBuffer(hkCloseBufferIndex, hkCloseBuffer, INDICATOR_DATA);
//
// XHK Bond ...
//
// Upper ...
ArraySetAsSeries(hkBondUpperBuffer, true);
SetIndexBuffer(hkBondUpperBufferIndex, hkBondUpperBuffer, INDICATOR_DATA);
//
// Lower ...
ArraySetAsSeries(hkBondLowerBuffer, true);
SetIndexBuffer(hkBondLowerBufferIndex, hkBondLowerBuffer, INDICATOR_DATA);
//
// Data Buffers ...
@@ -1288,7 +1324,7 @@ bool InitRequirements()
}
//
// MA Band Upper ...
// MA Bond Upper ...
maUpperHandler = iMA(
_Symbol,
_Period,
@@ -1304,7 +1340,7 @@ bool InitRequirements()
}
//
// MA Band Lower ...
// MA Bond Lower ...
maLowerHandler = iMA(
_Symbol,
_Period,
@@ -2160,6 +2196,10 @@ void CalculateHKBar(
);
}
//
hkBondUpperBuffer[barIndex] = hkHighBuffer[barIndex];
hkBondLowerBuffer[barIndex] = hkLowBuffer[barIndex];
//
// Calculate HK Color ...
double iHKColorValue =