last ...
This commit is contained in:
+29
-18
@@ -38,6 +38,7 @@ struct X5121ProviderDescriptor
|
||||
ENUM_TIMEFRAMES period; // Trading Timeframe
|
||||
bool allowLong; // Allow Long Signals
|
||||
bool allowShort; // Allow Short Signals
|
||||
double staticVolume; // Static Volume for Positions
|
||||
ENUM_X5_SIGNAL_PROVIDERS signallers[]; // Allowed Signal Providers
|
||||
|
||||
//
|
||||
@@ -70,7 +71,8 @@ struct X5121ProviderDescriptor
|
||||
this.period,
|
||||
this.signallers,
|
||||
this.allowLong,
|
||||
this.allowShort //
|
||||
this.allowShort,
|
||||
this.staticVolume //
|
||||
);
|
||||
|
||||
//
|
||||
@@ -81,7 +83,8 @@ struct X5121ProviderDescriptor
|
||||
bool Init(
|
||||
ENUM_X5_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
|
||||
)
|
||||
{
|
||||
//
|
||||
@@ -93,7 +96,8 @@ struct X5121ProviderDescriptor
|
||||
this.period,
|
||||
mSignallers,
|
||||
mAllowLong,
|
||||
mAllowShort //
|
||||
mAllowShort,
|
||||
mStaticVolume //
|
||||
);
|
||||
|
||||
//
|
||||
@@ -106,7 +110,8 @@ struct X5121ProviderDescriptor
|
||||
ENUM_TIMEFRAMES mPeriod, // Trading Timeframe
|
||||
ENUM_X5_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
|
||||
)
|
||||
{
|
||||
//
|
||||
@@ -118,6 +123,7 @@ struct X5121ProviderDescriptor
|
||||
x5Inputs.IsValid() &&
|
||||
IsValid(mSymbol) &&
|
||||
IsValid(mPeriod) &&
|
||||
NotEmpty(mStaticVolume) &&
|
||||
(allowLong || allowShort) &&
|
||||
ArraySize(mSignallers) > 0
|
||||
//
|
||||
@@ -132,6 +138,7 @@ struct X5121ProviderDescriptor
|
||||
this.period = mPeriod;
|
||||
this.allowLong = mAllowLong;
|
||||
this.allowShort = mAllowShort;
|
||||
this.staticVolume = mStaticVolume;
|
||||
|
||||
//
|
||||
ENUM_X5_SIGNAL_PROVIDERS tmp[];
|
||||
@@ -148,14 +155,16 @@ struct X5121ProviderDescriptor
|
||||
// Instantiate Provider ...
|
||||
x5Provider = new XSCX5Provider(
|
||||
this.symbol,
|
||||
this.period //
|
||||
this.period,
|
||||
this.staticVolume //
|
||||
);
|
||||
|
||||
//
|
||||
// Instantiate Provider ...
|
||||
x121Provider = new XSCX121Provider(
|
||||
this.symbol,
|
||||
this.period //
|
||||
this.period,
|
||||
this.staticVolume //
|
||||
);
|
||||
|
||||
//
|
||||
@@ -238,6 +247,7 @@ struct X5121ProviderDescriptor
|
||||
//
|
||||
IsValid(symbol) &&
|
||||
IsValid(period) &&
|
||||
NotEmpty(staticVolume) &&
|
||||
(validateInputs
|
||||
? x5Inputs.IsValid() && x121Inputs.IsValid()
|
||||
: true) &&
|
||||
@@ -675,6 +685,7 @@ bool InitialEA()
|
||||
//
|
||||
iDescriptor.symbol = symbols[i];
|
||||
iDescriptor.period = PERIOD_M5;
|
||||
iDescriptor.staticVolume = x5121EAVolume;
|
||||
iDescriptor.allowLong = x5121EAAllowLong;
|
||||
iDescriptor.allowShort = x5121EAAllowShort;
|
||||
Copy(
|
||||
@@ -971,33 +982,33 @@ int RequestForSignal(
|
||||
x121Conditions.mMarketConditions.isTrendBullish &&
|
||||
x121Conditions.sMarketConditions.isTrendBullish &&
|
||||
x121Conditions.cMarketConditions.isTrendBullish))
|
||||
//
|
||||
||
|
||||
//
|
||||
//
|
||||
||
|
||||
//
|
||||
(x121Conditions.lMarketConditions.isTrendSwitchedToBullish &&
|
||||
(x121Conditions.hMarketConditions.isTrendBullish &&
|
||||
x121Conditions.mMarketConditions.isTrendBullish &&
|
||||
x121Conditions.sMarketConditions.isTrendBullish &&
|
||||
x121Conditions.cMarketConditions.isTrendBullish))
|
||||
//
|
||||
||
|
||||
//
|
||||
//
|
||||
||
|
||||
//
|
||||
(x121Conditions.mMarketConditions.isTrendSwitchedToBullish &&
|
||||
(x121Conditions.hMarketConditions.isTrendBullish &&
|
||||
x121Conditions.lMarketConditions.isTrendBullish &&
|
||||
x121Conditions.sMarketConditions.isTrendBullish &&
|
||||
x121Conditions.cMarketConditions.isTrendBullish))
|
||||
//
|
||||
||
|
||||
//
|
||||
//
|
||||
||
|
||||
//
|
||||
(x121Conditions.sMarketConditions.isTrendSwitchedToBullish &&
|
||||
(x121Conditions.hMarketConditions.isTrendBullish &&
|
||||
x121Conditions.lMarketConditions.isTrendBullish &&
|
||||
x121Conditions.mMarketConditions.isTrendBullish &&
|
||||
x121Conditions.cMarketConditions.isTrendBullish))
|
||||
//
|
||||
||
|
||||
//
|
||||
//
|
||||
||
|
||||
//
|
||||
(x121Conditions.cMarketConditions.isTrendSwitchedToBullish &&
|
||||
(x121Conditions.hMarketConditions.isTrendBullish &&
|
||||
x121Conditions.lMarketConditions.isTrendBullish &&
|
||||
|
||||
Reference in New Issue
Block a user