Add Opposit Signal Generator Function in XSignal Structure ...

This commit is contained in:
2024-05-30 14:05:39 +03:30
parent 065700550d
commit a6b5997ee0
3 changed files with 114 additions and 59 deletions
+35 -2
View File
@@ -1467,7 +1467,8 @@ struct XOHCL
// Candlestic Tools ...
//
bool IsDoji() {
bool IsDoji()
{
//
bool result = false;
@@ -1475,7 +1476,8 @@ struct XOHCL
// Validate Content and Ignore 0 Bar
// since it is not Completed ...
result = IsValid() && Index() > 0;
if (!result) {
if (!result)
{
return result;
}
@@ -2919,6 +2921,37 @@ bool IsShort(ENUM_ORDER_TYPE type)
return result;
}
//
// Retrieve Opposit Direction Type ...
ENUM_POSITION_TYPE GetOpposit(ENUM_POSITION_TYPE type)
{
//
ENUM_POSITION_TYPE result = NULL;
//
bool isLong = IsLong(type);
result = isLong
? POSITION_TYPE_SELL
: POSITION_TYPE_BUY;
//
return result;
}
ENUM_ORDER_TYPE GetOpposit(ENUM_ORDER_TYPE type)
{
//
ENUM_ORDER_TYPE result = NULL;
//
bool isLong = IsLong(type);
result = isLong
? ORDER_TYPE_SELL
: ORDER_TYPE_BUY;
//
return result;
}
//
// Check Expert Running in Testing Mode or not ...
bool IsRunningOnTestMode()