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
+9 -9
View File
@@ -60,7 +60,7 @@ input bool eaUseFixedTPSLPoints = true; // Use Fixed TP SL in Points
input bool eaIgnoreTP = false; // Ignore TP input bool eaIgnoreTP = false; // Ignore TP
input bool eaIgnoreSL = false; // Ignore SL input bool eaIgnoreSL = false; // Ignore SL
input double eaTPPoint = 200; // Static TP Point input double eaTPPoint = 200; // Static TP Point
input double eaSLPoint = 100; // Static SL Point input double eaSLPoint = 200; // Static SL Point
// //
// Risk Management > Volume Calculation ... // Risk Management > Volume Calculation ...
@@ -75,22 +75,22 @@ input double eaVolume = 0.2; // Static Volume
input group "Trade Management"; input group "Trade Management";
input bool eaAllowLong = true; // Allow Long Positions input bool eaAllowLong = true; // Allow Long Positions
input bool eaAllowShort = true; // Allow Short Positions input bool eaAllowShort = true; // Allow Short Positions
input int eaMaxAllowedLongs = 1; // Max Allowed Long Positions input int eaMaxAllowedLongs = 2; // Max Allowed Long Positions
input int eaMaxAllowedShorts = 1; // Max Allowed Short Positions input int eaMaxAllowedShorts = 2; // Max Allowed Short Positions
input double eaMaxDrawdownPercentForOpenTrades = 3; // Max Drawdown Percent for Open Trades input double eaMaxDrawdownPercentForOpenTrades = 3; // Max Drawdown Percent for Open Trades
// //
// Risk Management > Hedging ... // Risk Management > Hedging ...
input group "Hedging"; input group "Hedging";
input bool eaAllowHedging = true; // Allow Hedging Trades input bool eaAllowHedging = true; // Allow Hedging Trades
input int eaMinTradesForHedge = 2; // Minimum Open Trades for Hedging input int eaMinTradesForHedge = 2; // Minimum Open Trades for Hedging
input double eaHedgeVolumeFactor = 0.01; // Volume Factor for Hedging input double eaHedgeVolumeFactor = 0.01; // Volume Factor for Hedging
input double eaMinimumProfitPerVolumeForHedging = 1; // Minimum Required Profit per Volume for Hedging input double eaMinimumProfitPerVolumeForHedging = 0.5; // Minimum Required Profit per Volume for Hedging
// //
// Risk Management > Trailling Stop ... // Risk Management > Trailling Stop ...
input group "Trailling Stop"; input group "Trailling Stop";
input bool eaAllowTrailStop = false; // Allow Trail Stop input bool eaAllowTrailStop = true; // Allow Trail Stop
input double eaStartTrailInPoint = 50; // Trail Start After Profit (Point) input double eaStartTrailInPoint = 50; // Trail Start After Profit (Point)
input double eaTrailStepInPoint = 25; // Trail Size in each Step (Point) input double eaTrailStepInPoint = 25; // Trail Size in each Step (Point)
input bool eaIgnoreTPAfterTrail = true; // Ignore TP after Trail input bool eaIgnoreTPAfterTrail = true; // Ignore TP after Trail
@@ -119,7 +119,7 @@ input bool eATerminalAlerts = false; // Terminal Alerts
input group "Reports"; input group "Reports";
input bool eaAlertNewMonths = false; // Alert New Month input bool eaAlertNewMonths = false; // Alert New Month
input bool eaAlertNewWeeks = false; // Alert New Weeks input bool eaAlertNewWeeks = false; // Alert New Weeks
input bool eaAlertNewDays = false; // Alert New Days input bool eaAlertNewDays = true; // Alert New Days
input bool eaAlertNewHours = false; // Alert New Hours input bool eaAlertNewHours = false; // Alert New Hours
input bool eaAlertRawSignals = false; // Alert Raw Signals input bool eaAlertRawSignals = false; // Alert Raw Signals
input bool eaAlertStrongSignals = false; // Alert Strong Signals input bool eaAlertStrongSignals = false; // Alert Strong Signals
+40 -99
View File
@@ -108,39 +108,17 @@ struct XCHCHEInputs
// Presentation ... // Presentation ...
// //
// Current ... bool showLE1; // Show Long Exit 1
bool showCurrentLE1; // Show Current Cycle Long Exit 1 bool showLE2; // Show Long Exit 2
bool showCurrentLE2; // Show Current Cycle Long Exit 2 bool showSE1; // Show Short Exit 1
bool showCurrentSE1; // Show Current Cycle Short Exit 1 bool showSE2; // Show Short Exit 2
bool showCurrentSE2; // Show Current Cycle Short Exit 2
// //
// Short ... bool showCurrent; // Show Current Cycle
bool showShortLE1; // Show Short Cycle Long Exit 1 bool showShort; // Show Short Cycle
bool showShortLE2; // Show Short Cycle Long Exit 2 bool showMedium; // Show Medium Cycle
bool showShortSE1; // Show Short Cycle Short Exit 1 bool showLong; // Show Long Cycle
bool showShortSE2; // Show Short Cycle Short Exit 2 bool showHind; // Show Hind Cycle
//
// Medium ...
bool showMediumLE1; // Show Medium Cycle Long Exit 1
bool showMediumLE2; // Show Medium Cycle Long Exit 2
bool showMediumSE1; // Show Medium Cycle Short Exit 1
bool showMediumSE2; // Show Medium Cycle Short Exit 2
//
// Long ...
bool showLongLE1; // Show Long Cycle Long Exit 1
bool showLongLE2; // Show Long Cycle Long Exit 2
bool showLongSE1; // Show Long Cycle Short Exit 1
bool showLongSE2; // Show Long Cycle Short Exit 2
//
// Hind ...
bool showHindLE1; // Show Hind Cycle Long Exit 1
bool showHindLE2; // Show Hind Cycle Long Exit 2
bool showHindSE1; // Show Hind Cycle Short Exit 1
bool showHindSE2; // Show Hind Cycle Short Exit 2
// //
// Constructor(s) ... // Constructor(s) ...
@@ -178,26 +156,17 @@ struct XCHCHEInputs
hcPeriod = NULL; hcPeriod = NULL;
// //
showCurrentLE1 = false; showLE1 = false;
showCurrentLE2 = false; showLE2 = false;
showCurrentSE1 = false; showSE1 = false;
showCurrentSE2 = false; showSE2 = false;
showShortLE1 = false;
showShortLE2 = false; //
showShortSE1 = false; showCurrent = false;
showShortSE2 = false; showShort = false;
showMediumLE1 = false; showMedium = false;
showMediumLE2 = false; showLong = false;
showMediumSE1 = false; showHind = false;
showMediumSE2 = false;
showLongLE1 = false;
showLongLE2 = false;
showLongSE1 = false;
showLongSE2 = false;
showHindLE1 = false;
showHindLE2 = false;
showHindSE1 = false;
showHindSE2 = false;
} }
// //
@@ -225,26 +194,17 @@ struct XCHCHEInputs
hcPeriod = NULL; hcPeriod = NULL;
// //
showCurrentLE1 = true; showLE1 = true;
showCurrentLE2 = true; showLE2 = true;
showCurrentSE1 = true; showSE1 = true;
showCurrentSE2 = true; showSE2 = true;
showShortLE1 = true;
showShortLE2 = true; //
showShortSE1 = true; showCurrent = true;
showShortSE2 = true; showShort = true;
showMediumLE1 = true; showMedium = true;
showMediumLE2 = true; showLong = true;
showMediumSE1 = true; showHind = true;
showMediumSE2 = true;
showLongLE1 = true;
showLongLE2 = true;
showLongSE1 = true;
showLongSE2 = true;
showHindLE1 = true;
showHindLE2 = true;
showHindSE1 = true;
showHindSE2 = true;
} }
// //
@@ -1044,35 +1004,16 @@ public:
// Presentation ... // Presentation ...
"", "",
// //
// CURRENT ... mInputs.showLE1,
mInputs.showCurrentLE1, mInputs.showLE2,
mInputs.showCurrentLE2, mInputs.showSE1,
mInputs.showCurrentSE1, mInputs.showSE2,
mInputs.showCurrentSE2,
// //
// SHORT ... mInputs.showCurrent,
mInputs.showShortLE1, mInputs.showShort,
mInputs.showShortLE2, mInputs.showMedium,
mInputs.showShortSE1, mInputs.showLong,
mInputs.showShortSE2, mInputs.showHind
//
// MEDIUM ...
mInputs.showMediumLE1,
mInputs.showMediumLE2,
mInputs.showMediumSE1,
mInputs.showMediumSE2,
//
// LONG ...
mInputs.showLongLE1,
mInputs.showLongLE2,
mInputs.showLongSE1,
mInputs.showLongSE2,
//
// HIND ...
mInputs.showHindLE1,
mInputs.showHindLE2,
mInputs.showHindSE1,
mInputs.showHindSE2
// //
); );
result = mHandler != INVALID_HANDLE; result = mHandler != INVALID_HANDLE;
+42 -42
View File
@@ -95,18 +95,20 @@ struct XCHMInputs
// //
// Presentation ... // Presentation ...
bool showFast; // Show Fast
bool showSlow; // Show Slow //
bool showCCFast; // Show Current Cycle Fast bool showFast; // Show Fast
bool showCCSlow; // Show Current Cycle Slow bool showSlow; // Show Slow
bool showSCFast; // Show Short Cycle Fast
bool showSCSlow; // Show Short Cycle Slow //
bool showMCFast; // Show Medium Cycle Fast bool showAVG; // Show Average
bool showMCSlow; // Show Medium Cycle Slow
bool showLCFast; // Show Long Cycle Fast //
bool showLCSlow; // Show Long Cycle Slow bool showCurrent; // Show Current Cycle
bool showHCFast; // Show Hind Cycle Fast bool showShort; // Show Short Cycle
bool showHCSlow; // Show Hind Cycle Slow bool showMedium; // Show Medium Cycle
bool showLong; // Show Long Cycle
bool showHind; // Show Hind Cycle
// //
// Constructor(s) ... // Constructor(s) ...
@@ -142,16 +144,16 @@ struct XCHMInputs
// //
showFast = false; showFast = false;
showSlow = false; showSlow = false;
showCCFast = false;
showCCSlow = false; //
showSCFast = false; showAVG = false;
showSCSlow = false;
showMCFast = false; //
showMCSlow = false; showCurrent = false;
showLCFast = false; showShort = false;
showLCSlow = false; showMedium = false;
showHCFast = false; showLong = false;
showHCSlow = false; showHind = false;
} }
// //
@@ -177,16 +179,16 @@ struct XCHMInputs
// //
showFast = true; showFast = true;
showSlow = true; showSlow = true;
showCCFast = true;
showCCSlow = true; //
showSCFast = true; showAVG = true;
showSCSlow = true;
showMCFast = true; //
showMCSlow = true; showCurrent = true;
showLCFast = true; showShort = true;
showLCSlow = true; showMedium = true;
showHCFast = true; showLong = true;
showHCSlow = true; showHind = true;
} }
// //
@@ -983,19 +985,17 @@ public:
// //
// Presentation ... // Presentation ...
"", "",
//
mInputs.showFast, mInputs.showFast,
mInputs.showSlow, mInputs.showSlow,
// //
mInputs.showCCFast, mInputs.showAVG,
mInputs.showCCSlow, //
mInputs.showSCFast, mInputs.showCurrent,
mInputs.showSCSlow, mInputs.showShort,
mInputs.showMCFast, mInputs.showMedium,
mInputs.showMCSlow, mInputs.showLong,
mInputs.showLCFast, mInputs.showHind
mInputs.showLCSlow,
mInputs.showHCFast,
mInputs.showHCSlow
// //
); );
result = mHandler != INVALID_HANDLE; result = mHandler != INVALID_HANDLE;
+70 -72
View File
@@ -68,39 +68,17 @@ input ENUM_TIMEFRAMES hcPeriod = NULL; // Time Period
input group "Presentation"; input group "Presentation";
// //
// Current ... input bool showLE1 = true; // Show Long Exit 1
input bool showCurrentLE1 = true; // Show Current Cycle Long Exit 1 input bool showLE2 = true; // Show Long Exit 2
input bool showCurrentLE2 = true; // Show Current Cycle Long Exit 2 input bool showSE1 = true; // Show Short Exit 1
input bool showCurrentSE1 = true; // Show Current Cycle Short Exit 1 input bool showSE2 = true; // Show Short Exit 2
input bool showCurrentSE2 = true; // Show Current Cycle Short Exit 2
// //
// Short ... input bool showCurrent = true; // Show Current Cycle
input bool showShortLE1 = true; // Show Short Cycle Long Exit 1 input bool showShort = true; // Show Short Cycle
input bool showShortLE2 = true; // Show Short Cycle Long Exit 2 input bool showMedium = true; // Show Medium Cycle
input bool showShortSE1 = true; // Show Short Cycle Short Exit 1 input bool showLong = true; // Show Long Cycle
input bool showShortSE2 = true; // Show Short Cycle Short Exit 2 input bool showHind = true; // Show Hind Cycle
//
// Medium ...
input bool showMediumLE1 = true; // Show Medium Cycle Long Exit 1
input bool showMediumLE2 = true; // Show Medium Cycle Long Exit 2
input bool showMediumSE1 = true; // Show Medium Cycle Short Exit 1
input bool showMediumSE2 = true; // Show Medium Cycle Short Exit 2
//
// Long ...
input bool showLongLE1 = true; // Show Long Cycle Long Exit 1
input bool showLongLE2 = true; // Show Long Cycle Long Exit 2
input bool showLongSE1 = true; // Show Long Cycle Short Exit 1
input bool showLongSE2 = true; // Show Long Cycle Short Exit 2
//
// Hind ...
input bool showHindLE1 = true; // Show Hind Cycle Long Exit 1
input bool showHindLE2 = true; // Show Hind Cycle Long Exit 2
input bool showHindSE1 = true; // Show Hind Cycle Short Exit 1
input bool showHindSE2 = true; // Show Hind Cycle Short Exit 2
// //
// Buffers ... // Buffers ...
@@ -732,30 +710,34 @@ void DefineBuffers()
// //
// Long Exit 1 ... // Long Exit 1 ...
ENUM_DRAW_TYPE cLE1DrawType = showCurrentLE1 ? DRAW_LINE : DRAW_NONE; bool canShowCLE1 = showCurrent && showLE1;
ENUM_DRAW_TYPE cLE1DrawType = canShowCLE1 ? DRAW_LINE : DRAW_NONE;
SetIndexBuffer(cLE1BufferIndex, cLE1Buffer, INDICATOR_DATA); SetIndexBuffer(cLE1BufferIndex, cLE1Buffer, INDICATOR_DATA);
PlotIndexSetInteger(cLE1BufferIndex, PLOT_SHOW_DATA, showCurrentLE1); PlotIndexSetInteger(cLE1BufferIndex, PLOT_SHOW_DATA, canShowCLE1);
PlotIndexSetInteger(cLE1BufferIndex, PLOT_DRAW_TYPE, cLE1DrawType); PlotIndexSetInteger(cLE1BufferIndex, PLOT_DRAW_TYPE, cLE1DrawType);
// //
// Long Exit 2 ... // Long Exit 2 ...
ENUM_DRAW_TYPE cLE2DrawType = showCurrentLE2 ? DRAW_LINE : DRAW_NONE; bool canShowCLE2 = showCurrent && showLE2;
ENUM_DRAW_TYPE cLE2DrawType = canShowCLE2 ? DRAW_LINE : DRAW_NONE;
SetIndexBuffer(cLE2BufferIndex, cLE2Buffer, INDICATOR_DATA); SetIndexBuffer(cLE2BufferIndex, cLE2Buffer, INDICATOR_DATA);
PlotIndexSetInteger(cLE2BufferIndex, PLOT_SHOW_DATA, showCurrentLE2); PlotIndexSetInteger(cLE2BufferIndex, PLOT_SHOW_DATA, canShowCLE2);
PlotIndexSetInteger(cLE2BufferIndex, PLOT_DRAW_TYPE, cLE2DrawType); PlotIndexSetInteger(cLE2BufferIndex, PLOT_DRAW_TYPE, cLE2DrawType);
// //
// Short Exit 1 ... // Short Exit 1 ...
ENUM_DRAW_TYPE cSE1DrawType = showCurrentSE1 ? DRAW_LINE : DRAW_NONE; bool canShowCSE1 = showCurrent && showSE1;
ENUM_DRAW_TYPE cSE1DrawType = canShowCSE1 ? DRAW_LINE : DRAW_NONE;
SetIndexBuffer(cSE1BufferIndex, cSE1Buffer, INDICATOR_DATA); SetIndexBuffer(cSE1BufferIndex, cSE1Buffer, INDICATOR_DATA);
PlotIndexSetInteger(cSE1BufferIndex, PLOT_SHOW_DATA, showCurrentSE1); PlotIndexSetInteger(cSE1BufferIndex, PLOT_SHOW_DATA, canShowCSE1);
PlotIndexSetInteger(cSE1BufferIndex, PLOT_DRAW_TYPE, cSE1DrawType); PlotIndexSetInteger(cSE1BufferIndex, PLOT_DRAW_TYPE, cSE1DrawType);
// //
// Short Exit 2 ... // Short Exit 2 ...
ENUM_DRAW_TYPE cSE2DrawType = showCurrentSE2 ? DRAW_LINE : DRAW_NONE; bool canShowCSE2 = showCurrent && showSE2;
ENUM_DRAW_TYPE cSE2DrawType = canShowCSE2 ? DRAW_LINE : DRAW_NONE;
SetIndexBuffer(cSE2BufferIndex, cSE2Buffer, INDICATOR_DATA); SetIndexBuffer(cSE2BufferIndex, cSE2Buffer, INDICATOR_DATA);
PlotIndexSetInteger(cSE2BufferIndex, PLOT_SHOW_DATA, showCurrentSE2); PlotIndexSetInteger(cSE2BufferIndex, PLOT_SHOW_DATA, canShowCSE2);
PlotIndexSetInteger(cSE2BufferIndex, PLOT_DRAW_TYPE, cSE2DrawType); PlotIndexSetInteger(cSE2BufferIndex, PLOT_DRAW_TYPE, cSE2DrawType);
// //
@@ -763,30 +745,34 @@ void DefineBuffers()
// //
// Long Exit 1 ... // Long Exit 1 ...
ENUM_DRAW_TYPE sLE1DrawType = showCurrentLE1 ? DRAW_LINE : DRAW_NONE; bool canShowSLE1 = showShort && showLE1;
ENUM_DRAW_TYPE sLE1DrawType = canShowSLE1 ? DRAW_LINE : DRAW_NONE;
SetIndexBuffer(sLE1BufferIndex, sLE1Buffer, INDICATOR_DATA); SetIndexBuffer(sLE1BufferIndex, sLE1Buffer, INDICATOR_DATA);
PlotIndexSetInteger(sLE1BufferIndex, PLOT_SHOW_DATA, showCurrentLE1); PlotIndexSetInteger(sLE1BufferIndex, PLOT_SHOW_DATA, canShowSLE1);
PlotIndexSetInteger(sLE1BufferIndex, PLOT_DRAW_TYPE, sLE1DrawType); PlotIndexSetInteger(sLE1BufferIndex, PLOT_DRAW_TYPE, sLE1DrawType);
// //
// Long Exit 2 ... // Long Exit 2 ...
ENUM_DRAW_TYPE sLE2DrawType = showCurrentLE2 ? DRAW_LINE : DRAW_NONE; bool canShowSLE2 = showShort && showLE2;
ENUM_DRAW_TYPE sLE2DrawType = canShowSLE2 ? DRAW_LINE : DRAW_NONE;
SetIndexBuffer(sLE2BufferIndex, sLE2Buffer, INDICATOR_DATA); SetIndexBuffer(sLE2BufferIndex, sLE2Buffer, INDICATOR_DATA);
PlotIndexSetInteger(sLE2BufferIndex, PLOT_SHOW_DATA, showCurrentLE2); PlotIndexSetInteger(sLE2BufferIndex, PLOT_SHOW_DATA, canShowSLE2);
PlotIndexSetInteger(sLE2BufferIndex, PLOT_DRAW_TYPE, sLE2DrawType); PlotIndexSetInteger(sLE2BufferIndex, PLOT_DRAW_TYPE, sLE2DrawType);
// //
bool canShowSSE1 = showShort && showSE1;
// Short Exit 1 ... // Short Exit 1 ...
ENUM_DRAW_TYPE sSE1DrawType = showCurrentSE1 ? DRAW_LINE : DRAW_NONE; ENUM_DRAW_TYPE sSE1DrawType = canShowSSE1 ? DRAW_LINE : DRAW_NONE;
SetIndexBuffer(sSE1BufferIndex, sSE1Buffer, INDICATOR_DATA); SetIndexBuffer(sSE1BufferIndex, sSE1Buffer, INDICATOR_DATA);
PlotIndexSetInteger(sSE1BufferIndex, PLOT_SHOW_DATA, showCurrentSE1); PlotIndexSetInteger(sSE1BufferIndex, PLOT_SHOW_DATA, canShowSSE1);
PlotIndexSetInteger(sSE1BufferIndex, PLOT_DRAW_TYPE, sSE1DrawType); PlotIndexSetInteger(sSE1BufferIndex, PLOT_DRAW_TYPE, sSE1DrawType);
// //
// Short Exit 2 ... // Short Exit 2 ...
ENUM_DRAW_TYPE sSE2DrawType = showCurrentSE2 ? DRAW_LINE : DRAW_NONE; bool canShowSSE2 = showShort && showSE2;
ENUM_DRAW_TYPE sSE2DrawType = canShowSSE2 ? DRAW_LINE : DRAW_NONE;
SetIndexBuffer(sSE2BufferIndex, sSE2Buffer, INDICATOR_DATA); SetIndexBuffer(sSE2BufferIndex, sSE2Buffer, INDICATOR_DATA);
PlotIndexSetInteger(sSE2BufferIndex, PLOT_SHOW_DATA, showCurrentSE2); PlotIndexSetInteger(sSE2BufferIndex, PLOT_SHOW_DATA, canShowSSE2);
PlotIndexSetInteger(sSE2BufferIndex, PLOT_DRAW_TYPE, sSE2DrawType); PlotIndexSetInteger(sSE2BufferIndex, PLOT_DRAW_TYPE, sSE2DrawType);
// //
@@ -794,30 +780,34 @@ void DefineBuffers()
// //
// Long Exit 1 ... // Long Exit 1 ...
ENUM_DRAW_TYPE mLE1DrawType = showCurrentLE1 ? DRAW_LINE : DRAW_NONE; bool canShowMLE1 = showMedium && showLE1;
ENUM_DRAW_TYPE mLE1DrawType = canShowMLE1 ? DRAW_LINE : DRAW_NONE;
SetIndexBuffer(mLE1BufferIndex, mLE1Buffer, INDICATOR_DATA); SetIndexBuffer(mLE1BufferIndex, mLE1Buffer, INDICATOR_DATA);
PlotIndexSetInteger(mLE1BufferIndex, PLOT_SHOW_DATA, showCurrentLE1); PlotIndexSetInteger(mLE1BufferIndex, PLOT_SHOW_DATA, canShowMLE1);
PlotIndexSetInteger(mLE1BufferIndex, PLOT_DRAW_TYPE, mLE1DrawType); PlotIndexSetInteger(mLE1BufferIndex, PLOT_DRAW_TYPE, mLE1DrawType);
// //
// Long Exit 2 ... // Long Exit 2 ...
ENUM_DRAW_TYPE mLE2DrawType = showCurrentLE2 ? DRAW_LINE : DRAW_NONE; bool canShowMLE2 = showMedium && showLE2;
ENUM_DRAW_TYPE mLE2DrawType = canShowMLE2 ? DRAW_LINE : DRAW_NONE;
SetIndexBuffer(mLE2BufferIndex, mLE2Buffer, INDICATOR_DATA); SetIndexBuffer(mLE2BufferIndex, mLE2Buffer, INDICATOR_DATA);
PlotIndexSetInteger(mLE2BufferIndex, PLOT_SHOW_DATA, showCurrentLE2); PlotIndexSetInteger(mLE2BufferIndex, PLOT_SHOW_DATA, canShowMLE2);
PlotIndexSetInteger(mLE2BufferIndex, PLOT_DRAW_TYPE, mLE2DrawType); PlotIndexSetInteger(mLE2BufferIndex, PLOT_DRAW_TYPE, mLE2DrawType);
// //
// Short Exit 1 ... // Short Exit 1 ...
ENUM_DRAW_TYPE mSE1DrawType = showCurrentSE1 ? DRAW_LINE : DRAW_NONE; bool canShowMSE1 = showMedium && showSE1;
ENUM_DRAW_TYPE mSE1DrawType = canShowMSE1 ? DRAW_LINE : DRAW_NONE;
SetIndexBuffer(mSE1BufferIndex, mSE1Buffer, INDICATOR_DATA); SetIndexBuffer(mSE1BufferIndex, mSE1Buffer, INDICATOR_DATA);
PlotIndexSetInteger(mSE1BufferIndex, PLOT_SHOW_DATA, showCurrentSE1); PlotIndexSetInteger(mSE1BufferIndex, PLOT_SHOW_DATA, canShowMSE1);
PlotIndexSetInteger(mSE1BufferIndex, PLOT_DRAW_TYPE, mSE1DrawType); PlotIndexSetInteger(mSE1BufferIndex, PLOT_DRAW_TYPE, mSE1DrawType);
// //
// Short Exit 2 ... // Short Exit 2 ...
ENUM_DRAW_TYPE mSE2DrawType = showCurrentSE2 ? DRAW_LINE : DRAW_NONE; bool canShowMSE2 = showMedium && showSE2;
ENUM_DRAW_TYPE mSE2DrawType = canShowMSE2 ? DRAW_LINE : DRAW_NONE;
SetIndexBuffer(mSE2BufferIndex, mSE2Buffer, INDICATOR_DATA); SetIndexBuffer(mSE2BufferIndex, mSE2Buffer, INDICATOR_DATA);
PlotIndexSetInteger(mSE2BufferIndex, PLOT_SHOW_DATA, showCurrentSE2); PlotIndexSetInteger(mSE2BufferIndex, PLOT_SHOW_DATA, canShowMSE2);
PlotIndexSetInteger(mSE2BufferIndex, PLOT_DRAW_TYPE, mSE2DrawType); PlotIndexSetInteger(mSE2BufferIndex, PLOT_DRAW_TYPE, mSE2DrawType);
// //
@@ -825,30 +815,34 @@ void DefineBuffers()
// //
// Long Exit 1 ... // Long Exit 1 ...
ENUM_DRAW_TYPE lLE1DrawType = showCurrentLE1 ? DRAW_LINE : DRAW_NONE; bool canShowLLE1 = showLong && showLE1;
ENUM_DRAW_TYPE lLE1DrawType = canShowLLE1 ? DRAW_LINE : DRAW_NONE;
SetIndexBuffer(lLE1BufferIndex, lLE1Buffer, INDICATOR_DATA); SetIndexBuffer(lLE1BufferIndex, lLE1Buffer, INDICATOR_DATA);
PlotIndexSetInteger(lLE1BufferIndex, PLOT_SHOW_DATA, showCurrentLE1); PlotIndexSetInteger(lLE1BufferIndex, PLOT_SHOW_DATA, canShowLLE1);
PlotIndexSetInteger(lLE1BufferIndex, PLOT_DRAW_TYPE, lLE1DrawType); PlotIndexSetInteger(lLE1BufferIndex, PLOT_DRAW_TYPE, lLE1DrawType);
// //
// Long Exit 2 ... // Long Exit 2 ...
ENUM_DRAW_TYPE lLE2DrawType = showCurrentLE2 ? DRAW_LINE : DRAW_NONE; bool canShowLLE2 = showLong && showLE2;
ENUM_DRAW_TYPE lLE2DrawType = canShowLLE2 ? DRAW_LINE : DRAW_NONE;
SetIndexBuffer(lLE2BufferIndex, lLE2Buffer, INDICATOR_DATA); SetIndexBuffer(lLE2BufferIndex, lLE2Buffer, INDICATOR_DATA);
PlotIndexSetInteger(lLE2BufferIndex, PLOT_SHOW_DATA, showCurrentLE2); PlotIndexSetInteger(lLE2BufferIndex, PLOT_SHOW_DATA, canShowLLE2);
PlotIndexSetInteger(lLE2BufferIndex, PLOT_DRAW_TYPE, lLE2DrawType); PlotIndexSetInteger(lLE2BufferIndex, PLOT_DRAW_TYPE, lLE2DrawType);
// //
// Short Exit 1 ... // Short Exit 1 ...
ENUM_DRAW_TYPE lSE1DrawType = showCurrentSE1 ? DRAW_LINE : DRAW_NONE; bool canShowLSE1 = showLong && showSE1;
ENUM_DRAW_TYPE lSE1DrawType = canShowLSE1 ? DRAW_LINE : DRAW_NONE;
SetIndexBuffer(lSE1BufferIndex, lSE1Buffer, INDICATOR_DATA); SetIndexBuffer(lSE1BufferIndex, lSE1Buffer, INDICATOR_DATA);
PlotIndexSetInteger(lSE1BufferIndex, PLOT_SHOW_DATA, showCurrentSE1); PlotIndexSetInteger(lSE1BufferIndex, PLOT_SHOW_DATA, canShowLSE1);
PlotIndexSetInteger(lSE1BufferIndex, PLOT_DRAW_TYPE, lSE1DrawType); PlotIndexSetInteger(lSE1BufferIndex, PLOT_DRAW_TYPE, lSE1DrawType);
// //
// Short Exit 2 ... // Short Exit 2 ...
ENUM_DRAW_TYPE lSE2DrawType = showCurrentSE2 ? DRAW_LINE : DRAW_NONE; bool canShowLSE2 = showLong && showSE2;
ENUM_DRAW_TYPE lSE2DrawType = canShowLSE2 ? DRAW_LINE : DRAW_NONE;
SetIndexBuffer(lSE2BufferIndex, lSE2Buffer, INDICATOR_DATA); SetIndexBuffer(lSE2BufferIndex, lSE2Buffer, INDICATOR_DATA);
PlotIndexSetInteger(lSE2BufferIndex, PLOT_SHOW_DATA, showCurrentSE2); PlotIndexSetInteger(lSE2BufferIndex, PLOT_SHOW_DATA, canShowLSE2);
PlotIndexSetInteger(lSE2BufferIndex, PLOT_DRAW_TYPE, lSE2DrawType); PlotIndexSetInteger(lSE2BufferIndex, PLOT_DRAW_TYPE, lSE2DrawType);
// //
@@ -856,30 +850,34 @@ void DefineBuffers()
// //
// Long Exit 1 ... // Long Exit 1 ...
ENUM_DRAW_TYPE hLE1DrawType = showCurrentLE1 ? DRAW_LINE : DRAW_NONE; bool canShowHLE1 = showHind && showLE1;
ENUM_DRAW_TYPE hLE1DrawType = canShowHLE1 ? DRAW_LINE : DRAW_NONE;
SetIndexBuffer(hLE1BufferIndex, hLE1Buffer, INDICATOR_DATA); SetIndexBuffer(hLE1BufferIndex, hLE1Buffer, INDICATOR_DATA);
PlotIndexSetInteger(hLE1BufferIndex, PLOT_SHOW_DATA, showCurrentLE1); PlotIndexSetInteger(hLE1BufferIndex, PLOT_SHOW_DATA, canShowHLE1);
PlotIndexSetInteger(hLE1BufferIndex, PLOT_DRAW_TYPE, hLE1DrawType); PlotIndexSetInteger(hLE1BufferIndex, PLOT_DRAW_TYPE, hLE1DrawType);
// //
// Long Exit 2 ... // Long Exit 2 ...
ENUM_DRAW_TYPE hLE2DrawType = showCurrentLE2 ? DRAW_LINE : DRAW_NONE; bool canShowHLE2 = showHind && showLE2;
ENUM_DRAW_TYPE hLE2DrawType = canShowHLE2 ? DRAW_LINE : DRAW_NONE;
SetIndexBuffer(hLE2BufferIndex, hLE2Buffer, INDICATOR_DATA); SetIndexBuffer(hLE2BufferIndex, hLE2Buffer, INDICATOR_DATA);
PlotIndexSetInteger(hLE2BufferIndex, PLOT_SHOW_DATA, showCurrentLE2); PlotIndexSetInteger(hLE2BufferIndex, PLOT_SHOW_DATA, canShowHLE2);
PlotIndexSetInteger(hLE2BufferIndex, PLOT_DRAW_TYPE, hLE2DrawType); PlotIndexSetInteger(hLE2BufferIndex, PLOT_DRAW_TYPE, hLE2DrawType);
// //
// Short Exit 1 ... // Short Exit 1 ...
ENUM_DRAW_TYPE hSE1DrawType = showCurrentSE1 ? DRAW_LINE : DRAW_NONE; bool canShowHSE1 = showHind && showSE1;
ENUM_DRAW_TYPE hSE1DrawType = canShowHSE1 ? DRAW_LINE : DRAW_NONE;
SetIndexBuffer(hSE1BufferIndex, hSE1Buffer, INDICATOR_DATA); SetIndexBuffer(hSE1BufferIndex, hSE1Buffer, INDICATOR_DATA);
PlotIndexSetInteger(hSE1BufferIndex, PLOT_SHOW_DATA, showCurrentSE1); PlotIndexSetInteger(hSE1BufferIndex, PLOT_SHOW_DATA, canShowHSE1);
PlotIndexSetInteger(hSE1BufferIndex, PLOT_DRAW_TYPE, hSE1DrawType); PlotIndexSetInteger(hSE1BufferIndex, PLOT_DRAW_TYPE, hSE1DrawType);
// //
// Short Exit 2 ... // Short Exit 2 ...
ENUM_DRAW_TYPE hSE2DrawType = showCurrentSE2 ? DRAW_LINE : DRAW_NONE; bool canShowHSE2 = showHind && showSE2;
ENUM_DRAW_TYPE hSE2DrawType = canShowHSE2 ? DRAW_LINE : DRAW_NONE;
SetIndexBuffer(hSE2BufferIndex, hSE2Buffer, INDICATOR_DATA); SetIndexBuffer(hSE2BufferIndex, hSE2Buffer, INDICATOR_DATA);
PlotIndexSetInteger(hSE2BufferIndex, PLOT_SHOW_DATA, showCurrentSE2); PlotIndexSetInteger(hSE2BufferIndex, PLOT_SHOW_DATA, canShowHSE2);
PlotIndexSetInteger(hSE2BufferIndex, PLOT_DRAW_TYPE, hSE2DrawType); PlotIndexSetInteger(hSE2BufferIndex, PLOT_DRAW_TYPE, hSE2DrawType);
} }
@@ -1029,7 +1027,7 @@ void CalculateCycle(
const double &close[], const double &close[],
const double &low[], const double &low[],
// //
int _length, // Calculation Length int _length, // Calculation Length
double &work[][], // Working Array double &work[][], // Working Array
// //
double &le1[], double &le1[],
+46 -43
View File
@@ -63,30 +63,21 @@ input ENUM_TIMEFRAMES hcPeriod = NULL; // Time Period
input group "Presentation"; input group "Presentation";
// //
// AVG ... // Parts ...
input bool showFast = true; // Show Fast input bool showFast = true; // Show Fast
input bool showSlow = true; // Show Slow input bool showSlow = true; // Show Slow
// //
// Current ... // AVG ...
input bool showCCFast = true; // Show Current Cycle Fast input bool showAVG = true; // Show Average
input bool showCCSlow = true; // Show Current Cycle Slow
// //
// Short ... // Cycles ...
input bool showSCFast = true; // Show Short Cycle Fast input bool showCurrent = true; // Show Current Cycle
input bool showSCSlow = true; // Show Short Cycle Slow input bool showShort = true; // Show Short Cycle
// input bool showMedium = true; // Show Medium Cycle
// Medium ... input bool showLong = true; // Show Long Cycle
input bool showMCFast = true; // Show Medium Cycle Fast input bool showHind = true; // Show Hind Cycle
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
// //
// Buffers ... // Buffers ...
@@ -598,22 +589,24 @@ void DefineBuffers()
// //
// Fast ... // 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); ArraySetAsSeries(avgFastBuffer, true);
SetIndexBuffer(avgFastBufferIndex, avgFastBuffer, INDICATOR_DATA); SetIndexBuffer(avgFastBufferIndex, avgFastBuffer, INDICATOR_DATA);
PlotIndexSetDouble(avgFastBufferIndex, PLOT_EMPTY_VALUE, 0); PlotIndexSetDouble(avgFastBufferIndex, PLOT_EMPTY_VALUE, 0);
PlotIndexSetInteger(avgFastBufferIndex, PLOT_DRAW_BEGIN, maxLength); PlotIndexSetInteger(avgFastBufferIndex, PLOT_DRAW_BEGIN, maxLength);
PlotIndexSetInteger(avgFastBufferIndex, PLOT_SHOW_DATA, showFast); PlotIndexSetInteger(avgFastBufferIndex, PLOT_SHOW_DATA, canShowAVGFast);
PlotIndexSetInteger(avgFastBufferIndex, PLOT_DRAW_TYPE, avgFastDrawType); PlotIndexSetInteger(avgFastBufferIndex, PLOT_DRAW_TYPE, avgFastDrawType);
// //
// Slow ... // 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); ArraySetAsSeries(avgSlowBuffer, true);
SetIndexBuffer(avgSlowBufferIndex, avgSlowBuffer, INDICATOR_DATA); SetIndexBuffer(avgSlowBufferIndex, avgSlowBuffer, INDICATOR_DATA);
PlotIndexSetDouble(avgSlowBufferIndex, PLOT_EMPTY_VALUE, 0); PlotIndexSetDouble(avgSlowBufferIndex, PLOT_EMPTY_VALUE, 0);
PlotIndexSetInteger(avgSlowBufferIndex, PLOT_DRAW_BEGIN, maxLength); PlotIndexSetInteger(avgSlowBufferIndex, PLOT_DRAW_BEGIN, maxLength);
PlotIndexSetInteger(avgSlowBufferIndex, PLOT_SHOW_DATA, showSlow); PlotIndexSetInteger(avgSlowBufferIndex, PLOT_SHOW_DATA, canShowAVGSlow);
PlotIndexSetInteger(avgSlowBufferIndex, PLOT_DRAW_TYPE, avgSlowDrawType); PlotIndexSetInteger(avgSlowBufferIndex, PLOT_DRAW_TYPE, avgSlowDrawType);
// //
@@ -621,22 +614,24 @@ void DefineBuffers()
// //
// Fast ... // 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); ArraySetAsSeries(cFastBuffer, true);
SetIndexBuffer(cFastBufferIndex, cFastBuffer, INDICATOR_DATA); SetIndexBuffer(cFastBufferIndex, cFastBuffer, INDICATOR_DATA);
PlotIndexSetDouble(cFastBufferIndex, PLOT_EMPTY_VALUE, 0); PlotIndexSetDouble(cFastBufferIndex, PLOT_EMPTY_VALUE, 0);
PlotIndexSetInteger(cFastBufferIndex, PLOT_DRAW_BEGIN, maxLength); PlotIndexSetInteger(cFastBufferIndex, PLOT_DRAW_BEGIN, maxLength);
PlotIndexSetInteger(cFastBufferIndex, PLOT_SHOW_DATA, showCCFast); PlotIndexSetInteger(cFastBufferIndex, PLOT_SHOW_DATA, canShowCFast);
PlotIndexSetInteger(cFastBufferIndex, PLOT_DRAW_TYPE, cFastDrawType); PlotIndexSetInteger(cFastBufferIndex, PLOT_DRAW_TYPE, cFastDrawType);
// //
// Slow ... // 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); ArraySetAsSeries(cSlowBuffer, true);
SetIndexBuffer(cSlowBufferIndex, cSlowBuffer, INDICATOR_DATA); SetIndexBuffer(cSlowBufferIndex, cSlowBuffer, INDICATOR_DATA);
PlotIndexSetDouble(cSlowBufferIndex, PLOT_EMPTY_VALUE, 0); PlotIndexSetDouble(cSlowBufferIndex, PLOT_EMPTY_VALUE, 0);
PlotIndexSetInteger(cSlowBufferIndex, PLOT_DRAW_BEGIN, maxLength); PlotIndexSetInteger(cSlowBufferIndex, PLOT_DRAW_BEGIN, maxLength);
PlotIndexSetInteger(cSlowBufferIndex, PLOT_SHOW_DATA, showCCSlow); PlotIndexSetInteger(cSlowBufferIndex, PLOT_SHOW_DATA, canShowCSlow);
PlotIndexSetInteger(cSlowBufferIndex, PLOT_DRAW_TYPE, cSlowDrawType); PlotIndexSetInteger(cSlowBufferIndex, PLOT_DRAW_TYPE, cSlowDrawType);
// //
@@ -644,22 +639,24 @@ void DefineBuffers()
// //
// Fast ... // 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); ArraySetAsSeries(sFastBuffer, true);
SetIndexBuffer(sFastBufferIndex, sFastBuffer, INDICATOR_DATA); SetIndexBuffer(sFastBufferIndex, sFastBuffer, INDICATOR_DATA);
PlotIndexSetDouble(sFastBufferIndex, PLOT_EMPTY_VALUE, 0); PlotIndexSetDouble(sFastBufferIndex, PLOT_EMPTY_VALUE, 0);
PlotIndexSetInteger(sFastBufferIndex, PLOT_DRAW_BEGIN, maxLength); PlotIndexSetInteger(sFastBufferIndex, PLOT_DRAW_BEGIN, maxLength);
PlotIndexSetInteger(sFastBufferIndex, PLOT_SHOW_DATA, showSCFast); PlotIndexSetInteger(sFastBufferIndex, PLOT_SHOW_DATA, canShowSFast);
PlotIndexSetInteger(sFastBufferIndex, PLOT_DRAW_TYPE, sFastDrawType); PlotIndexSetInteger(sFastBufferIndex, PLOT_DRAW_TYPE, sFastDrawType);
// //
// Slow ... // 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); ArraySetAsSeries(sSlowBuffer, true);
SetIndexBuffer(sSlowBufferIndex, sSlowBuffer, INDICATOR_DATA); SetIndexBuffer(sSlowBufferIndex, sSlowBuffer, INDICATOR_DATA);
PlotIndexSetDouble(sSlowBufferIndex, PLOT_EMPTY_VALUE, 0); PlotIndexSetDouble(sSlowBufferIndex, PLOT_EMPTY_VALUE, 0);
PlotIndexSetInteger(sSlowBufferIndex, PLOT_DRAW_BEGIN, maxLength); PlotIndexSetInteger(sSlowBufferIndex, PLOT_DRAW_BEGIN, maxLength);
PlotIndexSetInteger(sSlowBufferIndex, PLOT_SHOW_DATA, showSCSlow); PlotIndexSetInteger(sSlowBufferIndex, PLOT_SHOW_DATA, canShowSSlow);
PlotIndexSetInteger(sSlowBufferIndex, PLOT_DRAW_TYPE, sSlowDrawType); PlotIndexSetInteger(sSlowBufferIndex, PLOT_DRAW_TYPE, sSlowDrawType);
// //
@@ -667,22 +664,24 @@ void DefineBuffers()
// //
// Fast ... // 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); ArraySetAsSeries(mFastBuffer, true);
SetIndexBuffer(mFastBufferIndex, mFastBuffer, INDICATOR_DATA); SetIndexBuffer(mFastBufferIndex, mFastBuffer, INDICATOR_DATA);
PlotIndexSetDouble(mFastBufferIndex, PLOT_EMPTY_VALUE, 0); PlotIndexSetDouble(mFastBufferIndex, PLOT_EMPTY_VALUE, 0);
PlotIndexSetInteger(mFastBufferIndex, PLOT_DRAW_BEGIN, maxLength); PlotIndexSetInteger(mFastBufferIndex, PLOT_DRAW_BEGIN, maxLength);
PlotIndexSetInteger(mFastBufferIndex, PLOT_SHOW_DATA, showMCFast); PlotIndexSetInteger(mFastBufferIndex, PLOT_SHOW_DATA, canShowMFast);
PlotIndexSetInteger(mFastBufferIndex, PLOT_DRAW_TYPE, mFastDrawType); PlotIndexSetInteger(mFastBufferIndex, PLOT_DRAW_TYPE, mFastDrawType);
// //
// Slow ... // 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); ArraySetAsSeries(mSlowBuffer, true);
SetIndexBuffer(mSlowBufferIndex, mSlowBuffer, INDICATOR_DATA); SetIndexBuffer(mSlowBufferIndex, mSlowBuffer, INDICATOR_DATA);
PlotIndexSetDouble(mSlowBufferIndex, PLOT_EMPTY_VALUE, 0); PlotIndexSetDouble(mSlowBufferIndex, PLOT_EMPTY_VALUE, 0);
PlotIndexSetInteger(mSlowBufferIndex, PLOT_DRAW_BEGIN, maxLength); PlotIndexSetInteger(mSlowBufferIndex, PLOT_DRAW_BEGIN, maxLength);
PlotIndexSetInteger(mSlowBufferIndex, PLOT_SHOW_DATA, showMCSlow); PlotIndexSetInteger(mSlowBufferIndex, PLOT_SHOW_DATA, canShowMSlow);
PlotIndexSetInteger(mSlowBufferIndex, PLOT_DRAW_TYPE, mSlowDrawType); PlotIndexSetInteger(mSlowBufferIndex, PLOT_DRAW_TYPE, mSlowDrawType);
// //
@@ -690,22 +689,24 @@ void DefineBuffers()
// //
// Fast ... // 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); ArraySetAsSeries(lFastBuffer, true);
SetIndexBuffer(lFastBufferIndex, lFastBuffer, INDICATOR_DATA); SetIndexBuffer(lFastBufferIndex, lFastBuffer, INDICATOR_DATA);
PlotIndexSetDouble(lFastBufferIndex, PLOT_EMPTY_VALUE, 0); PlotIndexSetDouble(lFastBufferIndex, PLOT_EMPTY_VALUE, 0);
PlotIndexSetInteger(lFastBufferIndex, PLOT_DRAW_BEGIN, maxLength); PlotIndexSetInteger(lFastBufferIndex, PLOT_DRAW_BEGIN, maxLength);
PlotIndexSetInteger(lFastBufferIndex, PLOT_SHOW_DATA, showLCFast); PlotIndexSetInteger(lFastBufferIndex, PLOT_SHOW_DATA, canShowLFast);
PlotIndexSetInteger(lFastBufferIndex, PLOT_DRAW_TYPE, lFastDrawType); PlotIndexSetInteger(lFastBufferIndex, PLOT_DRAW_TYPE, lFastDrawType);
// //
// Slow ... // 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); ArraySetAsSeries(lSlowBuffer, true);
SetIndexBuffer(lSlowBufferIndex, lSlowBuffer, INDICATOR_DATA); SetIndexBuffer(lSlowBufferIndex, lSlowBuffer, INDICATOR_DATA);
PlotIndexSetDouble(lSlowBufferIndex, PLOT_EMPTY_VALUE, 0); PlotIndexSetDouble(lSlowBufferIndex, PLOT_EMPTY_VALUE, 0);
PlotIndexSetInteger(lSlowBufferIndex, PLOT_DRAW_BEGIN, maxLength); PlotIndexSetInteger(lSlowBufferIndex, PLOT_DRAW_BEGIN, maxLength);
PlotIndexSetInteger(lSlowBufferIndex, PLOT_SHOW_DATA, showLCSlow); PlotIndexSetInteger(lSlowBufferIndex, PLOT_SHOW_DATA, canShowLSlow);
PlotIndexSetInteger(lSlowBufferIndex, PLOT_DRAW_TYPE, lSlowDrawType); PlotIndexSetInteger(lSlowBufferIndex, PLOT_DRAW_TYPE, lSlowDrawType);
// //
@@ -713,22 +714,24 @@ void DefineBuffers()
// //
// Fast ... // 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); ArraySetAsSeries(hFastBuffer, true);
SetIndexBuffer(hFastBufferIndex, hFastBuffer, INDICATOR_DATA); SetIndexBuffer(hFastBufferIndex, hFastBuffer, INDICATOR_DATA);
PlotIndexSetDouble(hFastBufferIndex, PLOT_EMPTY_VALUE, 0); PlotIndexSetDouble(hFastBufferIndex, PLOT_EMPTY_VALUE, 0);
PlotIndexSetInteger(hFastBufferIndex, PLOT_DRAW_BEGIN, maxLength); PlotIndexSetInteger(hFastBufferIndex, PLOT_DRAW_BEGIN, maxLength);
PlotIndexSetInteger(hFastBufferIndex, PLOT_SHOW_DATA, showHCFast); PlotIndexSetInteger(hFastBufferIndex, PLOT_SHOW_DATA, canShowHFast);
PlotIndexSetInteger(hFastBufferIndex, PLOT_DRAW_TYPE, hFastDrawType); PlotIndexSetInteger(hFastBufferIndex, PLOT_DRAW_TYPE, hFastDrawType);
// //
// Slow ... // 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); ArraySetAsSeries(hSlowBuffer, true);
SetIndexBuffer(hSlowBufferIndex, hSlowBuffer, INDICATOR_DATA); SetIndexBuffer(hSlowBufferIndex, hSlowBuffer, INDICATOR_DATA);
PlotIndexSetDouble(hSlowBufferIndex, PLOT_EMPTY_VALUE, 0); PlotIndexSetDouble(hSlowBufferIndex, PLOT_EMPTY_VALUE, 0);
PlotIndexSetInteger(hSlowBufferIndex, PLOT_DRAW_BEGIN, maxLength); PlotIndexSetInteger(hSlowBufferIndex, PLOT_DRAW_BEGIN, maxLength);
PlotIndexSetInteger(hSlowBufferIndex, PLOT_SHOW_DATA, showHCSlow); PlotIndexSetInteger(hSlowBufferIndex, PLOT_SHOW_DATA, canShowHSlow);
PlotIndexSetInteger(hSlowBufferIndex, PLOT_DRAW_TYPE, hSlowDrawType); PlotIndexSetInteger(hSlowBufferIndex, PLOT_DRAW_TYPE, hSlowDrawType);
} }
@@ -198,19 +198,58 @@ struct XCHStartegyAMarketsConditionsParser
bool isDowJones = _symbolParser.IsDowJones(signal.symbol); bool isDowJones = _symbolParser.IsDowJones(signal.symbol);
// //
bool isEURUSDFiltered = false; bool isEURUSDFiltered = _eurusdLongParser.IsFiltered(
bool isGBPUSDFiltered = false; signal,
bool isEURGBPFiltered = false; conditions //
bool isXAUUSDFiltered = false; );
bool isUSDJPYFiltered = false; bool isGBPUSDFiltered = _gbpusdLongParser.IsFiltered(
bool isEURJPYFiltered = false; signal,
bool isUSDCHFFiltered = false; conditions //
bool isEURCHFFiltered = false; );
bool isAUDUSDFiltered = false; bool isEURGBPFiltered = _eurgbpLongParser.IsFiltered(
bool isNZDUSDFiltered = false; signal,
bool isUSDCADFiltered = false; conditions //
bool isEURCADFiltered = false; );
bool isDowJonesFiltered = false; bool isUSDJPYFiltered = _usdjpyLongParser.IsFiltered(
signal,
conditions //
);
bool isEURJPYFiltered = _eurjpyLongParser.IsFiltered(
signal,
conditions //
);
bool isUSDCHFFiltered = _usdchfLongParser.IsFiltered(
signal,
conditions //
);
bool isEURCHFFiltered = _eurchfLongParser.IsFiltered(
signal,
conditions //
);
bool isXAUUSDFiltered = _xauusdLongParser.IsFiltered(
signal,
conditions //
);
bool isAUDUSDFiltered = _audusdLongParser.IsFiltered(
signal,
conditions //
);
bool isNZDUSDFiltered = _nzdusdLongParser.IsFiltered(
signal,
conditions //
);
bool isUSDCADFiltered = _usdcadLongParser.IsFiltered(
signal,
conditions //
);
bool isEURCADFiltered = _eurcadLongParser.IsFiltered(
signal,
conditions //
);
bool isDowJonesFiltered = _dowjonesLongParser.IsFiltered(
signal,
conditions //
);
// //
if (!force) if (!force)
@@ -218,120 +257,55 @@ struct XCHStartegyAMarketsConditionsParser
// //
if (isEURUSD) if (isEURUSD)
{ {
// result = isEURUSDFiltered;
result =
_eurusdLongParser.IsFiltered(
signal,
conditions //
);
} }
else if (isGBPUSD) else if (isGBPUSD)
{ {
// result = isGBPUSDFiltered;
result =
_gbpusdLongParser.IsFiltered(
signal,
conditions //
);
} }
else if (isEURGBP) else if (isEURGBP)
{ {
// result = isEURGBPFiltered;
result =
_eurgbpLongParser.IsFiltered(
signal,
conditions //
);
} }
else if (isUSDJPY) else if (isUSDJPY)
{ {
// result = isUSDJPYFiltered;
result =
_usdjpyLongParser.IsFiltered(
signal,
conditions //
);
} }
else if (isEURJPY) else if (isEURJPY)
{ {
// result = isEURJPYFiltered;
result =
_eurjpyLongParser.IsFiltered(
signal,
conditions //
);
} }
else if (isUSDCHF) else if (isUSDCHF)
{ {
// result = isUSDCHFFiltered;
result =
_usdchfLongParser.IsFiltered(
signal,
conditions //
);
} }
else if (isEURCHF) else if (isEURCHF)
{ {
// result = isEURCHFFiltered;
result =
_eurchfLongParser.IsFiltered(
signal,
conditions //
);
} }
else if (isXAUUSD) else if (isXAUUSD)
{ {
// result = isXAUUSDFiltered;
result =
_xauusdLongParser.IsFiltered(
signal,
conditions //
);
} }
else if (isAUDUSD) else if (isAUDUSD)
{ {
// result = isAUDUSDFiltered;
result =
_audusdLongParser.IsFiltered(
signal,
conditions //
);
} }
else if (isNZDUSD) else if (isNZDUSD)
{ {
// result = isNZDUSDFiltered;
result =
_nzdusdLongParser.IsFiltered(
signal,
conditions //
);
} }
else if (isUSDCAD) else if (isUSDCAD)
{ {
// result = isUSDCADFiltered;
result =
_usdcadLongParser.IsFiltered(
signal,
conditions //
);
} }
else if (isEURCAD) else if (isEURCAD)
{ {
// result = isEURCADFiltered;
result =
_eurcadLongParser.IsFiltered(
signal,
conditions //
);
} }
else if (isDowJones) else if (isDowJones)
{ {
// result = isDowJonesFiltered;
result =
_dowjonesLongParser.IsFiltered(
signal,
conditions //
);
} }
} }
else else
@@ -339,94 +313,55 @@ struct XCHStartegyAMarketsConditionsParser
// //
result = result =
// //
_eurusdLongParser.IsFiltered( isEURUSDFiltered
signal,
conditions //
)
// //
|| ||
// //
_gbpusdLongParser.IsFiltered( isGBPUSDFiltered
signal,
conditions //
)
// //
|| ||
// //
_eurgbpLongParser.IsFiltered( isEURGBPFiltered
signal,
conditions //
)
// //
|| ||
// //
_usdjpyLongParser.IsFiltered( isUSDJPYFiltered
signal,
conditions //
)
// //
|| ||
// //
_eurjpyLongParser.IsFiltered( isEURJPYFiltered
signal,
conditions //
)
// //
|| ||
// //
_usdchfLongParser.IsFiltered( isUSDCHFFiltered
signal,
conditions //
)
// //
|| ||
// //
_eurchfLongParser.IsFiltered( isEURCHFFiltered
signal,
conditions //
)
// //
|| ||
// //
_xauusdLongParser.IsFiltered( isXAUUSDFiltered
signal,
conditions //
)
// //
|| ||
// //
_audusdLongParser.IsFiltered( isAUDUSDFiltered
signal,
conditions //
)
// //
|| ||
// //
_nzdusdLongParser.IsFiltered( isNZDUSDFiltered
signal,
conditions //
)
// //
|| ||
// //
_usdcadLongParser.IsFiltered( isUSDCADFiltered
signal,
conditions //
)
// //
|| ||
// //
_eurcadLongParser.IsFiltered( isEURCADFiltered
signal,
conditions //
)
// //
|| ||
// //
_dowjonesLongParser.IsFiltered( isDowJonesFiltered
signal,
conditions //
)
// //
; ;
} }
@@ -462,19 +397,58 @@ struct XCHStartegyAMarketsConditionsParser
bool isDowJones = _symbolParser.IsDowJones(signal.symbol); bool isDowJones = _symbolParser.IsDowJones(signal.symbol);
// //
bool isEURUSDFiltered = false; bool isEURUSDFiltered = _eurusdShortParser.IsFiltered(
bool isGBPUSDFiltered = false; signal,
bool isEURGBPFiltered = false; conditions //
bool isXAUUSDFiltered = false; );
bool isUSDJPYFiltered = false; bool isGBPUSDFiltered = _gbpusdShortParser.IsFiltered(
bool isEURJPYFiltered = false; signal,
bool isUSDCHFFiltered = false; conditions //
bool isEURCHFFiltered = false; );
bool isAUDUSDFiltered = false; bool isEURGBPFiltered = _eurgbpShortParser.IsFiltered(
bool isNZDUSDFiltered = false; signal,
bool isUSDCADFiltered = false; conditions //
bool isEURCADFiltered = false; );
bool isDowJonesFiltered = false; bool isUSDJPYFiltered = _usdjpyShortParser.IsFiltered(
signal,
conditions //
);
bool isEURJPYFiltered = _eurjpyShortParser.IsFiltered(
signal,
conditions //
);
bool isUSDCHFFiltered = _usdchfShortParser.IsFiltered(
signal,
conditions //
);
bool isEURCHFFiltered = _eurchfShortParser.IsFiltered(
signal,
conditions //
);
bool isXAUUSDFiltered = _xauusdShortParser.IsFiltered(
signal,
conditions //
);
bool isAUDUSDFiltered = _audusdShortParser.IsFiltered(
signal,
conditions //
);
bool isNZDUSDFiltered = _nzdusdShortParser.IsFiltered(
signal,
conditions //
);
bool isUSDCADFiltered = _usdcadShortParser.IsFiltered(
signal,
conditions //
);
bool isEURCADFiltered = _eurcadShortParser.IsFiltered(
signal,
conditions //
);
bool isDowJonesFiltered = _dowjonesShortParser.IsFiltered(
signal,
conditions //
);
// //
if (!force) if (!force)
@@ -482,120 +456,55 @@ struct XCHStartegyAMarketsConditionsParser
// //
if (isEURUSD) if (isEURUSD)
{ {
// result = isEURUSDFiltered;
result =
_eurusdShortParser.IsFiltered(
signal,
conditions //
);
} }
else if (isGBPUSD) else if (isGBPUSD)
{ {
// result = isGBPUSDFiltered;
result =
_gbpusdShortParser.IsFiltered(
signal,
conditions //
);
} }
else if (isEURGBP) else if (isEURGBP)
{ {
// result = isEURGBPFiltered;
result =
_eurgbpShortParser.IsFiltered(
signal,
conditions //
);
} }
else if (isUSDJPY) else if (isUSDJPY)
{ {
// result = isUSDJPYFiltered;
result =
_usdjpyShortParser.IsFiltered(
signal,
conditions //
);
} }
else if (isEURJPY) else if (isEURJPY)
{ {
// result = isEURJPYFiltered;
result =
_eurjpyShortParser.IsFiltered(
signal,
conditions //
);
} }
else if (isUSDCHF) else if (isUSDCHF)
{ {
// result = isUSDCHFFiltered;
result =
_usdchfShortParser.IsFiltered(
signal,
conditions //
);
} }
else if (isEURCHF) else if (isEURCHF)
{ {
// result = isEURCHFFiltered;
result =
_eurchfShortParser.IsFiltered(
signal,
conditions //
);
} }
else if (isXAUUSD) else if (isXAUUSD)
{ {
// result = isXAUUSDFiltered;
result =
_xauusdShortParser.IsFiltered(
signal,
conditions //
);
} }
else if (isAUDUSD) else if (isAUDUSD)
{ {
// result = isAUDUSDFiltered;
result =
_audusdShortParser.IsFiltered(
signal,
conditions //
);
} }
else if (isNZDUSD) else if (isNZDUSD)
{ {
// result = isNZDUSDFiltered;
result =
_nzdusdShortParser.IsFiltered(
signal,
conditions //
);
} }
else if (isUSDCAD) else if (isUSDCAD)
{ {
// result = isUSDCADFiltered;
result =
_usdcadShortParser.IsFiltered(
signal,
conditions //
);
} }
else if (isEURCAD) else if (isEURCAD)
{ {
// result = isEURCADFiltered;
result =
_eurcadShortParser.IsFiltered(
signal,
conditions //
);
} }
else if (isDowJones) else if (isDowJones)
{ {
// result = isDowJonesFiltered;
result =
_dowjonesShortParser.IsFiltered(
signal,
conditions //
);
} }
} }
else else
@@ -603,94 +512,55 @@ struct XCHStartegyAMarketsConditionsParser
// //
result = result =
// //
_eurusdShortParser.IsFiltered( isEURUSDFiltered
signal,
conditions //
)
// //
|| ||
// //
_gbpusdShortParser.IsFiltered( isGBPUSDFiltered
signal,
conditions //
)
// //
|| ||
// //
_eurgbpShortParser.IsFiltered( isEURGBPFiltered
signal,
conditions //
)
// //
|| ||
// //
_usdjpyShortParser.IsFiltered( isUSDJPYFiltered
signal,
conditions //
)
// //
|| ||
// //
_eurjpyShortParser.IsFiltered( isEURJPYFiltered
signal,
conditions //
)
// //
|| ||
// //
_usdchfShortParser.IsFiltered( isUSDCHFFiltered
signal,
conditions //
)
// //
|| ||
// //
_eurchfShortParser.IsFiltered( isEURCHFFiltered
signal,
conditions //
)
// //
|| ||
// //
_xauusdShortParser.IsFiltered( isXAUUSDFiltered
signal,
conditions //
)
// //
|| ||
// //
_audusdShortParser.IsFiltered( isAUDUSDFiltered
signal,
conditions //
)
// //
|| ||
// //
_nzdusdShortParser.IsFiltered( isNZDUSDFiltered
signal,
conditions //
)
// //
|| ||
// //
_usdcadShortParser.IsFiltered( isUSDCADFiltered
signal,
conditions //
)
// //
|| ||
// //
_eurcadShortParser.IsFiltered( isEURCADFiltered
signal,
conditions //
)
// //
|| ||
// //
_dowjonesShortParser.IsFiltered( isDowJonesFiltered
signal,
conditions //
)
// //
; ;
} }
+21 -30
View File
@@ -1527,16 +1527,16 @@ private:
// //
chmInputs.showFast = false; chmInputs.showFast = false;
chmInputs.showSlow = false; chmInputs.showSlow = false;
chmInputs.showCCFast = false;
chmInputs.showCCSlow = false; //
chmInputs.showSCFast = false; chmInputs.showAVG = false;
chmInputs.showSCSlow = false;
chmInputs.showMCFast = false; //
chmInputs.showMCSlow = false; chmInputs.showCurrent = false;
chmInputs.showLCFast = false; chmInputs.showShort = false;
chmInputs.showLCSlow = false; chmInputs.showMedium = false;
chmInputs.showHCFast = false; chmInputs.showLong = false;
chmInputs.showHCSlow = false; chmInputs.showHind = false;
// //
chmHelper = new XSCXCHMHelper(); chmHelper = new XSCXCHMHelper();
@@ -1659,26 +1659,17 @@ private:
chcheInputs.hcPeriod = hcPeriod; chcheInputs.hcPeriod = hcPeriod;
// //
chcheInputs.showCurrentLE1 = false; chcheInputs.showLE1 = false;
chcheInputs.showCurrentLE2 = false; chcheInputs.showLE2 = false;
chcheInputs.showCurrentSE1 = false; chcheInputs.showSE1 = false;
chcheInputs.showCurrentSE2 = false; chcheInputs.showSE2 = false;
chcheInputs.showShortLE1 = false;
chcheInputs.showShortLE2 = false; //
chcheInputs.showShortSE1 = false; chcheInputs.showCurrent = false;
chcheInputs.showShortSE2 = false; chcheInputs.showShort = false;
chcheInputs.showMediumLE1 = false; chcheInputs.showMedium = false;
chcheInputs.showMediumLE2 = false; chcheInputs.showLong = false;
chcheInputs.showMediumSE1 = false; chcheInputs.showHind = false;
chcheInputs.showMediumSE2 = false;
chcheInputs.showLongLE1 = false;
chcheInputs.showLongLE2 = false;
chcheInputs.showLongSE1 = false;
chcheInputs.showLongSE2 = false;
chcheInputs.showHindLE1 = false;
chcheInputs.showHindLE2 = false;
chcheInputs.showHindSE1 = false;
chcheInputs.showHindSE2 = false;
// //
chcheHelper = new XSCXCHCHEHelper(); chcheHelper = new XSCXCHCHEHelper();