This commit is contained in:
2025-12-31 21:28:54 +03:30
parent ad945b90b2
commit a0876d5a05
12 changed files with 1789 additions and 185 deletions
+22 -1
View File
@@ -87,7 +87,7 @@ input int startCalculationForLastBars = 1500; // Calculate Last n Bars
#property indicator_chart_window
//
#property indicator_buffers 18
#property indicator_buffers 19
#property indicator_plots 7
// #region Plot Buffers ...
@@ -237,6 +237,10 @@ double kiWaveStateBuffer[];
//
#define kiSlowStateBufferIndex mLastBufferIndex + 8
double kiSlowStateBuffer[];
//
#define atrSmoothedBufferIndex mLastBufferIndex + 9
double atrSmoothedBuffer[];
// #endregion
// #endregion
@@ -667,6 +671,10 @@ void DefineBuffers()
ArraySetAsSeries(atrBuffer, true);
SetIndexBuffer(atrBufferIndex, atrBuffer, INDICATOR_CALCULATIONS);
//
ArraySetAsSeries(atrSmoothedBuffer, true);
SetIndexBuffer(atrSmoothedBufferIndex, atrSmoothedBuffer, INDICATOR_CALCULATIONS);
//
ArraySetAsSeries(atrRawUpperBuffer, true);
SetIndexBuffer(atrRawUpperBufferIndex, atrRawUpperBuffer, INDICATOR_CALCULATIONS);
@@ -1214,6 +1222,18 @@ void CalculateATR(
if (IsXValid(atrSmoothingMode) &&
atrSmoothingLength > 0)
{
//
// Smoothed ATR ...
iMAOnBuffer(
ratesTotal,
prevCalculated,
barIndex,
atrSmoothingLength,
atrBuffer,
atrSmoothedBuffer,
atrSmoothingMode //
);
//
// Upper ...
iMAOnBuffer(
@@ -1241,6 +1261,7 @@ void CalculateATR(
else
{
//
atrSmoothedBuffer[barIndex] = iAtr;
kiUpperBuffer[barIndex] = iUpperValue;
kiLowerBuffer[barIndex] = iLowerValue;
}