last works ...

This commit is contained in:
2024-10-28 13:56:20 +03:30
parent 2284831018
commit f0d3ededea
6 changed files with 952 additions and 238 deletions
+48 -6
View File
@@ -200,6 +200,7 @@ struct XTick
datetime time; // Time ...
double bid; // Bid ...
double ask; // Ask ...
double spread; // Spread ...
//
// Constructor ...
@@ -223,7 +224,8 @@ struct XTick
string _symbol,
datetime _time,
double _bid,
double _ask //
double _ask,
double _spread //
)
{
//
@@ -234,19 +236,59 @@ struct XTick
IsValid(_time) &&
_bid > 0 &&
_ask > 0;
if (!result) {
if (!result)
{
return result;
}
//
symbol = _symbol;
time = _time;
bid = _bid;
ask = _ask;
time = _time;
symbol = _symbol;
spread = _spread;
//
result = IsValid();
//
return result;
}
/**
* Init Tick by Symbol ...
*
* @param _symbol: String ...
*
* @return ( bool )
*/
bool Init(string _symbol)
{
//
bool result = false;
//
result = IsValid(_symbol);
if (!result)
{
return result;
}
//
datetime _time = TimeCurrent();
double _bid = GetBid(_symbol);
double _ask = GetAsk(_symbol);
double _spread = GetSpread(_symbol);
//
result = Init(
_symbol,
_time,
_bid,
_ask,
_spread //
);
//
return result;
}
+21 -1
View File
@@ -612,7 +612,8 @@ struct XPosition
}
//
double GetRewardInPoint() {
double GetRewardInPoint()
{
//
double result = 0;
@@ -1618,6 +1619,25 @@ struct XSignal
return result;
}
//
string GetTag()
{
//
string result = NULL;
//
result = "XSignal_" +
symbol + "_" +
ToString(period) + "_" +
ToString(type) + "_" +
ToString(sl) + "_" +
ToString(tp) + "_" +
ToString(entry);
//
return result;
}
//
// Retrieve String Representation of Signal ...
string ToString()