last ...
This commit is contained in:
@@ -100,6 +100,7 @@ public:
|
||||
XCTInputs ctInputs;
|
||||
XZGInputs zgInputs;
|
||||
XPVInputs pvInputs;
|
||||
XHKInputs hkInputs;
|
||||
XMCInputs mcInputs;
|
||||
XICHInputs ichInputs;
|
||||
XCHEInputs cheInputs;
|
||||
@@ -154,6 +155,10 @@ public:
|
||||
{
|
||||
mcInputs.Default();
|
||||
}
|
||||
if (!hkInputs.IsValid())
|
||||
{
|
||||
hkInputs.Default();
|
||||
}
|
||||
if (!cheInputs.IsValid())
|
||||
{
|
||||
cheInputs.Default();
|
||||
@@ -175,28 +180,6 @@ public:
|
||||
ichInputs.Default();
|
||||
}
|
||||
|
||||
// //
|
||||
// if (!cMarketInputs.IsValid())
|
||||
// {
|
||||
// cMarketInputs.Default();
|
||||
// }
|
||||
// if (!sMarketInputs.IsValid())
|
||||
// {
|
||||
// sMarketInputs.Default();
|
||||
// }
|
||||
// if (!mMarketInputs.IsValid())
|
||||
// {
|
||||
// mMarketInputs.Default();
|
||||
// }
|
||||
// if (!lMarketInputs.IsValid())
|
||||
// {
|
||||
// lMarketInputs.Default();
|
||||
// }
|
||||
// if (!hMarketInputs.IsValid())
|
||||
// {
|
||||
// hMarketInputs.Default();
|
||||
// }
|
||||
|
||||
//
|
||||
// Initialize Market Inputs ...
|
||||
|
||||
@@ -205,6 +188,7 @@ public:
|
||||
cMarketInputs.pvInputs = this.pvInputs;
|
||||
cMarketInputs.zgInputs = this.zgInputs;
|
||||
cMarketInputs.mcInputs = this.mcInputs;
|
||||
cMarketInputs.hkInputs = this.hkInputs;
|
||||
cMarketInputs.strInputs = this.strInputs;
|
||||
cMarketInputs.oscInputs = this.oscInputs;
|
||||
cMarketInputs.cheInputs = this.cheInputs;
|
||||
@@ -229,6 +213,7 @@ public:
|
||||
sMarketInputs.pvInputs = this.pvInputs;
|
||||
sMarketInputs.zgInputs = this.zgInputs;
|
||||
sMarketInputs.mcInputs = this.mcInputs;
|
||||
sMarketInputs.hkInputs = this.hkInputs;
|
||||
sMarketInputs.strInputs = this.strInputs;
|
||||
sMarketInputs.oscInputs = this.oscInputs;
|
||||
sMarketInputs.cheInputs = this.cheInputs;
|
||||
@@ -253,6 +238,7 @@ public:
|
||||
mMarketInputs.pvInputs = this.pvInputs;
|
||||
mMarketInputs.zgInputs = this.zgInputs;
|
||||
mMarketInputs.mcInputs = this.mcInputs;
|
||||
mMarketInputs.hkInputs = this.hkInputs;
|
||||
mMarketInputs.strInputs = this.strInputs;
|
||||
mMarketInputs.oscInputs = this.oscInputs;
|
||||
mMarketInputs.cheInputs = this.cheInputs;
|
||||
@@ -277,6 +263,7 @@ public:
|
||||
lMarketInputs.pvInputs = this.pvInputs;
|
||||
lMarketInputs.zgInputs = this.zgInputs;
|
||||
lMarketInputs.mcInputs = this.mcInputs;
|
||||
lMarketInputs.hkInputs = this.hkInputs;
|
||||
lMarketInputs.strInputs = this.strInputs;
|
||||
lMarketInputs.oscInputs = this.oscInputs;
|
||||
lMarketInputs.cheInputs = this.cheInputs;
|
||||
@@ -301,6 +288,7 @@ public:
|
||||
hMarketInputs.pvInputs = this.pvInputs;
|
||||
hMarketInputs.zgInputs = this.zgInputs;
|
||||
hMarketInputs.mcInputs = this.mcInputs;
|
||||
hMarketInputs.hkInputs = this.hkInputs;
|
||||
hMarketInputs.strInputs = this.strInputs;
|
||||
hMarketInputs.oscInputs = this.oscInputs;
|
||||
hMarketInputs.cheInputs = this.cheInputs;
|
||||
@@ -350,6 +338,7 @@ public:
|
||||
zgInputs.IsValid() &&
|
||||
pvInputs.IsValid() &&
|
||||
mcInputs.IsValid() &&
|
||||
hkInputs.IsValid() &&
|
||||
cheInputs.IsValid() &&
|
||||
strInputs.IsValid() &&
|
||||
donInputs.IsValid() &&
|
||||
@@ -402,6 +391,7 @@ public:
|
||||
zgInputs.Clean();
|
||||
pvInputs.Clean();
|
||||
mcInputs.Clean();
|
||||
hkInputs.Clean();
|
||||
cheInputs.Clean();
|
||||
strInputs.Clean();
|
||||
donInputs.Clean();
|
||||
@@ -449,6 +439,7 @@ public:
|
||||
zgInputs.Default();
|
||||
pvInputs.Default();
|
||||
mcInputs.Default();
|
||||
hkInputs.Default();
|
||||
cheInputs.Default();
|
||||
strInputs.Default();
|
||||
donInputs.Default();
|
||||
@@ -791,9 +782,11 @@ public:
|
||||
//
|
||||
// Constructor ...
|
||||
XSCX121Provider(
|
||||
string symbol, // Trading Symbol
|
||||
ENUM_TIMEFRAMES period // Trading PEriod
|
||||
) : XSCBaseProvider(symbol, period)
|
||||
string symbol, // Trading Symbol
|
||||
ENUM_TIMEFRAMES period, // Trading Period
|
||||
double staticVolume // Static Volume for Positions
|
||||
|
||||
) : XSCBaseProvider(symbol, period, staticVolume)
|
||||
{
|
||||
//
|
||||
ccHelper = new XSCXCCHelper();
|
||||
@@ -1441,25 +1434,6 @@ public:
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Generate EQM Support Signals ...
|
||||
int GenerateEQMSupportSignals(XSignal &supports[])
|
||||
{
|
||||
//
|
||||
int result = 0;
|
||||
|
||||
//
|
||||
Clean(supports);
|
||||
|
||||
//
|
||||
// TODO: Implement Support Mechanism ...
|
||||
// we are in EQUITY STATE ...
|
||||
// so we have to
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Tools ...
|
||||
|
||||
@@ -2715,6 +2689,25 @@ protected:
|
||||
AddSRValue(selectedHCLL);
|
||||
}
|
||||
|
||||
//
|
||||
// Add Candelstick Pivots ...
|
||||
|
||||
//
|
||||
// XOHCL sPBar = sMarket.GetBar(barIndex + 1);
|
||||
// AddSRValue(sPBar);
|
||||
|
||||
//
|
||||
XOHCL mPBar = mMarket.GetBar(barIndex + 1);
|
||||
AddSRValue(mPBar);
|
||||
|
||||
//
|
||||
XOHCL lPBar = lMarket.GetBar(barIndex + 1);
|
||||
AddSRValue(lPBar);
|
||||
|
||||
//
|
||||
XOHCL hPBar = hMarket.GetBar(barIndex + 1);
|
||||
AddSRValue(hPBar);
|
||||
|
||||
//
|
||||
int after = CountSupportResistances();
|
||||
|
||||
@@ -2722,7 +2715,7 @@ protected:
|
||||
if (after > before)
|
||||
{
|
||||
//
|
||||
string message = "Found: " + ToString(after - before) + " new Pivot ...";
|
||||
string message = "Found: " + ToString(after - before) + " new Pivot for " + GetSymbol() + " ...";
|
||||
Print(message);
|
||||
}
|
||||
}
|
||||
@@ -2780,6 +2773,22 @@ protected:
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
void AddSRValue(XOHCL &bar)
|
||||
{
|
||||
//
|
||||
if (!bar.IsValid())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
AddSRValue(bar.open);
|
||||
AddSRValue(bar.high);
|
||||
AddSRValue(bar.close);
|
||||
AddSRValue(bar.low);
|
||||
}
|
||||
|
||||
//
|
||||
// Private ...
|
||||
private:
|
||||
@@ -4017,7 +4026,7 @@ private:
|
||||
}
|
||||
|
||||
//
|
||||
// Use Scores ...
|
||||
// Use XHK ...
|
||||
bool X92HasSpecifiedLongSignal(
|
||||
X121MarketConditions &mConditions, //
|
||||
double &sl, // Provided SL ...
|
||||
@@ -4028,6 +4037,183 @@ private:
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
int curr = 0;
|
||||
int prev = 1;
|
||||
|
||||
//
|
||||
bool isCSMHKSwitchedToBullish =
|
||||
//
|
||||
mConditions.cMarketConditions.smHKBars[curr].IsBullish() &&
|
||||
!mConditions.cMarketConditions.smHKBars[prev].IsBullish()
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isCSMHKBullish =
|
||||
//
|
||||
mConditions.cMarketConditions.smHKBars[curr].IsBullish() &&
|
||||
mConditions.cMarketConditions.smHKBars[prev].IsBullish() &&
|
||||
!mConditions.bars[curr].open > mConditions.cMarketConditions.smHKBars[curr].GetUp() &&
|
||||
!mConditions.bars[prev].close > mConditions.cMarketConditions.smHKBars[prev].GetUp()
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isSSMHKSwitchedToBullish =
|
||||
//
|
||||
mConditions.sMarketConditions.smHKBars[curr].IsBullish() &&
|
||||
!mConditions.sMarketConditions.smHKBars[prev].IsBullish()
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isSSMHKBullish =
|
||||
//
|
||||
mConditions.sMarketConditions.smHKBars[curr].IsBullish() &&
|
||||
mConditions.sMarketConditions.smHKBars[prev].IsBullish() &&
|
||||
!mConditions.bars[curr].open > mConditions.sMarketConditions.smHKBars[curr].GetUp() &&
|
||||
!mConditions.bars[prev].close > mConditions.sMarketConditions.smHKBars[prev].GetUp()
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isMSMHKSwitchedToBullish =
|
||||
//
|
||||
mConditions.mMarketConditions.smHKBars[curr].IsBullish() &&
|
||||
!mConditions.mMarketConditions.smHKBars[prev].IsBullish()
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isMSMHKBullish =
|
||||
//
|
||||
mConditions.mMarketConditions.smHKBars[curr].IsBullish() &&
|
||||
mConditions.mMarketConditions.smHKBars[prev].IsBullish() &&
|
||||
!mConditions.bars[curr].open > mConditions.mMarketConditions.smHKBars[curr].GetUp() &&
|
||||
!mConditions.bars[prev].close > mConditions.mMarketConditions.smHKBars[prev].GetUp()
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isLSMHKSwitchedToBullish =
|
||||
//
|
||||
mConditions.lMarketConditions.smHKBars[curr].IsBullish() &&
|
||||
!mConditions.lMarketConditions.smHKBars[prev].IsBullish()
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isLSMHKBullish =
|
||||
//
|
||||
mConditions.lMarketConditions.smHKBars[curr].IsBullish() &&
|
||||
mConditions.lMarketConditions.smHKBars[prev].IsBullish() &&
|
||||
!mConditions.bars[curr].open > mConditions.lMarketConditions.smHKBars[curr].GetUp() &&
|
||||
!mConditions.bars[prev].close > mConditions.lMarketConditions.smHKBars[prev].GetUp()
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isHSMHKSwitchedToBullish =
|
||||
//
|
||||
mConditions.hMarketConditions.smHKBars[curr].IsBullish() &&
|
||||
!mConditions.hMarketConditions.smHKBars[prev].IsBullish()
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isHSMHKBullish =
|
||||
//
|
||||
mConditions.hMarketConditions.smHKBars[curr].IsBullish() &&
|
||||
mConditions.hMarketConditions.smHKBars[prev].IsBullish() &&
|
||||
!mConditions.bars[curr].open > mConditions.hMarketConditions.smHKBars[curr].GetUp() &&
|
||||
!mConditions.bars[prev].close > mConditions.hMarketConditions.smHKBars[prev].GetUp()
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isCSMHKLong =
|
||||
//
|
||||
(isCSMHKBullish ||
|
||||
isCSMHKSwitchedToBullish) &&
|
||||
isSSMHKBullish &&
|
||||
isMSMHKBullish &&
|
||||
isLSMHKBullish &&
|
||||
isHSMHKBullish
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isSSMHKLong =
|
||||
//
|
||||
(isSSMHKBullish ||
|
||||
isSSMHKSwitchedToBullish) &&
|
||||
isCSMHKBullish &&
|
||||
isMSMHKBullish &&
|
||||
isLSMHKBullish &&
|
||||
isHSMHKBullish
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isMSMHKLong =
|
||||
//
|
||||
(isMSMHKBullish ||
|
||||
isMSMHKSwitchedToBullish) &&
|
||||
isSSMHKBullish &&
|
||||
isCSMHKBullish &&
|
||||
isLSMHKBullish &&
|
||||
isHSMHKBullish
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isLSMHKLong =
|
||||
//
|
||||
(isLSMHKBullish ||
|
||||
isLSMHKSwitchedToBullish) &&
|
||||
isSSMHKBullish &&
|
||||
isCSMHKBullish &&
|
||||
isMSMHKBullish &&
|
||||
isHSMHKBullish
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isHSMHKLong =
|
||||
//
|
||||
(isHSMHKBullish ||
|
||||
isHSMHKSwitchedToBullish) &&
|
||||
isSSMHKBullish &&
|
||||
isCSMHKBullish &&
|
||||
isMSMHKBullish &&
|
||||
isLSMHKBullish
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
result =
|
||||
//
|
||||
isCSMHKLong
|
||||
//
|
||||
||
|
||||
//
|
||||
isSSMHKLong
|
||||
//
|
||||
||
|
||||
//
|
||||
isMSMHKLong
|
||||
//
|
||||
||
|
||||
//
|
||||
isLSMHKLong
|
||||
//
|
||||
||
|
||||
//
|
||||
isHSMHKLong
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
@@ -4456,7 +4642,7 @@ private:
|
||||
}
|
||||
|
||||
//
|
||||
// Use Scores ...
|
||||
// Use XHK ...
|
||||
bool X92HasSpecifiedShortSignal(
|
||||
X121MarketConditions &mConditions, //
|
||||
double &sl, // Provided SL ...
|
||||
@@ -4467,6 +4653,183 @@ private:
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
int curr = 0;
|
||||
int prev = 1;
|
||||
|
||||
//
|
||||
bool isCSMHKSwitchedToBearish =
|
||||
//
|
||||
mConditions.cMarketConditions.smHKBars[curr].IsBearish() &&
|
||||
!mConditions.cMarketConditions.smHKBars[prev].IsBearish()
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isCSMHKBearish =
|
||||
//
|
||||
mConditions.cMarketConditions.smHKBars[curr].IsBearish() &&
|
||||
mConditions.cMarketConditions.smHKBars[prev].IsBearish() &&
|
||||
!mConditions.bars[curr].open < mConditions.cMarketConditions.smHKBars[curr].GetDown() &&
|
||||
!mConditions.bars[prev].close < mConditions.cMarketConditions.smHKBars[prev].GetDown()
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isSSMHKSwitchedToBearish =
|
||||
//
|
||||
mConditions.sMarketConditions.smHKBars[curr].IsBearish() &&
|
||||
!mConditions.sMarketConditions.smHKBars[prev].IsBearish()
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isSSMHKBearish =
|
||||
//
|
||||
mConditions.sMarketConditions.smHKBars[curr].IsBearish() &&
|
||||
mConditions.sMarketConditions.smHKBars[prev].IsBearish() &&
|
||||
!mConditions.bars[curr].open < mConditions.sMarketConditions.smHKBars[curr].GetDown() &&
|
||||
!mConditions.bars[prev].close < mConditions.sMarketConditions.smHKBars[prev].GetDown()
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isMSMHKSwitchedToBearish =
|
||||
//
|
||||
mConditions.mMarketConditions.smHKBars[curr].IsBearish() &&
|
||||
!mConditions.mMarketConditions.smHKBars[prev].IsBearish()
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isMSMHKBearish =
|
||||
//
|
||||
mConditions.mMarketConditions.smHKBars[curr].IsBearish() &&
|
||||
mConditions.mMarketConditions.smHKBars[prev].IsBearish() &&
|
||||
!mConditions.bars[curr].open < mConditions.mMarketConditions.smHKBars[curr].GetDown() &&
|
||||
!mConditions.bars[prev].close < mConditions.mMarketConditions.smHKBars[prev].GetDown()
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isLSMHKSwitchedToBearish =
|
||||
//
|
||||
mConditions.lMarketConditions.smHKBars[curr].IsBearish() &&
|
||||
!mConditions.lMarketConditions.smHKBars[prev].IsBearish()
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isLSMHKBearish =
|
||||
//
|
||||
mConditions.lMarketConditions.smHKBars[curr].IsBearish() &&
|
||||
mConditions.lMarketConditions.smHKBars[prev].IsBearish() &&
|
||||
!mConditions.bars[curr].open < mConditions.lMarketConditions.smHKBars[curr].GetDown() &&
|
||||
!mConditions.bars[prev].close < mConditions.lMarketConditions.smHKBars[prev].GetDown()
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isHSMHKSwitchedToBearish =
|
||||
//
|
||||
mConditions.hMarketConditions.smHKBars[curr].IsBearish() &&
|
||||
!mConditions.hMarketConditions.smHKBars[prev].IsBearish()
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isHSMHKBearish =
|
||||
//
|
||||
mConditions.hMarketConditions.smHKBars[curr].IsBearish() &&
|
||||
mConditions.hMarketConditions.smHKBars[prev].IsBearish() &&
|
||||
!mConditions.bars[curr].open < mConditions.hMarketConditions.smHKBars[curr].GetDown() &&
|
||||
!mConditions.bars[prev].close < mConditions.hMarketConditions.smHKBars[prev].GetDown()
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isCSMHKShort =
|
||||
//
|
||||
(isCSMHKBearish ||
|
||||
isCSMHKSwitchedToBearish) &&
|
||||
isSSMHKBearish &&
|
||||
isMSMHKBearish &&
|
||||
isLSMHKBearish &&
|
||||
isHSMHKBearish
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isSSMHKShort =
|
||||
//
|
||||
(isSSMHKBearish ||
|
||||
isSSMHKSwitchedToBearish) &&
|
||||
isCSMHKBearish &&
|
||||
isMSMHKBearish &&
|
||||
isLSMHKBearish &&
|
||||
isHSMHKBearish
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isMSMHKShort =
|
||||
//
|
||||
(isMSMHKBearish ||
|
||||
isMSMHKSwitchedToBearish) &&
|
||||
isSSMHKBearish &&
|
||||
isCSMHKBearish &&
|
||||
isLSMHKBearish &&
|
||||
isHSMHKBearish
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isLSMHKShort =
|
||||
//
|
||||
(isLSMHKBearish ||
|
||||
isLSMHKSwitchedToBearish) &&
|
||||
isSSMHKBearish &&
|
||||
isCSMHKBearish &&
|
||||
isMSMHKBearish &&
|
||||
isHSMHKBearish
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
bool isHSMHKShort =
|
||||
//
|
||||
(isHSMHKBearish ||
|
||||
isHSMHKSwitchedToBearish) &&
|
||||
isSSMHKBearish &&
|
||||
isCSMHKBearish &&
|
||||
isMSMHKBearish &&
|
||||
isLSMHKBearish
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
result =
|
||||
//
|
||||
isCSMHKShort
|
||||
//
|
||||
||
|
||||
//
|
||||
isSSMHKShort
|
||||
//
|
||||
||
|
||||
//
|
||||
isMSMHKShort
|
||||
//
|
||||
||
|
||||
//
|
||||
isLSMHKShort
|
||||
//
|
||||
||
|
||||
//
|
||||
isHSMHKShort
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
@@ -4500,6 +4863,7 @@ struct X121ProviderDescriptor
|
||||
//
|
||||
string symbol; // Trading Symbol
|
||||
ENUM_TIMEFRAMES period; // Trading Timeframe
|
||||
double staticVolume; // Static Volume for Positions
|
||||
bool allowLong; // Allow Long Signals
|
||||
bool allowShort; // Allow Short Signals
|
||||
ENUM_X121_SIGNAL_PROVIDERS signallers[]; // Allowed Signal Providers
|
||||
@@ -4527,7 +4891,8 @@ struct X121ProviderDescriptor
|
||||
this.period,
|
||||
this.signallers,
|
||||
this.allowLong,
|
||||
this.allowShort //
|
||||
this.allowShort,
|
||||
this.staticVolume //
|
||||
);
|
||||
|
||||
//
|
||||
@@ -4538,7 +4903,8 @@ struct X121ProviderDescriptor
|
||||
bool Init(
|
||||
ENUM_X121_SIGNAL_PROVIDERS &mSignallers[], // Allowed Signal Providers
|
||||
bool mAllowLong = true, // Allow Long Signals
|
||||
bool mAllowShort = true // Allow Short Signals
|
||||
bool mAllowShort = true, // Allow Short Signals
|
||||
double mStaticVolume = 0.01 // Static Volume for Positions
|
||||
)
|
||||
{
|
||||
//
|
||||
@@ -4550,7 +4916,8 @@ struct X121ProviderDescriptor
|
||||
this.period,
|
||||
mSignallers,
|
||||
mAllowLong,
|
||||
mAllowShort //
|
||||
mAllowShort,
|
||||
mStaticVolume //
|
||||
);
|
||||
|
||||
//
|
||||
@@ -4563,7 +4930,8 @@ struct X121ProviderDescriptor
|
||||
ENUM_TIMEFRAMES mPeriod, // Trading Timeframe
|
||||
ENUM_X121_SIGNAL_PROVIDERS &mSignallers[], // Allowed Signal Providers
|
||||
bool mAllowLong = true, // Allow Long Signals
|
||||
bool mAllowShort = true // Allow Short Signals
|
||||
bool mAllowShort = true, // Allow Short Signals
|
||||
double mStaticVolume = 0.01 // Static Volume for Positions
|
||||
)
|
||||
{
|
||||
//
|
||||
@@ -4575,6 +4943,7 @@ struct X121ProviderDescriptor
|
||||
inputs.IsValid() &&
|
||||
IsValid(mSymbol) &&
|
||||
IsValid(mPeriod) &&
|
||||
NotEmpty(mStaticVolume) &&
|
||||
(allowLong || allowShort) &&
|
||||
ArraySize(mSignallers) > 0
|
||||
//
|
||||
@@ -4589,6 +4958,7 @@ struct X121ProviderDescriptor
|
||||
this.period = mPeriod;
|
||||
this.allowLong = mAllowLong;
|
||||
this.allowShort = mAllowShort;
|
||||
this.staticVolume = mStaticVolume;
|
||||
|
||||
//
|
||||
ENUM_X121_SIGNAL_PROVIDERS tmp[];
|
||||
@@ -4605,7 +4975,8 @@ struct X121ProviderDescriptor
|
||||
// Instantiate Provider ...
|
||||
provider = new XSCX121Provider(
|
||||
this.symbol,
|
||||
this.period //
|
||||
this.period,
|
||||
this.staticVolume //
|
||||
);
|
||||
|
||||
//
|
||||
@@ -4664,6 +5035,7 @@ struct X121ProviderDescriptor
|
||||
//
|
||||
IsValid(symbol) &&
|
||||
IsValid(period) &&
|
||||
NotEmpty(staticVolume) &&
|
||||
(validateInputs
|
||||
? inputs.IsValid()
|
||||
: true) &&
|
||||
|
||||
Reference in New Issue
Block a user