This commit is contained in:
2024-08-23 14:06:34 +03:30
parent 015fccaa99
commit 8774674629
7 changed files with 384 additions and 581 deletions
+46 -43
View File
@@ -63,30 +63,21 @@ input ENUM_TIMEFRAMES hcPeriod = NULL; // Time Period
input group "Presentation";
//
// AVG ...
// Parts ...
input bool showFast = true; // Show Fast
input bool showSlow = true; // Show Slow
//
// Current ...
input bool showCCFast = true; // Show Current Cycle Fast
input bool showCCSlow = true; // Show Current Cycle Slow
// AVG ...
input bool showAVG = true; // Show Average
//
// Short ...
input bool showSCFast = true; // Show Short Cycle Fast
input bool showSCSlow = true; // Show Short Cycle Slow
//
// Medium ...
input bool showMCFast = true; // Show Medium Cycle Fast
input bool showMCSlow = true; // Show Medium Cycle Slow
//
// Long ...
input bool showLCFast = true; // Show Long Cycle Fast
input bool showLCSlow = true; // Show Long Cycle Slow
//
// Hind ...
input bool showHCFast = true; // Show Hind Cycle Fast
input bool showHCSlow = true; // Show Hind Cycle Slow
// Cycles ...
input bool showCurrent = true; // Show Current Cycle
input bool showShort = true; // Show Short Cycle
input bool showMedium = true; // Show Medium Cycle
input bool showLong = true; // Show Long Cycle
input bool showHind = true; // Show Hind Cycle
//
// Buffers ...
@@ -598,22 +589,24 @@ void DefineBuffers()
//
// Fast ...
ENUM_DRAW_TYPE avgFastDrawType = showFast ? DRAW_LINE : DRAW_NONE;
bool canShowAVGFast = showAVG && showFast;
ENUM_DRAW_TYPE avgFastDrawType = canShowAVGFast ? DRAW_LINE : DRAW_NONE;
ArraySetAsSeries(avgFastBuffer, true);
SetIndexBuffer(avgFastBufferIndex, avgFastBuffer, INDICATOR_DATA);
PlotIndexSetDouble(avgFastBufferIndex, PLOT_EMPTY_VALUE, 0);
PlotIndexSetInteger(avgFastBufferIndex, PLOT_DRAW_BEGIN, maxLength);
PlotIndexSetInteger(avgFastBufferIndex, PLOT_SHOW_DATA, showFast);
PlotIndexSetInteger(avgFastBufferIndex, PLOT_SHOW_DATA, canShowAVGFast);
PlotIndexSetInteger(avgFastBufferIndex, PLOT_DRAW_TYPE, avgFastDrawType);
//
// Slow ...
ENUM_DRAW_TYPE avgSlowDrawType = showSlow ? DRAW_LINE : DRAW_NONE;
bool canShowAVGSlow = showAVG && showSlow;
ENUM_DRAW_TYPE avgSlowDrawType = canShowAVGSlow ? DRAW_LINE : DRAW_NONE;
ArraySetAsSeries(avgSlowBuffer, true);
SetIndexBuffer(avgSlowBufferIndex, avgSlowBuffer, INDICATOR_DATA);
PlotIndexSetDouble(avgSlowBufferIndex, PLOT_EMPTY_VALUE, 0);
PlotIndexSetInteger(avgSlowBufferIndex, PLOT_DRAW_BEGIN, maxLength);
PlotIndexSetInteger(avgSlowBufferIndex, PLOT_SHOW_DATA, showSlow);
PlotIndexSetInteger(avgSlowBufferIndex, PLOT_SHOW_DATA, canShowAVGSlow);
PlotIndexSetInteger(avgSlowBufferIndex, PLOT_DRAW_TYPE, avgSlowDrawType);
//
@@ -621,22 +614,24 @@ void DefineBuffers()
//
// Fast ...
ENUM_DRAW_TYPE cFastDrawType = showCCFast ? DRAW_LINE : DRAW_NONE;
bool canShowCFast = showCurrent && showFast;
ENUM_DRAW_TYPE cFastDrawType = canShowCFast ? DRAW_LINE : DRAW_NONE;
ArraySetAsSeries(cFastBuffer, true);
SetIndexBuffer(cFastBufferIndex, cFastBuffer, INDICATOR_DATA);
PlotIndexSetDouble(cFastBufferIndex, PLOT_EMPTY_VALUE, 0);
PlotIndexSetInteger(cFastBufferIndex, PLOT_DRAW_BEGIN, maxLength);
PlotIndexSetInteger(cFastBufferIndex, PLOT_SHOW_DATA, showCCFast);
PlotIndexSetInteger(cFastBufferIndex, PLOT_SHOW_DATA, canShowCFast);
PlotIndexSetInteger(cFastBufferIndex, PLOT_DRAW_TYPE, cFastDrawType);
//
// Slow ...
ENUM_DRAW_TYPE cSlowDrawType = showCCSlow ? DRAW_LINE : DRAW_NONE;
bool canShowCSlow = showCurrent && showSlow;
ENUM_DRAW_TYPE cSlowDrawType = canShowCSlow ? DRAW_LINE : DRAW_NONE;
ArraySetAsSeries(cSlowBuffer, true);
SetIndexBuffer(cSlowBufferIndex, cSlowBuffer, INDICATOR_DATA);
PlotIndexSetDouble(cSlowBufferIndex, PLOT_EMPTY_VALUE, 0);
PlotIndexSetInteger(cSlowBufferIndex, PLOT_DRAW_BEGIN, maxLength);
PlotIndexSetInteger(cSlowBufferIndex, PLOT_SHOW_DATA, showCCSlow);
PlotIndexSetInteger(cSlowBufferIndex, PLOT_SHOW_DATA, canShowCSlow);
PlotIndexSetInteger(cSlowBufferIndex, PLOT_DRAW_TYPE, cSlowDrawType);
//
@@ -644,22 +639,24 @@ void DefineBuffers()
//
// Fast ...
ENUM_DRAW_TYPE sFastDrawType = showSCFast ? DRAW_LINE : DRAW_NONE;
bool canShowSFast = showShort && showFast;
ENUM_DRAW_TYPE sFastDrawType = canShowSFast ? DRAW_LINE : DRAW_NONE;
ArraySetAsSeries(sFastBuffer, true);
SetIndexBuffer(sFastBufferIndex, sFastBuffer, INDICATOR_DATA);
PlotIndexSetDouble(sFastBufferIndex, PLOT_EMPTY_VALUE, 0);
PlotIndexSetInteger(sFastBufferIndex, PLOT_DRAW_BEGIN, maxLength);
PlotIndexSetInteger(sFastBufferIndex, PLOT_SHOW_DATA, showSCFast);
PlotIndexSetInteger(sFastBufferIndex, PLOT_SHOW_DATA, canShowSFast);
PlotIndexSetInteger(sFastBufferIndex, PLOT_DRAW_TYPE, sFastDrawType);
//
// Slow ...
ENUM_DRAW_TYPE sSlowDrawType = showSCSlow ? DRAW_LINE : DRAW_NONE;
bool canShowSSlow = showShort && showSlow;
ENUM_DRAW_TYPE sSlowDrawType = canShowSSlow ? DRAW_LINE : DRAW_NONE;
ArraySetAsSeries(sSlowBuffer, true);
SetIndexBuffer(sSlowBufferIndex, sSlowBuffer, INDICATOR_DATA);
PlotIndexSetDouble(sSlowBufferIndex, PLOT_EMPTY_VALUE, 0);
PlotIndexSetInteger(sSlowBufferIndex, PLOT_DRAW_BEGIN, maxLength);
PlotIndexSetInteger(sSlowBufferIndex, PLOT_SHOW_DATA, showSCSlow);
PlotIndexSetInteger(sSlowBufferIndex, PLOT_SHOW_DATA, canShowSSlow);
PlotIndexSetInteger(sSlowBufferIndex, PLOT_DRAW_TYPE, sSlowDrawType);
//
@@ -667,22 +664,24 @@ void DefineBuffers()
//
// Fast ...
ENUM_DRAW_TYPE mFastDrawType = showMCFast ? DRAW_LINE : DRAW_NONE;
bool canShowMFast = showMedium && showFast;
ENUM_DRAW_TYPE mFastDrawType = canShowMFast ? DRAW_LINE : DRAW_NONE;
ArraySetAsSeries(mFastBuffer, true);
SetIndexBuffer(mFastBufferIndex, mFastBuffer, INDICATOR_DATA);
PlotIndexSetDouble(mFastBufferIndex, PLOT_EMPTY_VALUE, 0);
PlotIndexSetInteger(mFastBufferIndex, PLOT_DRAW_BEGIN, maxLength);
PlotIndexSetInteger(mFastBufferIndex, PLOT_SHOW_DATA, showMCFast);
PlotIndexSetInteger(mFastBufferIndex, PLOT_SHOW_DATA, canShowMFast);
PlotIndexSetInteger(mFastBufferIndex, PLOT_DRAW_TYPE, mFastDrawType);
//
// Slow ...
ENUM_DRAW_TYPE mSlowDrawType = showMCSlow ? DRAW_LINE : DRAW_NONE;
bool canShowMSlow = showMedium && showSlow;
ENUM_DRAW_TYPE mSlowDrawType = canShowMSlow ? DRAW_LINE : DRAW_NONE;
ArraySetAsSeries(mSlowBuffer, true);
SetIndexBuffer(mSlowBufferIndex, mSlowBuffer, INDICATOR_DATA);
PlotIndexSetDouble(mSlowBufferIndex, PLOT_EMPTY_VALUE, 0);
PlotIndexSetInteger(mSlowBufferIndex, PLOT_DRAW_BEGIN, maxLength);
PlotIndexSetInteger(mSlowBufferIndex, PLOT_SHOW_DATA, showMCSlow);
PlotIndexSetInteger(mSlowBufferIndex, PLOT_SHOW_DATA, canShowMSlow);
PlotIndexSetInteger(mSlowBufferIndex, PLOT_DRAW_TYPE, mSlowDrawType);
//
@@ -690,22 +689,24 @@ void DefineBuffers()
//
// Fast ...
ENUM_DRAW_TYPE lFastDrawType = showLCFast ? DRAW_LINE : DRAW_NONE;
bool canShowLFast = showLong && showFast;
ENUM_DRAW_TYPE lFastDrawType = canShowLFast ? DRAW_LINE : DRAW_NONE;
ArraySetAsSeries(lFastBuffer, true);
SetIndexBuffer(lFastBufferIndex, lFastBuffer, INDICATOR_DATA);
PlotIndexSetDouble(lFastBufferIndex, PLOT_EMPTY_VALUE, 0);
PlotIndexSetInteger(lFastBufferIndex, PLOT_DRAW_BEGIN, maxLength);
PlotIndexSetInteger(lFastBufferIndex, PLOT_SHOW_DATA, showLCFast);
PlotIndexSetInteger(lFastBufferIndex, PLOT_SHOW_DATA, canShowLFast);
PlotIndexSetInteger(lFastBufferIndex, PLOT_DRAW_TYPE, lFastDrawType);
//
// Slow ...
ENUM_DRAW_TYPE lSlowDrawType = showLCSlow ? DRAW_LINE : DRAW_NONE;
bool canShowLSlow = showLong && showSlow;
ENUM_DRAW_TYPE lSlowDrawType = canShowLSlow ? DRAW_LINE : DRAW_NONE;
ArraySetAsSeries(lSlowBuffer, true);
SetIndexBuffer(lSlowBufferIndex, lSlowBuffer, INDICATOR_DATA);
PlotIndexSetDouble(lSlowBufferIndex, PLOT_EMPTY_VALUE, 0);
PlotIndexSetInteger(lSlowBufferIndex, PLOT_DRAW_BEGIN, maxLength);
PlotIndexSetInteger(lSlowBufferIndex, PLOT_SHOW_DATA, showLCSlow);
PlotIndexSetInteger(lSlowBufferIndex, PLOT_SHOW_DATA, canShowLSlow);
PlotIndexSetInteger(lSlowBufferIndex, PLOT_DRAW_TYPE, lSlowDrawType);
//
@@ -713,22 +714,24 @@ void DefineBuffers()
//
// Fast ...
ENUM_DRAW_TYPE hFastDrawType = showHCFast ? DRAW_LINE : DRAW_NONE;
bool canShowHFast = showHind && showFast;
ENUM_DRAW_TYPE hFastDrawType = canShowHFast ? DRAW_LINE : DRAW_NONE;
ArraySetAsSeries(hFastBuffer, true);
SetIndexBuffer(hFastBufferIndex, hFastBuffer, INDICATOR_DATA);
PlotIndexSetDouble(hFastBufferIndex, PLOT_EMPTY_VALUE, 0);
PlotIndexSetInteger(hFastBufferIndex, PLOT_DRAW_BEGIN, maxLength);
PlotIndexSetInteger(hFastBufferIndex, PLOT_SHOW_DATA, showHCFast);
PlotIndexSetInteger(hFastBufferIndex, PLOT_SHOW_DATA, canShowHFast);
PlotIndexSetInteger(hFastBufferIndex, PLOT_DRAW_TYPE, hFastDrawType);
//
// Slow ...
ENUM_DRAW_TYPE hSlowDrawType = showHCSlow ? DRAW_LINE : DRAW_NONE;
bool canShowHSlow = showHind && showSlow;
ENUM_DRAW_TYPE hSlowDrawType = canShowHSlow ? DRAW_LINE : DRAW_NONE;
ArraySetAsSeries(hSlowBuffer, true);
SetIndexBuffer(hSlowBufferIndex, hSlowBuffer, INDICATOR_DATA);
PlotIndexSetDouble(hSlowBufferIndex, PLOT_EMPTY_VALUE, 0);
PlotIndexSetInteger(hSlowBufferIndex, PLOT_DRAW_BEGIN, maxLength);
PlotIndexSetInteger(hSlowBufferIndex, PLOT_SHOW_DATA, showHCSlow);
PlotIndexSetInteger(hSlowBufferIndex, PLOT_SHOW_DATA, canShowHSlow);
PlotIndexSetInteger(hSlowBufferIndex, PLOT_DRAW_TYPE, hSlowDrawType);
}