Fix Spread Passing for Signalling and Conditions Processing ...

This commit is contained in:
2024-12-09 23:04:42 +03:30
parent 317e8b8ba3
commit 812e468151
7 changed files with 475 additions and 282 deletions
+10 -29
View File
@@ -215,6 +215,7 @@ struct XTick
double bid; // Bid ...
double ask; // Ask ...
double spread; // Spread ...
long volume; // Volume ...
//
// Constructor ...
@@ -233,13 +234,15 @@ struct XTick
* @param _time: Time ...
* @param _bid: Bid Price ...
* @param _ask: Ask Price ...
* @param _volume: Tick Volume ...
*/
bool Init(
string _symbol,
datetime _time,
double _bid,
double _ask,
double _spread //
double _spread,
long _volume //
)
{
//
@@ -293,6 +296,7 @@ struct XTick
double _bid = GetBid(_symbol);
double _ask = GetAsk(_symbol);
double _spread = GetSpread(_symbol);
long _volume = iTickVolume(_symbol, PERIOD_M1, 0);
//
result = Init(
@@ -300,39 +304,14 @@ struct XTick
_time,
_bid,
_ask,
_spread //
_spread,
_volume //
);
//
return result;
}
/**
* Init XTick for Specified Time ...
*
* @param _symbol: String, Symbol Representation ...
* @param _time: Datetime, Specified Time ...
*
* @return ( bool )
*/
bool Init(
string _symbol,
datetime _time //
)
{
//
bool result = false;
//
// TODO: Complete this ...
//
result = IsValid();
//
return result;
}
/**
* Cleanup ...
*/
@@ -341,6 +320,7 @@ struct XTick
//
bid = 0;
ask = 0;
volume = 0;
time = NULL;
symbol = NULL;
}
@@ -359,7 +339,8 @@ struct XTick
result = IsValid(symbol) &&
IsValid(time) &&
bid > 0 &&
ask > 0;
ask > 0 &&
volume >= 0;
//
return result;