last works ...
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user