last works ...

This commit is contained in:
2025-09-10 21:02:38 +03:30
parent 4d50472a0c
commit a3016b0c63
6 changed files with 515 additions and 118 deletions
+74 -35
View File
@@ -496,46 +496,46 @@ void HandleRestrictions()
}
}
//
bool SaveRestrictions(XTradeSymbolInfo &info)
{
//
bool SaveRestrictions(XTradeSymbolInfo &info)
bool result = false;
//
if (!mSaveRestrictions)
{
//
bool result = false;
//
if (!mSaveRestrictions)
{
return result;
}
//
result = info.IsValid();
if (!result)
{
return result;
}
//
string filePath = GetRestrictionsFilePath(info.symbol);
result = IsValid(filePath);
if (!result)
{
return result;
}
//
string content = info.GetRestrictionDescription(restrictionsPeriod);
//
result = collector.Append(
filePath,
content //
);
//
return result;
}
//
result = info.IsValid();
if (!result)
{
return result;
}
//
string filePath = GetRestrictionsFilePath(info.symbol);
result = IsValid(filePath);
if (!result)
{
return result;
}
//
string content = info.GetRestrictionDescription(restrictionsPeriod);
//
result = collector.Append(
filePath,
content //
);
//
return result;
}
//
// Symbol Session ...
@@ -914,6 +914,45 @@ bool Execute(XSignal &signal)
return result;
}
/**
* Check Specified Symbol is Active for
* Analysing or Open Trades ...
*/
bool IsActiveSession(string symbol)
{
//
bool result = false;
//
// Validate Args ...
result = IsValid(symbol);
if (!result)
{
return result;
}
//
// TODO: Complete this ...
// //
// // Check Symbol Session Exists or not ...
// int symbolSessionIDX = -1;
// bool isSymbolSessionExists = FindSymbolSession(
// symbolSessionIDX,
// symbol //
// );
// //
// // Chack Trade Session Validating ...
// if (isSymbolSessionExists)
// {
// result = sessions[symbolSessionIDX].CanTrade();
// }
//
return result;
}
//
string forceCloseAt;
bool isForceCloseAtTime;