Skip to content

Commit

Permalink
Indicators: Adds Indicator source type and mode to constructor's argu…
Browse files Browse the repository at this point in the history
…ment.

Other minor indicator code fixes.

Fixes indicator tests.
  • Loading branch information
kenorb committed Jun 26, 2022
1 parent 17373a5 commit b010f5d
Show file tree
Hide file tree
Showing 74 changed files with 347 additions and 221 deletions.
2 changes: 1 addition & 1 deletion Indicator.mqh
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class Indicator : public IndicatorData {
* Class constructor.
*/
Indicator(const TS& _iparams, const IndicatorDataParams& _idparams, IndicatorData* _indi_src = NULL, int _indi_mode = 0)
: IndicatorData(_idparams) {
: IndicatorData(_idparams, _indi_src, _indi_mode) {
iparams = _iparams;
Init();
}
Expand Down
6 changes: 3 additions & 3 deletions IndicatorData.mqh
Original file line number Diff line number Diff line change
Expand Up @@ -747,15 +747,15 @@ class IndicatorData : public IndicatorBase {
" must select source indicator's mode via SetDataSourceMode(int). Defaulting to mode 0.");
_target.idparams.Set(STRUCT_ENUM(IndicatorDataParams, IDATA_PARAM_DATA_SRC_MODE), 0);
DebugBreak();
} else if (_source.GetModeCount() == 1 &&
} else if (_source.Get<int>(STRUCT_ENUM(IndicatorDataParams, IDATA_PARAM_DATA_SRC_MODE)) == 1 &&
_target.idparams.Get<int>(STRUCT_ENUM(IndicatorDataParams, IDATA_PARAM_DATA_SRC_MODE)) == -1) {
_target.idparams.Set(STRUCT_ENUM(IndicatorDataParams, IDATA_PARAM_DATA_SRC_MODE), 0);
} else if (_target.idparams.Get<int>(STRUCT_ENUM(IndicatorDataParams, IDATA_PARAM_DATA_SRC_MODE)) < 0 ||
_target.idparams.Get<int>(STRUCT_ENUM(IndicatorDataParams, IDATA_PARAM_DATA_SRC_MODE)) >
_source.GetModeCount()) {
_source.Get<int>(STRUCT_ENUM(IndicatorDataParams, IDATA_PARAM_MAX_MODES))) {
Alert("Error! ", _target.GetName(),
" must select valid source indicator's mode via SetDataSourceMode(int) between 0 and ",
_source.GetModeCount(), ".");
_source.Get<int>(STRUCT_ENUM(IndicatorDataParams, IDATA_PARAM_MAX_MODES)), ".");
DebugBreak();
}
}
Expand Down
5 changes: 3 additions & 2 deletions Indicators/Bitwise/Indi_Candle.mqh
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@ class Indi_Candle : public IndicatorTickOrCandleSource<CandleParams> {
/**
* Class constructor.
*/
Indi_Candle(CandleParams &_p, IndicatorData *_indi_src = NULL)
Indi_Candle(CandleParams &_p, ENUM_IDATA_SOURCE_TYPE _idstype = IDATA_BUILTIN, IndicatorData *_indi_src = NULL,
int _indi_src_mode = 0)
: IndicatorTickOrCandleSource(
_p, IndicatorDataParams::GetInstance(1, TYPE_INT, IDATA_BUILTIN, IDATA_RANGE_RANGE),
_p, IndicatorDataParams::GetInstance(1, TYPE_INT, _idstype, IDATA_RANGE_RANGE, _indi_src_mode),
_indi_src){};
Indi_Candle(ENUM_TIMEFRAMES _tf = PERIOD_CURRENT, int _shift = 0)
: IndicatorTickOrCandleSource(INDI_CANDLE, _tf, _shift){};
Expand Down
6 changes: 4 additions & 2 deletions Indicators/Bitwise/Indi_Pattern.mqh
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@ class Indi_Pattern : public IndicatorTickOrCandleSource<IndiPatternParams> {
/**
* Class constructor.
*/
Indi_Pattern(IndiPatternParams& _p, IndicatorData* _indi_src = NULL)
Indi_Pattern(IndiPatternParams& _p, ENUM_IDATA_SOURCE_TYPE _idstype = IDATA_BUILTIN, IndicatorData* _indi_src = NULL,
int _indi_src_mode = 0)
: IndicatorTickOrCandleSource(
_p, IndicatorDataParams::GetInstance(5, TYPE_UINT, IDATA_BUILTIN, IDATA_RANGE_BITWISE), _indi_src){};
_p, IndicatorDataParams::GetInstance(5, TYPE_UINT, _idstype, IDATA_RANGE_BITWISE, _indi_src_mode),
_indi_src){};
Indi_Pattern(ENUM_TIMEFRAMES _tf = PERIOD_CURRENT, int _shift = 0)
: IndicatorTickOrCandleSource(INDI_PATTERN, _tf, _shift){};

Expand Down
6 changes: 4 additions & 2 deletions Indicators/Indi_AC.mqh
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,11 @@ class Indi_AC : public IndicatorTickOrCandleSource<IndiACParams> {
/**
* Class constructor.
*/
Indi_AC(IndiACParams &_p, IndicatorData *_indi_src = NULL)
Indi_AC(IndiACParams &_p, ENUM_IDATA_SOURCE_TYPE _idstype = IDATA_BUILTIN, IndicatorData *_indi_src = NULL,
int _indi_src_mode = 0)
: IndicatorTickOrCandleSource(
_p, IndicatorDataParams::GetInstance(1, TYPE_DOUBLE, IDATA_BUILTIN, IDATA_RANGE_MIXED), _indi_src) {
_p, IndicatorDataParams::GetInstance(1, TYPE_DOUBLE, _idstype, IDATA_RANGE_MIXED, _indi_src_mode),
_indi_src) {
Init();
};
Indi_AC(ENUM_TIMEFRAMES _tf = PERIOD_CURRENT, int _shift = 0) : IndicatorTickOrCandleSource(INDI_AC, _tf, _shift) {
Expand Down
9 changes: 6 additions & 3 deletions Indicators/Indi_AD.mqh
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,12 @@ class Indi_AD : public IndicatorTickOrCandleSource<IndiADParams> {
/**
* Class constructor.
*/
Indi_AD(IndiADParams &_p, IndicatorData *_indi_src = NULL)
: IndicatorTickOrCandleSource(
_p, IndicatorDataParams::GetInstance(1, TYPE_DOUBLE, IDATA_BUILTIN, IDATA_RANGE_MIXED), _indi_src){};
Indi_AD(IndiADParams &_p, ENUM_IDATA_SOURCE_TYPE _idstype = IDATA_BUILTIN, IndicatorData *_indi_src = NULL,
int _indi_src_mode = 0)
: IndicatorTickOrCandleSource(_p,
IndicatorDataParams::GetInstance(FINAL_INDI_ADX_LINE_ENTRY, TYPE_DOUBLE, _idstype,
IDATA_RANGE_MIXED, _indi_src_mode),
_indi_src){};
Indi_AD(ENUM_TIMEFRAMES _tf = PERIOD_CURRENT, int _shift = 0) : IndicatorTickOrCandleSource(INDI_AD, _tf, _shift) {
iparams.SetTf(_tf);
};
Expand Down
11 changes: 6 additions & 5 deletions Indicators/Indi_ADX.mqh
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,12 @@ class Indi_ADX : public IndicatorTickOrCandleSource<IndiADXParams> {
/**
* Class constructor.
*/
Indi_ADX(IndiADXParams &_p, IndicatorData *_indi_src = NULL)
: IndicatorTickOrCandleSource(
_p,
IndicatorDataParams::GetInstance(FINAL_INDI_ADX_LINE_ENTRY, TYPE_DOUBLE, IDATA_BUILTIN, IDATA_RANGE_RANGE),
_indi_src) {
Indi_ADX(IndiADXParams &_p, ENUM_IDATA_SOURCE_TYPE _idstype = IDATA_BUILTIN, IndicatorData *_indi_src = NULL,
int _indi_src_mode = 0)
: IndicatorTickOrCandleSource(_p,
IndicatorDataParams::GetInstance(FINAL_INDI_ADX_LINE_ENTRY, TYPE_DOUBLE, _idstype,
IDATA_RANGE_RANGE, _indi_src_mode),
_indi_src) {
Init();
}
Indi_ADX(ENUM_TIMEFRAMES _tf = PERIOD_CURRENT, int _shift = 0) : IndicatorTickOrCandleSource(INDI_ADX, _tf, _shift) {
Expand Down
8 changes: 6 additions & 2 deletions Indicators/Indi_ADXW.mqh
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,12 @@ class Indi_ADXW : public IndicatorTickOrCandleSource<IndiADXWParams> {
/**
* Class constructor.
*/
Indi_ADXW(IndiADXWParams &_p, IndicatorData *_indi_src = NULL)
: IndicatorTickOrCandleSource(_p, IndicatorDataParams::GetInstance(1, TYPE_DOUBLE, IDATA_BUILTIN), _indi_src){};
Indi_ADXW(IndiADXWParams &_p, ENUM_IDATA_SOURCE_TYPE _idstype = IDATA_BUILTIN, IndicatorData *_indi_src = NULL,
int _indi_src_mode = 0)
: IndicatorTickOrCandleSource(_p,
IndicatorDataParams::GetInstance(FINAL_INDI_ADX_LINE_ENTRY, TYPE_DOUBLE, _idstype,
IDATA_RANGE_RANGE, _indi_src_mode),
_indi_src){};
Indi_ADXW(ENUM_TIMEFRAMES _tf = PERIOD_CURRENT, int _shift = 0)
: IndicatorTickOrCandleSource(INDI_ADXW, _tf, _shift){};

Expand Down
9 changes: 5 additions & 4 deletions Indicators/Indi_AMA.mqh
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,11 @@ class Indi_AMA : public IndicatorTickOrCandleSource<IndiAMAParams> {
/**
* Class constructor.
*/
Indi_AMA(IndiAMAParams &_p, IndicatorData *_indi_src = NULL, int _indi_mode = 0)
: IndicatorTickOrCandleSource(_p,
IndicatorDataParams::GetInstance(1, TYPE_DOUBLE, IDATA_BUILTIN, IDATA_RANGE_PRICE),
_indi_src, _indi_mode) {
Indi_AMA(IndiAMAParams &_p, int _indi_mode = 0, ENUM_IDATA_SOURCE_TYPE _idstype = IDATA_BUILTIN,
IndicatorData *_indi_src = NULL, int _indi_src_mode = 0)
: IndicatorTickOrCandleSource(
_p, IndicatorDataParams::GetInstance(1, TYPE_DOUBLE, _idstype, IDATA_RANGE_PRICE, _indi_src_mode),
_indi_src, _indi_mode) {
iparams.SetIndicatorType(INDI_AMA);
};
Indi_AMA(ENUM_TIMEFRAMES _tf = PERIOD_CURRENT, int _shift = 0) : IndicatorTickOrCandleSource(INDI_AMA, _tf, _shift){};
Expand Down
6 changes: 4 additions & 2 deletions Indicators/Indi_AO.mqh
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,11 @@ class Indi_AO : public IndicatorTickOrCandleSource<IndiAOParams> {
/**
* Class constructor.
*/
Indi_AO(IndiAOParams &_p, IndicatorData *_indi_src = NULL)
Indi_AO(IndiAOParams &_p, ENUM_IDATA_SOURCE_TYPE _idstype = IDATA_BUILTIN, IndicatorData *_indi_src = NULL,
int _indi_src_mode = 0)
: IndicatorTickOrCandleSource(
_p, IndicatorDataParams::GetInstance(2, TYPE_DOUBLE, IDATA_BUILTIN, IDATA_RANGE_MIXED), _indi_src) {
_p, IndicatorDataParams::GetInstance(2, TYPE_DOUBLE, _idstype, IDATA_RANGE_MIXED, _indi_src_mode),
_indi_src) {
Init();
};
Indi_AO(ENUM_TIMEFRAMES _tf = PERIOD_CURRENT, int _shift = 0) : IndicatorTickOrCandleSource(INDI_AO, _tf, _shift) {
Expand Down
6 changes: 4 additions & 2 deletions Indicators/Indi_ASI.mqh
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,11 @@ class Indi_ASI : public IndicatorTickOrCandleSource<IndiASIParams> {
/**
* Class constructor.
*/
Indi_ASI(IndiASIParams &_p, IndicatorData *_indi_src = NULL)
Indi_ASI(IndiASIParams &_p, ENUM_IDATA_SOURCE_TYPE _idstype = IDATA_ONCALCULATE, IndicatorData *_indi_src = NULL,
int _indi_src_mode = 0)
: IndicatorTickOrCandleSource(
_p, IndicatorDataParams::GetInstance(1, TYPE_DOUBLE, IDATA_ONCALCULATE, IDATA_RANGE_MIXED), _indi_src) {
_p, IndicatorDataParams::GetInstance(1, TYPE_DOUBLE, _idstype, IDATA_RANGE_MIXED, _indi_src_mode),
_indi_src) {
Init();
};
Indi_ASI(ENUM_TIMEFRAMES _tf = PERIOD_CURRENT, int _shift = 0) : IndicatorTickOrCandleSource(INDI_ASI, _tf, _shift) {
Expand Down
6 changes: 4 additions & 2 deletions Indicators/Indi_ATR.mqh
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@ class Indi_ATR : public IndicatorTickOrCandleSource<IndiATRParams> {
/**
* Class constructor.
*/
Indi_ATR(IndiATRParams &_p, IndicatorData *_indi_src = NULL)
Indi_ATR(IndiATRParams &_p, ENUM_IDATA_SOURCE_TYPE _idstype = IDATA_BUILTIN, IndicatorData *_indi_src = NULL,
int _indi_src_mode = 0)
: IndicatorTickOrCandleSource(
_p, IndicatorDataParams::GetInstance(1, TYPE_DOUBLE, IDATA_BUILTIN, IDATA_RANGE_MIXED), _indi_src) {}
_p, IndicatorDataParams::GetInstance(1, TYPE_DOUBLE, _idstype, IDATA_RANGE_MIXED, _indi_src_mode),
_indi_src) {}
Indi_ATR(ENUM_TIMEFRAMES _tf = PERIOD_CURRENT, int _shift = 0) : IndicatorTickOrCandleSource(INDI_ATR, _tf, _shift){};

/**
Expand Down
8 changes: 4 additions & 4 deletions Indicators/Indi_Alligator.mqh
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,11 @@ class Indi_Alligator : public IndicatorTickOrCandleSource<IndiAlligatorParams> {
/**
* Class constructor.
*/
Indi_Alligator(IndiAlligatorParams &_p, IndicatorData *_indi_src = NULL)
Indi_Alligator(IndiAlligatorParams &_p, ENUM_IDATA_SOURCE_TYPE _idstype = IDATA_BUILTIN,
IndicatorData *_indi_src = NULL, int _indi_src_mode = 0)
: IndicatorTickOrCandleSource(
_p,
IndicatorDataParams::GetInstance(FINAL_ALLIGATOR_LINE_ENTRY, TYPE_DOUBLE, IDATA_BUILTIN, IDATA_RANGE_PRICE),
_indi_src) {}
_p, IndicatorDataParams::GetInstance(FINAL_ALLIGATOR_LINE_ENTRY, TYPE_DOUBLE, _idstype, IDATA_RANGE_PRICE),
_indi_src, _indi_src_mode) {}
Indi_Alligator(ENUM_TIMEFRAMES _tf = PERIOD_CURRENT, int _shift = 0)
: IndicatorTickOrCandleSource(INDI_ADX, _tf, _shift){};

Expand Down
6 changes: 4 additions & 2 deletions Indicators/Indi_AppliedPrice.mqh
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@ class Indi_AppliedPrice : public IndicatorTickOrCandleSource<IndiAppliedPricePar
/**
* Class constructor.
*/
Indi_AppliedPrice(IndiAppliedPriceParams &_p, IndicatorData *_indi_src = NULL)
Indi_AppliedPrice(IndiAppliedPriceParams &_p, ENUM_IDATA_SOURCE_TYPE _idstype = IDATA_INDICATOR,
IndicatorData *_indi_src = NULL, int _indi_src_mode = 0)
: IndicatorTickOrCandleSource(
_p, IndicatorDataParams::GetInstance(1, TYPE_DOUBLE, IDATA_INDICATOR, IDATA_RANGE_PRICE), _indi_src) {
_p, IndicatorDataParams::GetInstance(1, TYPE_DOUBLE, _idstype, IDATA_RANGE_PRICE, _indi_src_mode),
_indi_src) {
OnInit();
};
Indi_AppliedPrice(ENUM_TIMEFRAMES _tf = PERIOD_CURRENT, int _shift = 0)
Expand Down
11 changes: 6 additions & 5 deletions Indicators/Indi_BWMFI.mqh
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,12 @@ class Indi_BWMFI : public IndicatorTickOrCandleSource<IndiBWIndiMFIParams> {
/**
* Class constructor.
*/
Indi_BWMFI(IndiBWIndiMFIParams &_p, IndicatorData *_indi_src = NULL)
: IndicatorTickOrCandleSource(
_p,
IndicatorDataParams::GetInstance(FINAL_BWMFI_BUFFER_ENTRY, TYPE_DOUBLE, IDATA_BUILTIN, IDATA_RANGE_MIXED),
_indi_src) {
Indi_BWMFI(IndiBWIndiMFIParams &_p, ENUM_IDATA_SOURCE_TYPE _idstype = IDATA_BUILTIN, IndicatorData *_indi_src = NULL,
int _indi_src_mode = 0)
: IndicatorTickOrCandleSource(_p,
IndicatorDataParams::GetInstance(FINAL_BWMFI_BUFFER_ENTRY, TYPE_DOUBLE, _idstype,
IDATA_RANGE_MIXED, _indi_src_mode),
_indi_src) {
Init();
}
Indi_BWMFI(ENUM_TIMEFRAMES _tf = PERIOD_CURRENT, int _shift = 0)
Expand Down
11 changes: 6 additions & 5 deletions Indicators/Indi_BWZT.mqh
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,12 @@ class Indi_BWZT : public IndicatorTickOrCandleSource<IndiBWZTParams> {
/**
* Class constructor.
*/
Indi_BWZT(IndiBWZTParams &_p, IndicatorData *_indi_src = NULL)
: IndicatorTickOrCandleSource(
_p,
IndicatorDataParams::GetInstance(FINAL_INDI_BWZT_MODE_ENTRY, TYPE_DOUBLE, IDATA_BUILTIN, IDATA_RANGE_MIXED),
_indi_src) {
Indi_BWZT(IndiBWZTParams &_p, ENUM_IDATA_SOURCE_TYPE _idstype = IDATA_BUILTIN, IndicatorData *_indi_src = NULL,
int _indi_src_mode = 0)
: IndicatorTickOrCandleSource(_p,
IndicatorDataParams::GetInstance(FINAL_INDI_BWZT_MODE_ENTRY, TYPE_DOUBLE, _idstype,
IDATA_RANGE_MIXED, _indi_src_mode),
_indi_src) {
Init();
};
Indi_BWZT(ENUM_TIMEFRAMES _tf = PERIOD_CURRENT, int _shift = 0)
Expand Down
9 changes: 6 additions & 3 deletions Indicators/Indi_Bands.mqh
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,12 @@ class Indi_Bands : public IndicatorTickSource<IndiBandsParams> {
/**
* Class constructor.
*/
Indi_Bands(IndiBandsParams &_p, IndicatorData *_indi_src = NULL, int _mode = 0)
: IndicatorTickSource(_p, IndicatorDataParams::GetInstance(FINAL_BANDS_LINE_ENTRY, TYPE_DOUBLE, IDATA_BUILTIN, IDATA_RANGE_PRICE), _indi_src,
_mode) {
Indi_Bands(IndiBandsParams &_p, ENUM_IDATA_SOURCE_TYPE _idstype = IDATA_BUILTIN, IndicatorData *_indi_src = NULL,
int _indi_src_mode = 0)
: IndicatorTickSource(_p,
IndicatorDataParams::GetInstance(FINAL_BANDS_LINE_ENTRY, TYPE_DOUBLE, _idstype,
IDATA_RANGE_PRICE, _indi_src_mode),
_indi_src) {
Init();
}
Indi_Bands(ENUM_TIMEFRAMES _tf = PERIOD_CURRENT, int _shift = 0) : IndicatorTickSource(INDI_BANDS, _tf, _shift) {
Expand Down
6 changes: 4 additions & 2 deletions Indicators/Indi_BearsPower.mqh
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@ class Indi_BearsPower : public IndicatorTickOrCandleSource<IndiBearsPowerParams>
/**
* Class constructor.
*/
Indi_BearsPower(IndiBearsPowerParams &_p, IndicatorData *_indi_src = NULL)
Indi_BearsPower(IndiBearsPowerParams &_p, ENUM_IDATA_SOURCE_TYPE _idstype = IDATA_BUILTIN,
IndicatorData *_indi_src = NULL, int _indi_src_mode = 0)
: IndicatorTickOrCandleSource(
_p, IndicatorDataParams::GetInstance(1, TYPE_DOUBLE, IDATA_BUILTIN, IDATA_RANGE_MIXED), _indi_src) {}
_p, IndicatorDataParams::GetInstance(1, TYPE_DOUBLE, _idstype, IDATA_RANGE_MIXED, _indi_src_mode),
_indi_src) {}
Indi_BearsPower(ENUM_TIMEFRAMES _tf = PERIOD_CURRENT, int _shift = 0)
: IndicatorTickOrCandleSource(INDI_BEARS, _tf, _shift) {}

Expand Down
6 changes: 4 additions & 2 deletions Indicators/Indi_BullsPower.mqh
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@ class Indi_BullsPower : public IndicatorTickOrCandleSource<IndiBullsPowerParams>
/**
* Class constructor.
*/
Indi_BullsPower(IndiBullsPowerParams &_p, IndicatorData *_indi_src = NULL)
Indi_BullsPower(IndiBullsPowerParams &_p, ENUM_IDATA_SOURCE_TYPE _idstype = IDATA_BUILTIN,
IndicatorData *_indi_src = NULL, int _indi_src_mode = 0)
: IndicatorTickOrCandleSource(
_p, IndicatorDataParams::GetInstance(1, TYPE_DOUBLE, IDATA_BUILTIN, IDATA_RANGE_MIXED), _indi_src) {}
_p, IndicatorDataParams::GetInstance(1, TYPE_DOUBLE, _idstype, IDATA_RANGE_MIXED, _indi_src_mode),
_indi_src) {}
Indi_BullsPower(ENUM_TIMEFRAMES _tf = PERIOD_CURRENT, int _shift = 0)
: IndicatorTickOrCandleSource(INDI_BULLS, _tf, _shift) {}

Expand Down
8 changes: 5 additions & 3 deletions Indicators/Indi_CCI.mqh
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,11 @@ class Indi_CCI : public IndicatorTickSource<IndiCCIParams> {
/**
* Class constructor.
*/
Indi_CCI(IndiCCIParams &_p, IndicatorData *_indi_src = NULL)
: IndicatorTickSource(_p, IndicatorDataParams::GetInstance(1, TYPE_DOUBLE, IDATA_BUILTIN, IDATA_RANGE_MIXED),
_indi_src) {}
Indi_CCI(IndiCCIParams &_p, ENUM_IDATA_SOURCE_TYPE _idstype = IDATA_BUILTIN, IndicatorData *_indi_src = NULL,
int _indi_src_mode = 0)
: IndicatorTickSource(
_p, IndicatorDataParams::GetInstance(1, TYPE_DOUBLE, _idstype, IDATA_RANGE_MIXED, _indi_src_mode),
_indi_src) {}
Indi_CCI(ENUM_TIMEFRAMES _tf = PERIOD_CURRENT, int _shift = 0) : IndicatorTickSource(INDI_CCI, _tf, _shift) {}

/**
Expand Down
6 changes: 4 additions & 2 deletions Indicators/Indi_CHO.mqh
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,11 @@ class Indi_CHO : public IndicatorTickOrCandleSource<IndiCHOParams> {
/**
* Class constructor.
*/
Indi_CHO(IndiCHOParams &_p, IndicatorData *_indi_src = NULL)
Indi_CHO(IndiCHOParams &_p, ENUM_IDATA_SOURCE_TYPE _idstype = IDATA_BUILTIN, IndicatorData *_indi_src = NULL,
int _indi_src_mode = 0)
: IndicatorTickOrCandleSource(
_p, IndicatorDataParams::GetInstance(1, TYPE_DOUBLE, IDATA_BUILTIN, IDATA_RANGE_MIXED), _indi_src){};
_p, IndicatorDataParams::GetInstance(1, TYPE_DOUBLE, _idstype, IDATA_RANGE_MIXED, _indi_src_mode),
_indi_src){};
Indi_CHO(ENUM_TIMEFRAMES _tf = PERIOD_CURRENT, int _shift = 0)
: IndicatorTickOrCandleSource(INDI_CHAIKIN, _tf, _shift){};

Expand Down
6 changes: 4 additions & 2 deletions Indicators/Indi_CHV.mqh
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,11 @@ class Indi_CHV : public IndicatorTickOrCandleSource<IndiCHVParams> {
/**
* Class constructor.
*/
Indi_CHV(IndiCHVParams &_p, IndicatorData *_indi_src = NULL)
Indi_CHV(IndiCHVParams &_p, ENUM_IDATA_SOURCE_TYPE _idstype = IDATA_BUILTIN, IndicatorData *_indi_src = NULL,
int _indi_src_mode = 0)
: IndicatorTickOrCandleSource(
_p, IndicatorDataParams::GetInstance(1, TYPE_DOUBLE, IDATA_BUILTIN, IDATA_RANGE_MIXED), _indi_src){};
_p, IndicatorDataParams::GetInstance(1, TYPE_DOUBLE, _idstype, IDATA_RANGE_MIXED, _indi_src_mode),
_indi_src){};
Indi_CHV(ENUM_TIMEFRAMES _tf = PERIOD_CURRENT, int _shift = 0)
: IndicatorTickOrCandleSource(INDI_CHAIKIN_V, _tf, _shift){};

Expand Down
6 changes: 4 additions & 2 deletions Indicators/Indi_ColorBars.mqh
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ class Indi_ColorBars : public IndicatorTickOrCandleSource<IndiColorBarsParams> {
/**
* Class constructor.
*/
Indi_ColorBars(IndiColorBarsParams &_p, IndicatorData *_indi_src = NULL)
Indi_ColorBars(IndiColorBarsParams &_p, ENUM_IDATA_SOURCE_TYPE _idstype = IDATA_BUILTIN,
IndicatorData *_indi_src = NULL, int _indi_src_mode = 0)
: IndicatorTickOrCandleSource(
_p, IndicatorDataParams::GetInstance(5, TYPE_DOUBLE, IDATA_BUILTIN, IDATA_RANGE_MIXED), _indi_src){};
_p, IndicatorDataParams::GetInstance(5, TYPE_DOUBLE, _idstype, IDATA_RANGE_MIXED, _indi_src_mode),
_indi_src){};
Indi_ColorBars(ENUM_TIMEFRAMES _tf = PERIOD_CURRENT, int _shift = 0)
: IndicatorTickOrCandleSource(INDI_COLOR_BARS, _tf, _shift){};

Expand Down
6 changes: 4 additions & 2 deletions Indicators/Indi_ColorCandlesDaily.mqh
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ class Indi_ColorCandlesDaily : public IndicatorTickOrCandleSource<IndiColorCandl
/**
* Class constructor.
*/
Indi_ColorCandlesDaily(IndiColorCandlesDailyParams &_p, IndicatorData *_indi_src = NULL)
Indi_ColorCandlesDaily(IndiColorCandlesDailyParams &_p, ENUM_IDATA_SOURCE_TYPE _idstype = IDATA_BUILTIN,
IndicatorData *_indi_src = NULL, int _indi_src_mode = 0)
: IndicatorTickOrCandleSource(
_p, IndicatorDataParams::GetInstance(5, TYPE_DOUBLE, IDATA_BUILTIN, IDATA_RANGE_MIXED), _indi_src){};
_p, IndicatorDataParams::GetInstance(5, TYPE_DOUBLE, _idstype, IDATA_RANGE_MIXED, _indi_src_mode),
_indi_src){};
Indi_ColorCandlesDaily(ENUM_TIMEFRAMES _tf = PERIOD_CURRENT, int _shift = 0)
: IndicatorTickOrCandleSource(INDI_COLOR_CANDLES_DAILY, _tf, _shift){};

Expand Down
Loading

0 comments on commit b010f5d

Please sign in to comment.