last ...
This commit is contained in:
@@ -45,6 +45,8 @@ input int rsiLength = 14; // RSI Length
|
||||
input ENUM_APPLIED_PRICE rsiAppliedTo = PRICE_CLOSE; // RSI Applied To
|
||||
input double rsiBullishConfirmation = 55; // RSI Bullish Confirmation Level
|
||||
input double rsiBearishConfirmation = 45; // RSI Bearish Confirmation Level
|
||||
input int rsiSmoothingLength = 14; // RSI Smoothing Length
|
||||
input ENUM_X_MA_METHOD rsiSmoothingMode = X_MA_MODE_EMA; // RSI Smoothing Method
|
||||
input int kiWaveSmoothingLength = 14; // RSI KI Wave Smoothing Length
|
||||
input ENUM_X_MA_METHOD kiWaveSmoothingMode = X_MA_MODE_EMA; // RSI KI Wave Smoothing Method
|
||||
input double rsiMultiplier = 0.5; // RSI Multiplier
|
||||
@@ -98,7 +100,7 @@ input int valeArrowCode = 159; // Vales Arrow Code
|
||||
#property indicator_chart_window
|
||||
|
||||
//
|
||||
#property indicator_buffers 25
|
||||
#property indicator_buffers 26
|
||||
#property indicator_plots 11
|
||||
|
||||
// #region Plot Buffers ...
|
||||
@@ -318,6 +320,10 @@ double atrSmoothedBuffer[];
|
||||
//
|
||||
#define kiSuperSlowStateBufferIndex mLastBufferIndex + 10
|
||||
double kiSuperSlowStateBuffer[];
|
||||
|
||||
//
|
||||
#define rsiSmoothedBufferIndex mLastBufferIndex + 11
|
||||
double rsiSmoothedBuffer[];
|
||||
// #endregion
|
||||
// #endregion
|
||||
|
||||
@@ -660,6 +666,10 @@ int ExtractMaxLengthOfInputs()
|
||||
result = MathMax(result, kiSuperSlowLength);
|
||||
|
||||
//
|
||||
if (rsiSmoothingLength > 0)
|
||||
{
|
||||
result = MathMax(result, rsiSmoothingLength);
|
||||
}
|
||||
if (atrSmoothingLength > 0)
|
||||
{
|
||||
result = MathMax(result, atrSmoothingLength);
|
||||
@@ -779,6 +789,10 @@ void DefineBuffers()
|
||||
ArraySetAsSeries(rsiBuffer, true);
|
||||
SetIndexBuffer(rsiBufferIndex, rsiBuffer, INDICATOR_CALCULATIONS);
|
||||
|
||||
//
|
||||
ArraySetAsSeries(rsiSmoothedBuffer, true);
|
||||
SetIndexBuffer(rsiSmoothedBufferIndex, rsiSmoothedBuffer, INDICATOR_CALCULATIONS);
|
||||
|
||||
//
|
||||
ArraySetAsSeries(kiWaveRawBuffer, true);
|
||||
SetIndexBuffer(kiWaveRawBufferIndex, kiWaveRawBuffer, INDICATOR_CALCULATIONS);
|
||||
@@ -1728,7 +1742,7 @@ void CalculateRSI(
|
||||
kiWaveStateBuffer[barIndex] = iState;
|
||||
|
||||
//
|
||||
// Check Can Smooth Atr ...
|
||||
// Check Can Smooth KI Wave ...
|
||||
if (IsXValid(kiWaveSmoothingMode) &&
|
||||
kiWaveSmoothingLength > 0)
|
||||
{
|
||||
@@ -1749,5 +1763,28 @@ void CalculateRSI(
|
||||
//
|
||||
kiWaveBuffer[barIndex] = iValue;
|
||||
}
|
||||
|
||||
//
|
||||
// Check Can Smooth RSI ...
|
||||
if (IsXValid(rsiSmoothingMode) &&
|
||||
rsiSmoothingLength > 0)
|
||||
{
|
||||
//
|
||||
// Ki Wave ...
|
||||
iMAOnBuffer(
|
||||
ratesTotal,
|
||||
prevCalculated,
|
||||
barIndex,
|
||||
rsiSmoothingLength,
|
||||
rsiBuffer,
|
||||
rsiSmoothedBuffer,
|
||||
rsiSmoothingMode //
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
rsiSmoothedBuffer[barIndex] = iRsi;
|
||||
}
|
||||
}
|
||||
// #endregion
|
||||
Reference in New Issue
Block a user