last ...
This commit is contained in:
@@ -294,7 +294,7 @@ class XCAlert : public XCBase
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
Print(GetPrefix(), " > ", message);
|
Print(message);
|
||||||
}
|
}
|
||||||
void Log(string tag, string message)
|
void Log(string tag, string message)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -59,16 +59,7 @@ class XCDataCollector : public XCBase
|
|||||||
//
|
//
|
||||||
void Path(string value)
|
void Path(string value)
|
||||||
{
|
{
|
||||||
//
|
mPath = value;
|
||||||
// Normalizing Collector Path ...
|
|
||||||
if (IsValid(value))
|
|
||||||
{
|
|
||||||
mPath = value;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
mPath = "XDataCollector";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -83,7 +74,7 @@ class XCDataCollector : public XCBase
|
|||||||
//
|
//
|
||||||
result =
|
result =
|
||||||
//
|
//
|
||||||
mPath + "\\" + fileName + ".x121.log"
|
(IsValid(mPath) ? mPath + "\\" : "") + fileName + ".x121.log"
|
||||||
//
|
//
|
||||||
;
|
;
|
||||||
|
|
||||||
@@ -128,7 +119,7 @@ class XCDataCollector : public XCBase
|
|||||||
//
|
//
|
||||||
result = FileOpen(
|
result = FileOpen(
|
||||||
filePath,
|
filePath,
|
||||||
FILE_READ | FILE_TXT //
|
FILE_READ | FILE_TXT | FILE_ANSI //
|
||||||
);
|
);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1407,3 +1407,27 @@
|
|||||||
|
|
||||||
///////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
bool IsBoolean(T value)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
bool result = false;
|
||||||
|
|
||||||
|
//
|
||||||
|
string normalizedValue = ToString(value);
|
||||||
|
StringToLower(normalizedValue);
|
||||||
|
normalizedValue = Trim(normalizedValue);
|
||||||
|
|
||||||
|
//
|
||||||
|
result =
|
||||||
|
!IsValid(normalizedValue)
|
||||||
|
? false
|
||||||
|
: (normalizedValue == "true" ||
|
||||||
|
normalizedValue == "false");
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
X121XCATBEA\X121XCATBEA_XAUUSDb_M5.x121.log
|
||||||
Binary file not shown.
@@ -1857,28 +1857,6 @@ string Trim(string value)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
bool IsBoolean(T value)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
bool result = false;
|
|
||||||
|
|
||||||
//
|
|
||||||
string normalizedValue = ToString(value);
|
|
||||||
StringToLower(normalizedValue);
|
|
||||||
normalizedValue = Trim(normalizedValue);
|
|
||||||
|
|
||||||
//
|
|
||||||
result =
|
|
||||||
!IsValid(normalizedValue)
|
|
||||||
? false
|
|
||||||
: (normalizedValue == "true" ||
|
|
||||||
normalizedValue == "false");
|
|
||||||
|
|
||||||
//
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Used In Report or Summary Generators ...
|
// Used In Report or Summary Generators ...
|
||||||
string ToString(
|
string ToString(
|
||||||
@@ -1894,7 +1872,7 @@ string ToString(
|
|||||||
|
|
||||||
//
|
//
|
||||||
bool canSet =
|
bool canSet =
|
||||||
IsBoolean(value)
|
IsBoolean(ToString(value))
|
||||||
? (bool)value || !ignoreFalseConditions
|
? (bool)value || !ignoreFalseConditions
|
||||||
: true;
|
: true;
|
||||||
|
|
||||||
@@ -2023,6 +2001,35 @@ string ToString(
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check a String Value is Boolean or Not ...
|
||||||
|
*
|
||||||
|
* @param value: string representation of value ...
|
||||||
|
*
|
||||||
|
* @return ( bool )
|
||||||
|
*/
|
||||||
|
bool IsBoolean(string value)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
bool result = false;
|
||||||
|
|
||||||
|
//
|
||||||
|
string istring = value;
|
||||||
|
string normalizedValue = ToString(istring);
|
||||||
|
StringToLower(normalizedValue);
|
||||||
|
normalizedValue = Trim(normalizedValue);
|
||||||
|
|
||||||
|
//
|
||||||
|
result =
|
||||||
|
!IsValid(normalizedValue)
|
||||||
|
? false
|
||||||
|
: (normalizedValue == "true" ||
|
||||||
|
normalizedValue == "false");
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts String to boolean ...
|
* Converts String to boolean ...
|
||||||
*
|
*
|
||||||
@@ -2036,14 +2043,24 @@ bool ToBoolean(string value)
|
|||||||
bool result = false;
|
bool result = false;
|
||||||
|
|
||||||
//
|
//
|
||||||
if (StringLen(value) <= 0)
|
if (!IsBoolean(value) ||
|
||||||
|
StringLen(value) <= 0)
|
||||||
{
|
{
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
value = Trim(value);
|
||||||
StringToLower(value);
|
StringToLower(value);
|
||||||
result = value == "true";
|
|
||||||
|
//
|
||||||
|
bool isTrue = value == "true";
|
||||||
|
bool isFalse = value == "false";
|
||||||
|
|
||||||
|
//
|
||||||
|
result = isTrue
|
||||||
|
? true
|
||||||
|
: false;
|
||||||
|
|
||||||
//
|
//
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1647,10 +1647,13 @@ class XCXCATBEATradeManager : public XCBase
|
|||||||
|
|
||||||
//
|
//
|
||||||
collector = new XCDataCollector();
|
collector = new XCDataCollector();
|
||||||
|
|
||||||
//
|
//
|
||||||
// Setting Collector Path ...
|
// Setting Collector Path ...
|
||||||
string mPath = alert.GetPrefix() + "\\" + trader.mAccount.GetCompany();
|
string mPath = (IsValid(alert.GetPrefix())
|
||||||
|
? alert.GetPrefix() + "\\"
|
||||||
|
: "") +
|
||||||
|
trader.mAccount.GetCompany();
|
||||||
collector.Path(mPath);
|
collector.Path(mPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3066,14 +3069,8 @@ class XCXCATBEATradeManager : public XCBase
|
|||||||
string result = NULL;
|
string result = NULL;
|
||||||
|
|
||||||
//
|
//
|
||||||
string mPath = collector.Path();
|
result = collector
|
||||||
|
.GetFilePath("Trades" + "\\" + fileName);
|
||||||
//
|
|
||||||
result =
|
|
||||||
//
|
|
||||||
mPath + "\\" + "Trades" + "\\" + fileName + ".x121.log"
|
|
||||||
//
|
|
||||||
;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
return result;
|
return result;
|
||||||
@@ -3086,14 +3083,8 @@ class XCXCATBEATradeManager : public XCBase
|
|||||||
string result = NULL;
|
string result = NULL;
|
||||||
|
|
||||||
//
|
//
|
||||||
string mPath = collector.Path();
|
result = collector
|
||||||
|
.GetFilePath("Signals" + "\\" + fileName);
|
||||||
//
|
|
||||||
result =
|
|
||||||
//
|
|
||||||
mPath + "\\" + "Signals" + "\\" + fileName + ".x121.log"
|
|
||||||
//
|
|
||||||
;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
return result;
|
return result;
|
||||||
@@ -3106,17 +3097,10 @@ class XCXCATBEATradeManager : public XCBase
|
|||||||
string result = NULL;
|
string result = NULL;
|
||||||
|
|
||||||
//
|
//
|
||||||
string mPath = collector.Path();
|
result = collector
|
||||||
|
.GetFilePath("Conditions" + "\\" +
|
||||||
//
|
trade.signal.symbol + "\\" +
|
||||||
result =
|
ToString(trade.signal.period) + "_wins");
|
||||||
//
|
|
||||||
mPath + "\\" +
|
|
||||||
"Conditions" + "\\" +
|
|
||||||
trade.signal.symbol + "\\" +
|
|
||||||
ToString(trade.signal.period) + "_wins.x121.log"
|
|
||||||
//
|
|
||||||
;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
return result;
|
return result;
|
||||||
@@ -3129,17 +3113,10 @@ class XCXCATBEATradeManager : public XCBase
|
|||||||
string result = NULL;
|
string result = NULL;
|
||||||
|
|
||||||
//
|
//
|
||||||
string mPath = collector.Path();
|
result = collector
|
||||||
|
.GetFilePath("Conditions" + "\\" +
|
||||||
//
|
trade.signal.symbol + "\\" +
|
||||||
result =
|
ToString(trade.signal.period) + "_losts");
|
||||||
//
|
|
||||||
mPath + "\\" +
|
|
||||||
"Conditions" + "\\" +
|
|
||||||
trade.signal.symbol + "\\" +
|
|
||||||
ToString(trade.signal.period) + "_losts.x121.log"
|
|
||||||
//
|
|
||||||
;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
return result;
|
return result;
|
||||||
@@ -3158,16 +3135,8 @@ class XCXCATBEATradeManager : public XCBase
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
string mPath = collector.Path();
|
result = collector
|
||||||
|
.GetFilePath("Restrictions" + "\\" + symbol);
|
||||||
//
|
|
||||||
result =
|
|
||||||
//
|
|
||||||
mPath + "\\" +
|
|
||||||
"Restrictions" + "\\" +
|
|
||||||
symbol + ".x121.log"
|
|
||||||
//
|
|
||||||
;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
Reference in New Issue
Block a user