Merge branch 'master' of https://git.saherelmhub.ir/saherelm/MQL5Data
This commit is contained in:
@@ -86,9 +86,7 @@ class XCAlert : public XCBase
|
||||
return GetSpecificToken(this);
|
||||
}
|
||||
|
||||
//
|
||||
// Properties Getter(s) / Setter(s) ...
|
||||
|
||||
// #region Properties Getter(s) / Setter(s) ...
|
||||
//
|
||||
string GetPrefix()
|
||||
{
|
||||
@@ -174,16 +172,16 @@ class XCAlert : public XCBase
|
||||
{
|
||||
mTerminalAlerts = value;
|
||||
}
|
||||
// #endregion
|
||||
|
||||
//
|
||||
// Tools Funtions ...
|
||||
// #region Tools Funtions ...
|
||||
|
||||
//
|
||||
// Alerts ...
|
||||
|
||||
//
|
||||
// Logging an Alert ...
|
||||
void LogAlert(string message)
|
||||
void LogAlert(string message, bool save = true)
|
||||
{
|
||||
//
|
||||
// Validate Args ...
|
||||
@@ -194,15 +192,20 @@ class XCAlert : public XCBase
|
||||
|
||||
//
|
||||
message = PrepareMessage(message);
|
||||
|
||||
|
||||
//
|
||||
Log(message);
|
||||
Save(message);
|
||||
|
||||
//
|
||||
if (save)
|
||||
{
|
||||
Save(message);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Terminal Alert ...
|
||||
void TerminalAlert(string message)
|
||||
void TerminalAlert(string message, bool save = true)
|
||||
{
|
||||
//
|
||||
// Validate Args ...
|
||||
@@ -217,12 +220,17 @@ class XCAlert : public XCBase
|
||||
|
||||
// Send Terminal Alert ...
|
||||
Alert(message);
|
||||
Save(message);
|
||||
|
||||
//
|
||||
if (save)
|
||||
{
|
||||
Save(message);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Mail Alert ...
|
||||
void MailAlert(string message)
|
||||
void MailAlert(string message, bool save = true)
|
||||
{
|
||||
//
|
||||
// Validate Args ...
|
||||
@@ -234,12 +242,17 @@ class XCAlert : public XCBase
|
||||
//
|
||||
// Send Mail Alert ...
|
||||
SendMail(GetPrefix(), message);
|
||||
Save(message);
|
||||
|
||||
//
|
||||
if (save)
|
||||
{
|
||||
Save(message);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Send Push Notification ...
|
||||
void PushAlert(string message)
|
||||
void PushAlert(string message, bool save = true)
|
||||
{
|
||||
//
|
||||
// Validate Args ...
|
||||
@@ -255,7 +268,12 @@ class XCAlert : public XCBase
|
||||
//
|
||||
// Send Push Notification Alert ...
|
||||
SendNotification(message);
|
||||
Save(message);
|
||||
|
||||
//
|
||||
if (save)
|
||||
{
|
||||
Save(message);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
@@ -265,19 +283,25 @@ class XCAlert : public XCBase
|
||||
{
|
||||
//
|
||||
// Handle Log, if Enabled ...
|
||||
LogAlert(message);
|
||||
LogAlert(message, false);
|
||||
|
||||
//
|
||||
// Handle Mail if Enabled ...
|
||||
MailAlert(message);
|
||||
MailAlert(message, false);
|
||||
|
||||
//
|
||||
// Handle Push if Enabled ...
|
||||
PushAlert(message);
|
||||
PushAlert(message, false);
|
||||
|
||||
//
|
||||
// Handle Terminal if Enabled ...
|
||||
TerminalAlert(message);
|
||||
TerminalAlert(message, false);
|
||||
|
||||
//
|
||||
if (GetEnableAlerts())
|
||||
{
|
||||
Save(message);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
@@ -1314,6 +1338,7 @@ class XCAlert : public XCBase
|
||||
//
|
||||
return result;
|
||||
}
|
||||
// #endregion
|
||||
|
||||
//
|
||||
// Protected ...
|
||||
@@ -1380,7 +1405,8 @@ class XCAlert : public XCBase
|
||||
}
|
||||
|
||||
//
|
||||
string filePath = collector.GetFilePath("XLogs");
|
||||
string fileName = mPrefix + "." + "XLogs";
|
||||
string filePath = collector.GetFilePath(fileName);
|
||||
if (!IsValid(filePath))
|
||||
{
|
||||
return;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
// -------------------------------------------------
|
||||
// Name: XCXGuard ...
|
||||
// Description: Guard Provider Class ...
|
||||
//
|
||||
// Ued in XCTradeManager ...
|
||||
//
|
||||
// Maintainer:
|
||||
// ------------
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -27,6 +27,84 @@
|
||||
"labels": [],
|
||||
"checkboxes": [],
|
||||
"comments": []
|
||||
},
|
||||
{
|
||||
"id": "17260152-05db-4ae2-9d26-cd3d9ee75863",
|
||||
"listId": "43249367-151b-4e78-bea5-b3c3f41b60ab",
|
||||
"title": "Make Each Modules Separately and Attach Process on Each them ...",
|
||||
"description": "there are several modules, documents them one by one and make all of them as runnable standalone ...",
|
||||
"labels": [],
|
||||
"checkboxes": [
|
||||
{
|
||||
"id": "2f40c757-baa3-40b1-a804-853c78fae93e",
|
||||
"title": "XCAlert",
|
||||
"checked": true
|
||||
},
|
||||
{
|
||||
"id": "03287c82-52da-4084-be05-9ddead05f3c2",
|
||||
"title": "XCTrade",
|
||||
"checked": false
|
||||
},
|
||||
{
|
||||
"id": "cbf27d79-5cab-4b10-b48c-e9317a6c7dff",
|
||||
"title": "XCSessionDetector",
|
||||
"checked": false
|
||||
},
|
||||
{
|
||||
"id": "68f70f06-d649-48d3-8050-6024d1f6b0b3",
|
||||
"title": "XCAccount",
|
||||
"checked": false
|
||||
},
|
||||
{
|
||||
"id": "ab337067-5b35-475e-a16e-48de97a79452",
|
||||
"title": "XCVolume",
|
||||
"checked": false
|
||||
},
|
||||
{
|
||||
"id": "f618df8d-5d6c-4b4d-a6e1-b2f550a77509",
|
||||
"title": "XCDataCollector",
|
||||
"checked": true
|
||||
},
|
||||
{
|
||||
"id": "9aea1e42-e9c9-4efd-85a8-3930335011b4",
|
||||
"title": "XCRestrictions",
|
||||
"checked": false
|
||||
},
|
||||
{
|
||||
"id": "7e08c5e9-74f6-40c6-9a81-b60503d5a625",
|
||||
"title": "XCBaseSignaller",
|
||||
"checked": false
|
||||
},
|
||||
{
|
||||
"id": "cfcc6686-0b3c-48e7-80f6-d3485f7ad717",
|
||||
"title": "XCTarget",
|
||||
"checked": false
|
||||
},
|
||||
{
|
||||
"id": "40a72aea-865d-48b5-a48b-fe9972e8152d",
|
||||
"title": "XCTradeManager",
|
||||
"checked": false
|
||||
}
|
||||
],
|
||||
"comments": []
|
||||
},
|
||||
{
|
||||
"id": "1d9c0541-80fe-4acf-856b-285236628756",
|
||||
"listId": "43249367-151b-4e78-bea5-b3c3f41b60ab",
|
||||
"title": "Document XCTrade",
|
||||
"description": "Document XTrade Class and it's Implementations and also do Refactoring if required.",
|
||||
"labels": [],
|
||||
"checkboxes": [],
|
||||
"comments": []
|
||||
},
|
||||
{
|
||||
"id": "bbe1f927-0744-4f27-a960-89078338ae2b",
|
||||
"listId": "43249367-151b-4e78-bea5-b3c3f41b60ab",
|
||||
"title": "Document XCVolume",
|
||||
"description": "Document XCVolume as a Base Modules which works Stand alone.\n",
|
||||
"labels": [],
|
||||
"checkboxes": [],
|
||||
"comments": []
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -34,6 +112,60 @@
|
||||
"id": "0c9df632-b6cd-4d3f-9c08-fbe7010ecc4e",
|
||||
"title": "Test",
|
||||
"cards": [
|
||||
{
|
||||
"id": "e1e98f40-ac5f-495a-ac8e-eccff3a204e7",
|
||||
"listId": "0c9df632-b6cd-4d3f-9c08-fbe7010ecc4e",
|
||||
"title": "Document XCAccount",
|
||||
"description": "Since XCAccount is a Base Class which used in other Modules, we have to Document.\n",
|
||||
"labels": [],
|
||||
"checkboxes": [],
|
||||
"comments": []
|
||||
},
|
||||
{
|
||||
"id": "e487c35e-b69d-41b4-bdae-ef8502ecc1dc",
|
||||
"listId": "0c9df632-b6cd-4d3f-9c08-fbe7010ecc4e",
|
||||
"title": "Document XCDataCollector",
|
||||
"description": "since DataCollector is a most commonly used Module in other Modules as Dependency, it is very important to make them completely documented and also add required Features to it.",
|
||||
"labels": [],
|
||||
"checkboxes": [
|
||||
{
|
||||
"id": "3357aca6-1906-44e2-8c9c-1c8d3b576f43",
|
||||
"title": "Add Suppoprt for CSV Read and Writing",
|
||||
"checked": true
|
||||
}
|
||||
],
|
||||
"comments": [
|
||||
{
|
||||
"id": "4e454ff4-88d3-41ea-b5d7-0d7cbf70c660",
|
||||
"comment": "CSV since implemented based on Custom Specified Structures. this module provides all requirements implemented."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "05e10aba-f8b4-485c-9c79-bcfb4a58e80b",
|
||||
"listId": "0c9df632-b6cd-4d3f-9c08-fbe7010ecc4e",
|
||||
"title": "Document XCAlert",
|
||||
"description": "XCAlert is a Module for Alerting Tools Enabling.\nin this task we have to complete it's Documentations and then also we have to complete XCDataCollector and make it Usable.",
|
||||
"labels": [],
|
||||
"checkboxes": [
|
||||
{
|
||||
"id": "888d7a95-44c3-4388-9446-8e5d78a0a0d1",
|
||||
"title": "add Log Saving Methods",
|
||||
"checked": true
|
||||
},
|
||||
{
|
||||
"id": "38bfd420-21fb-436a-abc6-7239da6559ae",
|
||||
"title": "add Support for Per File Logging",
|
||||
"checked": true
|
||||
}
|
||||
],
|
||||
"comments": [
|
||||
{
|
||||
"id": "6c821cac-1457-4df7-af20-61fa00f6bb55",
|
||||
"comment": "apply some fix and Prevent Double Saving Log Messages, and also add Prefix as XLog file name instancing ..."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "5549ff02-ce37-476f-9d91-ed190ca15e90",
|
||||
"listId": "0c9df632-b6cd-4d3f-9c08-fbe7010ecc4e",
|
||||
@@ -51,6 +183,31 @@
|
||||
"labels": [],
|
||||
"checkboxes": [],
|
||||
"comments": []
|
||||
},
|
||||
{
|
||||
"id": "504383b7-0a6d-4c78-afe4-be3cf59ed2bd",
|
||||
"listId": "0c9df632-b6cd-4d3f-9c08-fbe7010ecc4e",
|
||||
"title": "Complete Restrictions Class ...",
|
||||
"description": "",
|
||||
"labels": [],
|
||||
"checkboxes": [
|
||||
{
|
||||
"id": "7e422b9e-e5f4-4ea7-ab6e-b2225b8d9a67",
|
||||
"title": "add multiple symbol support",
|
||||
"checked": true
|
||||
},
|
||||
{
|
||||
"id": "65f6807b-f664-4e30-be27-06799032f16e",
|
||||
"title": "add mutiple tf support",
|
||||
"checked": true
|
||||
},
|
||||
{
|
||||
"id": "c8a8c345-7dc2-48c8-bc04-11ccf221493f",
|
||||
"title": "implement Process function",
|
||||
"checked": true
|
||||
}
|
||||
],
|
||||
"comments": []
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -0,0 +1,581 @@
|
||||
<mxfile host="65bd71144e">
|
||||
<diagram id="ivtA9_kKpv2f2q23DiRT" name="Page-1">
|
||||
<mxGraphModel dx="1165" dy="1143" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
|
||||
<root>
|
||||
<mxCell id="0"/>
|
||||
<mxCell id="1" parent="0"/>
|
||||
<mxCell id="7" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="2" target="6">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="2" value="XCAlert" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="40" y="200" width="120" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="5" style="edgeStyle=none;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="3" target="2">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="20" y="20"/>
|
||||
<mxPoint x="20" y="100"/>
|
||||
<mxPoint x="20" y="220"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="63" style="edgeStyle=none;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="3" target="60">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="20" y="20"/>
|
||||
<mxPoint x="20" y="420"/>
|
||||
<mxPoint x="20" y="700"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="70" style="edgeStyle=none;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="3" target="67">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="20" y="20"/>
|
||||
<mxPoint x="20" y="420"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="3" value="XTradeFramework Modules" style="shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="40" width="760" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="9" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="6" target="8">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="11" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="6" target="10">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="880" y="220"/>
|
||||
<mxPoint x="880" y="300"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="13" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="6" target="12">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="880" y="220"/>
|
||||
<mxPoint x="880" y="380"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="16" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="6" target="14">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="880" y="220"/>
|
||||
<mxPoint x="880" y="460"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="18" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="6" target="15">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="880" y="220"/>
|
||||
<mxPoint x="880" y="540"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="32" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="6" target="31">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="35" value="" style="edgeStyle=none;html=1;strokeColor=#FF0000;" edge="1" parent="1" source="6" target="31">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="6" value="Providing Alert Mechanism" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="560" y="200" width="240" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="24" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="8" target="23">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="8" value="LogAlert()" style="whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="920" y="200" width="140" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="26" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="10" target="25">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="10" value="TerminalAlert()" style="whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="920" y="280" width="140" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="28" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="12" target="27">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="12" value="MailAlert()" style="whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="920" y="360" width="140" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="30" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="14" target="29">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="14" value="PushAlert()" style="whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="920" y="440" width="140" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="19" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=#0082FF;" edge="1" parent="1" source="15" target="14">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="1080" y="540"/>
|
||||
<mxPoint x="1080" y="460"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="20" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=#0082FF;" edge="1" parent="1" source="15" target="12">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="1080" y="540"/>
|
||||
<mxPoint x="1080" y="380"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="21" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=#0082FF;" edge="1" parent="1" source="15" target="10">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="1080" y="540"/>
|
||||
<mxPoint x="1080" y="300"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="22" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;strokeColor=#0082FF;" edge="1" parent="1" source="15" target="8">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="1080" y="540"/>
|
||||
<mxPoint x="1080" y="220"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="15" value="SendAlert()" style="whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="920" y="520" width="140" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="23" value="Sending Logs as Print" style="whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1160" y="200" width="200" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="25" value="Sending Log to Terminal" style="whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1160" y="280" width="200" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="27" value="Sending Log as Mail" style="whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1160" y="360" width="200" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="29" value="Sending Log as Push Notification" style="whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1160" y="440" width="200" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="34" style="edgeStyle=none;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=#FF0000;" edge="1" parent="1" source="31" target="33">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="20" y="320"/>
|
||||
<mxPoint x="20" y="100"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="31" value="" style="rhombus;whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="640" y="280" width="80" height="80" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="39" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="33" target="38">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="33" value="<span style="color: rgb(0, 0, 0);">XCDataCollector</span>" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="40" y="80" width="120" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="43" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="38" target="42">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="53" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="38" target="45">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="1440" y="100"/>
|
||||
<mxPoint x="1440" y="180"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="54" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="38" target="46">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="1440" y="100"/>
|
||||
<mxPoint x="1440" y="260"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="55" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="38" target="47">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="1440" y="100"/>
|
||||
<mxPoint x="1440" y="340"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="56" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="38" target="49">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="1440" y="100"/>
|
||||
<mxPoint x="1440" y="420"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="57" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="38" target="50">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="1440" y="100"/>
|
||||
<mxPoint x="1440" y="500"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="58" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="38" target="51">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="1440" y="100"/>
|
||||
<mxPoint x="1440" y="580"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="59" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="38" target="52">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="1440" y="100"/>
|
||||
<mxPoint x="1440" y="660"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="38" value="<span style="color: rgb(0, 0, 0);">Save and Retrieve Data</span>" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="560" y="80" width="240" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="42" value="<span style="color: rgb(0, 0, 0);">Save()</span>" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1480" y="80" width="160" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="45" value="<span style="color: rgb(0, 0, 0);">Append()</span>" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1480" y="160" width="160" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="46" value="<span style="color: rgb(0, 0, 0);">Read()</span>" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1480" y="240" width="160" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="47" value="<span style="color: rgb(0, 0, 0);">IsExists()</span>" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1480" y="320" width="160" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="49" value="<span style="color: rgb(0, 0, 0);">GetFileHandlerForRead()</span>" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1480" y="400" width="160" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="50" value="<span style="color: rgb(0, 0, 0);">GetFileHandlerForWrite()</span>" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1480" y="480" width="160" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="51" value="<span style="color: rgb(0, 0, 0);">GetFilePath()</span>" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1480" y="560" width="160" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="52" value="<span style="color: rgb(0, 0, 0);">Path()</span>" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1480" y="640" width="160" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="62" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="60" target="61">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="60" value="XCTrade" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="40" y="679" width="120" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="65" style="edgeStyle=none;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;strokeColor=#FF0000;" edge="1" parent="1" source="61" target="64">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="61" value="Providing Trade Functionalities" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="560" y="679" width="240" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="66" style="edgeStyle=none;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;strokeColor=#FF0000;" edge="1" parent="1" source="64" target="2">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="20" y="800"/>
|
||||
<mxPoint x="20" y="220"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="64" value="" style="rhombus;whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="640" y="758" width="80" height="80" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="69" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="67" target="68">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="67" value="XCAccount" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="40" y="400" width="120" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="88" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="68" target="71">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="830" y="420"/>
|
||||
<mxPoint x="830" y="780"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="89" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="68" target="72">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="830" y="420"/>
|
||||
<mxPoint x="830" y="860"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="90" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="68" target="73">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="830" y="420"/>
|
||||
<mxPoint x="830" y="940"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="91" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="68" target="74">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="830" y="420"/>
|
||||
<mxPoint x="830" y="1020"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="92" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="68" target="75">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="830" y="420"/>
|
||||
<mxPoint x="830" y="1100"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="93" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="68" target="76">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="830" y="420"/>
|
||||
<mxPoint x="830" y="1180"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="94" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="68" target="77">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="830" y="420"/>
|
||||
<mxPoint x="830" y="1260"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="95" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="68" target="78">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="830" y="420"/>
|
||||
<mxPoint x="830" y="1340"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="96" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="68" target="79">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="830" y="420"/>
|
||||
<mxPoint x="830" y="1420"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="97" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="68" target="80">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="830" y="420"/>
|
||||
<mxPoint x="830" y="1500"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="98" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="68" target="81">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="830" y="420"/>
|
||||
<mxPoint x="830" y="1580"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="99" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="68" target="82">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="830" y="420"/>
|
||||
<mxPoint x="830" y="1660"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="100" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="68" target="83">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="830" y="420"/>
|
||||
<mxPoint x="830" y="1740"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="101" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="68" target="84">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="830" y="420"/>
|
||||
<mxPoint x="830" y="1820"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="102" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="68" target="85">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="830" y="420"/>
|
||||
<mxPoint x="830" y="1900"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="103" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="68" target="86">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="830" y="420"/>
|
||||
<mxPoint x="830" y="1980"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="104" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="68" target="87">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="830" y="420"/>
|
||||
<mxPoint x="830" y="2060"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="114" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="68" target="105">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="830" y="420"/>
|
||||
<mxPoint x="830" y="2140"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="115" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="68" target="106">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="830" y="420"/>
|
||||
<mxPoint x="830" y="2220"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="116" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="68" target="107">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="830" y="420"/>
|
||||
<mxPoint x="830" y="2300"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="117" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="68" target="108">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="830" y="420"/>
|
||||
<mxPoint x="830" y="2380"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="118" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="68" target="109">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="830" y="420"/>
|
||||
<mxPoint x="830" y="2460"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="119" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="68" target="110">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="830" y="420"/>
|
||||
<mxPoint x="830" y="2540"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="120" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="68" target="111">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="830" y="420"/>
|
||||
<mxPoint x="830" y="2620"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="121" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="68" target="112">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="830" y="420"/>
|
||||
<mxPoint x="830" y="2700"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="122" style="edgeStyle=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="68" target="113">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="830" y="420"/>
|
||||
<mxPoint x="830" y="2780"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="68" value="Accouss Acount Info" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="560" y="400" width="240" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="71" value="GetUserAccount()" style="whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1480" y="758" width="160" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="72" value="GetLeverage()" style="whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1480" y="838" width="160" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="73" value="CanExpertTrade()" style="whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1480" y="920" width="160" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="74" value="GetTradeMode()" style="whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1480" y="1000" width="160" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="75" value="GetBalance()" style="whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1480" y="1080" width="160" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="76" value="GetCredit()" style="whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1480" y="1160" width="160" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="77" value="GetProfit()" style="whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1480" y="1240" width="160" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="78" value="GetEquity()" style="whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1480" y="1320" width="160" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="79" value="GetMargin()" style="whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1480" y="1400" width="160" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="80" value="GetFreeMargin()" style="whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1480" y="1480" width="160" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="81" value="GetMarginLevel()" style="whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1480" y="1560" width="160" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="82" value="GetMarginCall()" style="whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1480" y="1640" width="160" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="83" value="GetMarginStopout()" style="whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1480" y="1720" width="160" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="84" value="GetName()" style="whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1480" y="1800" width="160" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="85" value="GetServerName()" style="whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1480" y="1880" width="160" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="86" value="GetCurrency()" style="whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1480" y="1960" width="160" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="87" value="GetCompany()" style="whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1480" y="2040" width="160" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="105" value="CalculateTradeProfit()" style="whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1480" y="2120" width="160" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="106" value="CalculateMargin()" style="whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1480" y="2200" width="160" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="107" value="CalculateFreeMargin()" style="whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1480" y="2280" width="160" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="108" value="CalculateMaxVolume()" style="whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1480" y="2360" width="160" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="109" value="CalculatePointValue()" style="whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1480" y="2440" width="160" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="110" value="Ca<span style="font-family: monospace; font-size: 0px; text-align: start; text-wrap-mode: nowrap;">%3CmxGraphModel%3E%3Croot%3E%3CmxCell%20id%3D%220%22%2F%3E%3CmxCell%20id%3D%221%22%20parent%3D%220%22%2F%3E%3CmxCell%20id%3D%222%22%20value%3D%22CalculatePointValue()%22%20style%3D%22whiteSpace%3Dwrap%3Bhtml%3D1%3Brounded%3D1%3B%22%20vertex%3D%221%22%20parent%3D%221%22%3E%3CmxGeometry%20x%3D%221480%22%20y%3D%222440%22%20width%3D%22160%22%20height%3D%2240%22%20as%3D%22geometry%22%2F%3E%3C%2FmxCell%3E%3C%2Froot%3E%3C%2FmxGraphModel%3E</span>lculateRiskAmount()" style="whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1480" y="2520" width="160" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="111" value="CalculateRiskPoints()" style="whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1480" y="2600" width="160" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="112" value="CalculateVolume()" style="whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1480" y="2680" width="160" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="113" value="GetBalanceReportMessage()" style="whiteSpace=wrap;html=1;rounded=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="1480" y="2760" width="160" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
</root>
|
||||
</mxGraphModel>
|
||||
</diagram>
|
||||
</mxfile>
|
||||
@@ -0,0 +1,136 @@
|
||||
# XCAccount
|
||||
|
||||
it is a module which used for Accoess Trading Account Data in SaherElm's XTrade Framework.
|
||||
|
||||
## Dependencies
|
||||
|
||||
there is no Dependencies on this modules.
|
||||
|
||||
## Instancing
|
||||
|
||||
there is not any args in Constructor.
|
||||
|
||||
## Instructions
|
||||
|
||||
use provided Actions for Access Account informations in where you need.
|
||||
|
||||
## Actions
|
||||
|
||||
### long GetUserAccount()
|
||||
|
||||
retrieve Current User Identifier.
|
||||
|
||||
### long GetLeverage()
|
||||
|
||||
retrieve Current Account Leverage.
|
||||
|
||||
### bool CanExpertTrade()
|
||||
|
||||
retrieve Flag which Specified Trading using Experts or Manual.
|
||||
|
||||
### ENUM_ACCOUNT_TRADE_MODE GetTradeMode()
|
||||
|
||||
retrieve Current Account Trading Mode.
|
||||
|
||||
- ACCOUNT_TRADE_MODE_DEMO;
|
||||
- ACCOUNT_TRADE_MODE_CONTEST;
|
||||
- ACCOUNT_TRADE_MODE_REAL;
|
||||
|
||||
### double GetBalance()
|
||||
|
||||
retrieve Current Account Balance.
|
||||
|
||||
### double GetCredit()
|
||||
|
||||
retrieve Current Account Credit.
|
||||
|
||||
### double GetProfit()
|
||||
|
||||
retrieve Current Account's Amount of Profits.
|
||||
|
||||
### double GetEquity()
|
||||
|
||||
retrieve Current Account's Amount of Equity.
|
||||
|
||||
### double GetMargin()
|
||||
|
||||
retrieve Current Account's Amount of Margin.
|
||||
|
||||
### double GetFreeMargin()
|
||||
|
||||
retrieve Current Account's Amount of Free Margin.
|
||||
|
||||
### double GetMarginLevel()
|
||||
|
||||
retrieve Current Account's Margin Level.
|
||||
|
||||
### double GetMarginCall()
|
||||
|
||||
retrieve Current Account's Margin Call Level.
|
||||
|
||||
### double GetMarginStopOut()
|
||||
|
||||
retrieve Current Account's Margin Stopout Level.
|
||||
|
||||
### string GetName()
|
||||
|
||||
retrieve Current Account's User Name.
|
||||
|
||||
### string GetServerName()
|
||||
|
||||
retrieve Current Account's Server Name.
|
||||
|
||||
### string GetCurrency()
|
||||
|
||||
retrieve Current Account's Currency.
|
||||
|
||||
### string GetCompany()
|
||||
|
||||
retrieve Current Account's Market Name.
|
||||
|
||||
### double CalculateTradeProfit(const string symbol, ENUM_ORDER_TYPE type, double volume, double entry, double exit)
|
||||
|
||||
Calculate and Retrieved Trade Profit based on Account Currency.
|
||||
|
||||
### double CalculateMarging(const string symbol, ENUM_ORDER_TYPE type, double volume, double entry)
|
||||
|
||||
Calculate and Retrieved Specified Trades used Marigin.
|
||||
|
||||
### double CalculateFreeMarging(const string symbol, ENUM_ORDER_TYPE type, double volume, double entry)
|
||||
|
||||
Calculate and Retrieved Specified Trades Free Marigin.
|
||||
|
||||
### double CalculateMaxVolume(const string symbol, ENUM_ORDER_TYPE type, double entry, double percent = 100)
|
||||
|
||||
Calculate Max Allowed Specified Trade's Volume for Entry.
|
||||
|
||||
### double GetPointValue(string symbol)
|
||||
|
||||
Retrieve Specified Symbol's Point Value.
|
||||
|
||||
### double CalculateRiskAmount(string symbol, double points, double volume)
|
||||
|
||||
Calculate How many Risk Currency in a Trade when risk Points and Trade Volume is Specified.
|
||||
used when we have to know how many risk in $ Currency, for a Trade when we risk 100 Point, by Providing 0.01 Lot as Volume.
|
||||
|
||||
### double CalculateRiskPoints(string symbol, double volume, double amount)
|
||||
|
||||
Calculate Risk Points in a Trade when Volume and Curreny Amount is Specified.
|
||||
used when we want to know How many points risk in a Trade when we have to risk 5$ in a Trade by 0.01 Lot as Volume.
|
||||
|
||||
### double CalculateVolume(string symbol, double amount, double points)
|
||||
|
||||
Calculate Trade Volume when Risk Amount in Currency and Risk Amount in Points Specified.
|
||||
used when we want to know Open a Trade by how Size of Volume when we have to risk 5$ in a Trade when 100 points risking.
|
||||
|
||||
### string GetBalanceReportMessage()
|
||||
|
||||
Prepare and Retrieve Balance Report Message for Current Account.
|
||||
|
||||
## Maintainer
|
||||
|
||||
Hadi Khazaee asl
|
||||
|
||||
[https://www.saherelm.ir](https://www.saherelm.ir)
|
||||
|
||||
[hadi_khazaee_asl@yahoo.com](mailto:hadi_khazaee_asl@yahoo.com)
|
||||
@@ -0,0 +1,143 @@
|
||||
# XCAlert
|
||||
|
||||
it is a module which used for Providing Logs in SaherElm's XTrade Framework.
|
||||
|
||||
## Dependencies
|
||||
|
||||
this Module used XCDataCollector for Saving Logs in Files.
|
||||
|
||||
## Instancing
|
||||
|
||||
using this syntax for instancing :
|
||||
|
||||
```mql5
|
||||
XCAlert(
|
||||
string prefix = "X-Alert", // Alerts Prefixe
|
||||
bool enableAlerts = true, // Enable Alerts
|
||||
bool logAlerts = true, // Log Alerts
|
||||
bool terminalAlerts = false, // Terminal Alerts
|
||||
bool mailAlerts = false, // Mail Alerts
|
||||
bool pushAlerts = false, // Push Alerts
|
||||
bool saveAlerts = false // Save Alerts
|
||||
) {}
|
||||
```
|
||||
|
||||
all of Constructor Input args is Optional, means have default values.
|
||||
you can set them after instancing using Properties Setter/Getter (s).
|
||||
|
||||
## Instructions
|
||||
|
||||
- Prefix: string, Specified Logger Prefix. this for Separate Different Logger Instances.
|
||||
- EnableAlerts: boolean, Specified Logging is Enabled or not.
|
||||
- SaveAlerts: boolean, Specified Saving Log(s) or not.
|
||||
- LogAlerts: boolean, Specified Can Print Logs on Console or not.
|
||||
- TerminalAlerts: boolean, Specified Send Logs in Terminal or not.
|
||||
- MailAlerts: boolean, Specified Send Logs as Mail or not.
|
||||
- PushAlerts: boolean, Specified Send Logs as Push or not.
|
||||
|
||||
## Actions
|
||||
|
||||
### LogAlert(string message)
|
||||
|
||||
do specified type of Logs.
|
||||
do log by Print in Console.
|
||||
|
||||
### TerminalAlert(string message)
|
||||
|
||||
do specified type of Logs.
|
||||
do log by sending Terminal Alert.
|
||||
|
||||
### MailAlert(string message)
|
||||
|
||||
do specified type of Logs.
|
||||
do log by sending Mail Alert.
|
||||
|
||||
### PushAlert(string message)
|
||||
|
||||
do specified type of Logs.
|
||||
do log by sending Push Notification Alert.
|
||||
|
||||
### SendAlert(string message)
|
||||
|
||||
do sending log by configuration.
|
||||
retrieve log and based on configuration send each specified enabled logs separately.
|
||||
|
||||
### Log(string message)
|
||||
|
||||
Checking Log Flag and Print Message.
|
||||
|
||||
### Log(string tag, string message)
|
||||
|
||||
Checking Log Flag and Print Specified Tag & Message.
|
||||
|
||||
### LogEmpty()
|
||||
|
||||
Checking Log Flag and Print Empty Message.
|
||||
|
||||
### LogArray(T &array[], string label = NULL)
|
||||
|
||||
Checking Log Flag and Print Array.
|
||||
|
||||
### LogError(int error = -1)
|
||||
|
||||
Checking Log Flag and then Generate Error Message based on provided error number,
|
||||
then Print Tag Specified Message.
|
||||
|
||||
### string GetErrorDescription(int err_code)
|
||||
|
||||
Generate Specified Error Messaged based on Provided error code.
|
||||
|
||||
### string GetTradeServerReturnCodeDescription(int return_code)
|
||||
|
||||
Generate Specified Error Message based on Provided server error code.
|
||||
|
||||
### bool CanLog()
|
||||
|
||||
protected
|
||||
return a Flag for Specified Flag which allowed Print Logs or not.
|
||||
|
||||
### bool CanLogAlert()
|
||||
|
||||
protected
|
||||
return a Flag for Specified Flag which allowed Print Logs and also Enabled or not.
|
||||
|
||||
### bool CanTerminalAlert()
|
||||
|
||||
protected
|
||||
return a Flag for Specified Flag which allowed Sending Logs to Terminal and also Enabled or not.
|
||||
|
||||
### bool CanMailAlert()
|
||||
|
||||
protected
|
||||
return a Flag for Specified Flag which allowed Sending Logs as Mail and also Enabled or not.
|
||||
|
||||
### bool CanPushAlert()
|
||||
|
||||
protected
|
||||
return a Flag for Speified Flag which allowed Sending Logs as Push and also Enabled or not.
|
||||
|
||||
### Save(string message)
|
||||
|
||||
protected
|
||||
Saving Specified Message into Logger File. if alert Saving is Enabled.
|
||||
|
||||
#### Descriptions
|
||||
|
||||
- Preparing a File Name by Combining setted Prefix + ".XLogs".
|
||||
- Generating File Path based on XCDataCollector instance Path.
|
||||
- Validate Generated filePath.
|
||||
- Preparing Log Message for Saving in Log File by attaching Current Time.
|
||||
- Append prepared Message to Log File using XCDataCollector instance.
|
||||
|
||||
### string PrepareMessage(string message)
|
||||
|
||||
private
|
||||
Replace Escaped strings and Attach Prefix to Message.
|
||||
|
||||
## Maintainer
|
||||
|
||||
Hadi Khazaee asl
|
||||
|
||||
[https://www.saherelm.ir](https://www.saherelm.ir)
|
||||
|
||||
[hadi_khazaee_asl@yahoo.com](mailto:hadi_khazaee_asl@yahoo.com)
|
||||
@@ -0,0 +1,80 @@
|
||||
# XCDataCollector
|
||||
|
||||
it is a module which used for Save and Retrieve Data in SaherElm's XTrade Framework.
|
||||
this tool helps all required modules to save data for next usage and analytics.
|
||||
we can implement Save To File and Read From File actions to all Structures and Classes and Modules.
|
||||
|
||||
## Dependencies
|
||||
|
||||
there is no Dependencies on this modules.
|
||||
|
||||
## Instancing
|
||||
|
||||
there is not any args in Constructor.
|
||||
|
||||
## Instructions
|
||||
|
||||
- using Path Action of instance for Setting File Path;
|
||||
- using Save, Append, Read for File Manipulations;
|
||||
|
||||
## Actions
|
||||
|
||||
### Path
|
||||
|
||||
is a Property Setter and Getter Action for Setting Collector Path.
|
||||
for setter it's have an input Parameters (string value) which Specified the File's Path.
|
||||
|
||||
### GetFilePath(string fileName)
|
||||
|
||||
retrieve Full path (including provided file name) based on Current Configured Path for instance.
|
||||
|
||||
### GetFileHandlerForWrite(string filePath)
|
||||
|
||||
retrieve File Handler by Write Access for Writing Data to File.
|
||||
you have to provide Fully File Path for access Handler.
|
||||
this for Use Implementing Custom Collecting Senarios out of Instance Box.
|
||||
commonly it's used by built in Actions for Regular Saving Data.
|
||||
|
||||
### GetFileHandlerForRead(string filePath)
|
||||
|
||||
retrieve File Handler by Read Access for Reading Data from File.
|
||||
you have to provide Fully File Path for access Handler.
|
||||
this for Use Implementing Custom Retrieving Senarios out of Instance Box.
|
||||
commonly it's used by built in Actions for Regular Reading Data.
|
||||
|
||||
### Save(string fileName, string content)
|
||||
|
||||
Save Specified Content to Specified File Nmae.
|
||||
here the file name must Contains fully file path including file name.
|
||||
it's only one time writing file. if it's file exists before overwrite it's content.
|
||||
|
||||
### Append(string fileName, string content)
|
||||
|
||||
Append Specified Contonet to end of Specified File.
|
||||
here the file name must Contains fully file path including file name.
|
||||
if file Exists, add to end of it. if not, Create file at Specified Provided path, then write content.
|
||||
|
||||
### Read(string fileName, string &content)
|
||||
|
||||
Read all of File Content at once from Specified File.
|
||||
here the file name must Contains fully file path including file name.
|
||||
content arg is a reference string variable to hold file content.
|
||||
|
||||
### Read(string fileName, string &content[])
|
||||
|
||||
Read all of File Content Lines at once from Specified File.
|
||||
here the file name must Contains fully file path including file name.
|
||||
content arg is a reference string array variable to hold file content lines.
|
||||
|
||||
### IsExists(string fileName)
|
||||
|
||||
Check Specified File Exists or not ...
|
||||
here the file name must Contains fully file path including file name.
|
||||
|
||||
## Maintainer
|
||||
|
||||
Hadi Khazaee asl
|
||||
|
||||
[https://www.saherelm.ir](https://www.saherelm.ir)
|
||||
|
||||
[hadi_khazaee_asl@yahoo.com](mailto:hadi_khazaee_asl@yahoo.com)
|
||||
@@ -0,0 +1,11 @@
|
||||
# XCTrade
|
||||
|
||||
it is a module which used for Providing Trade Related Actions in SaherElm's XTrade Framework.
|
||||
|
||||
## Maintainer
|
||||
|
||||
Hadi Khazaee asl
|
||||
|
||||
[https://www.saherelm.ir](https://www.saherelm.ir)
|
||||
|
||||
[hadi_khazaee_asl@yahoo.com](mailto:hadi_khazaee_asl@yahoo.com)
|
||||
@@ -0,0 +1,25 @@
|
||||
# XCVolume
|
||||
|
||||
it is a module which used for Accoess Trading Account Data in SaherElm's XTrade Framework.
|
||||
|
||||
## Dependencies
|
||||
|
||||
there is no Dependencies on this modules.
|
||||
|
||||
## Instancing
|
||||
|
||||
there is not any args in Constructor.
|
||||
|
||||
## Instructions
|
||||
|
||||
use provided Actions for Access Account informations in where you need.
|
||||
|
||||
## Actions
|
||||
|
||||
## Maintainer
|
||||
|
||||
Hadi Khazaee asl
|
||||
|
||||
[https://www.saherelm.ir](https://www.saherelm.ir)
|
||||
|
||||
[hadi_khazaee_asl@yahoo.com](mailto:hadi_khazaee_asl@yahoo.com)
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "../Classes/x-saherelm.x-alert.class.mq5"
|
||||
#include "../Classes/x-saherelm.x-chart.helper.class.mq5"
|
||||
#include "../Classes/x-saherelm.x-guard.class.mq5"
|
||||
#include "../Classes/x-saherelm.x-restrictions.class.mq5"
|
||||
#include "../Classes/x-saherelm.x-target.class.mq5"
|
||||
#include "../Classes/x-saherelm.x-trade-manager.class.mq5"
|
||||
#include "../Classes/x-saherelm.x-trade.class.mq5"
|
||||
@@ -90,11 +91,19 @@ input bool eaSaveLosts = true; // Save Lost Conditions
|
||||
input bool eaSaveRestrictions = true; // Save Restriction Reports
|
||||
// #endregion
|
||||
|
||||
// #region Configurable Documents ...
|
||||
bool eaEnableAnalysis = true; // Most Important Flag for Enable Analysis in EA ...
|
||||
bool processTicksOnlyOnNewBars = false; // Processing Ticks only on new Bars ...
|
||||
ENUM_X_SESSION_TYPE eaAllowedSessions[]; // Allowed Sessions for Analysis ...
|
||||
ENUM_X_SESSION_OVERLAP_TYPE eaAllowedOverlaps[]; // Allowed Overlaps for Analysis ...
|
||||
// #endregion
|
||||
|
||||
// #region Global Variables ...
|
||||
#define ShortName "XSessionDetectorTestEA"
|
||||
|
||||
//
|
||||
string eaTag; // EA Scoped Tag ...
|
||||
string eaTag; // EA Scoped Tag ...
|
||||
bool isNewBar = false; // EA Is New Bar ...
|
||||
|
||||
//
|
||||
XCAlert *eaAlert; // EA Scope Alert Handler ...
|
||||
@@ -102,7 +111,9 @@ XCGuard *eaGuard; // EA Scope Guard Handler ...
|
||||
XCTrade *eaTrader; // EA Scope Trade Handler ...
|
||||
XCVolume *eaVolume; // EA Scope Voluem Handler ...
|
||||
XCTarget *eaTarget; // EA Scope Target Handler ...
|
||||
XBarTracker eaBarTracker; // EA Scope Bar Tracker ...
|
||||
XTimeTracker eaTimeTracker; // EA Scope Time Tracker ...
|
||||
XCRestrictions *eaRestrictions; // EA Scope Restrictions Handler ...
|
||||
XCTradeManager *eaTradeManager; // EA Scope Trade Manager Handler ...
|
||||
XCSessionDetector *eaSessionDetector; // EA Scope Session Detector ...
|
||||
// #endregion
|
||||
@@ -131,6 +142,10 @@ int OnInit()
|
||||
return INIT_FAILED;
|
||||
}
|
||||
|
||||
//
|
||||
// Configure Dynamic Variables ...
|
||||
ConfigureEA();
|
||||
|
||||
//
|
||||
result = InitializeRequirements();
|
||||
if (!result)
|
||||
@@ -150,6 +165,35 @@ void OnTick()
|
||||
//
|
||||
// Perform Session Detector Process ...
|
||||
eaSessionDetector.Process();
|
||||
|
||||
//
|
||||
// Perform Restrictions Process ...
|
||||
eaRestrictions.Process();
|
||||
|
||||
//
|
||||
// Check if Is New Bar ...
|
||||
isNewBar = eaBarTracker.IsNewBar();
|
||||
|
||||
//
|
||||
// Check Analysis Enabled ...
|
||||
if (eaEnableAnalysis)
|
||||
{
|
||||
//
|
||||
// Check Bar Tracker ...
|
||||
if (processTicksOnlyOnNewBars)
|
||||
{
|
||||
//
|
||||
// Check New Bar or not ...
|
||||
if (!isNewBar)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Do Analysis ...
|
||||
// TODO: Implement this ...
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -157,6 +201,9 @@ void OnTick()
|
||||
*/
|
||||
void OnTrade()
|
||||
{
|
||||
//
|
||||
// Calling Event Handler ...
|
||||
eaTrader.HandleOnTrade();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -202,6 +249,7 @@ void OnDeinit(const int reason)
|
||||
ZeroMemory(eaVolume);
|
||||
ZeroMemory(eaTarget);
|
||||
ZeroMemory(eaTradeManager);
|
||||
ZeroMemory(eaRestrictions);
|
||||
ZeroMemory(eaSessionDetector);
|
||||
}
|
||||
|
||||
@@ -273,6 +321,32 @@ bool ValidateInputs()
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure EA Commons ...
|
||||
*/
|
||||
void ConfigureEA()
|
||||
{
|
||||
//
|
||||
// Configure Sessions ...
|
||||
|
||||
//
|
||||
// Configure Overlaps ...
|
||||
Add(
|
||||
X_OVERLAP_LONDON_NEWYORK,
|
||||
eaAllowedOverlaps //
|
||||
);
|
||||
|
||||
//
|
||||
// Startup eaAnalysis State ...
|
||||
int sessionsCount = ArraySize(eaAllowedSessions);
|
||||
int overlapsCount = ArraySize(eaAllowedOverlaps);
|
||||
|
||||
//
|
||||
eaEnableAnalysis =
|
||||
!IsValidSize(sessionsCount) &&
|
||||
!IsValidSize(overlapsCount);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initial Requirements of EA ...
|
||||
*
|
||||
@@ -291,6 +365,17 @@ bool InitializeRequirements()
|
||||
: "") +
|
||||
ShortName;
|
||||
|
||||
// #region Initializing Bar Tracker ...
|
||||
result = eaBarTracker.Init(
|
||||
_Symbol,
|
||||
_Period //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
// #endregion
|
||||
|
||||
// #region Alert ...
|
||||
eaAlert = new XCAlert();
|
||||
eaAlert.SetPrefix(eaLogSuffix);
|
||||
@@ -415,6 +500,23 @@ bool InitializeRequirements()
|
||||
);
|
||||
// #endregion
|
||||
|
||||
// #region Restrictions Handler ...
|
||||
eaRestrictions = new XCRestrictions();
|
||||
|
||||
//
|
||||
// Configure Restrictions ...
|
||||
// TODO: Refactor Restrictions Configurations as Input ...
|
||||
eaRestrictions.SetAllowedLosesInRestrictions(2);
|
||||
eaRestrictions.SetAllowedTradesInRestrictions(2);
|
||||
eaRestrictions.SetRestrictionsPeriodMultiplier(2);
|
||||
eaRestrictions.SetRestrictionsPeriod(X_TRADE_RESTRICATION_DAILY);
|
||||
|
||||
//
|
||||
// Register Event Handlers ...
|
||||
eaRestrictions.AddRestrictionsEndEventHandler(OnRestrictionsEnd);
|
||||
eaRestrictions.AddRestrictionsStartEventHandler(OnRestrictionsStart);
|
||||
// #endregion
|
||||
|
||||
//
|
||||
result = eaSessionDetector != NULL;
|
||||
if (!result)
|
||||
@@ -518,7 +620,11 @@ void OnOverlapStartHandler(
|
||||
datetime startTime //
|
||||
)
|
||||
{
|
||||
//
|
||||
Print("Overlap Started: ", EnumToString(overlap), " at ", TimeToString(startTime));
|
||||
|
||||
//
|
||||
// Check Over lap Exists in eaSession Everlaps ...
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -643,6 +749,24 @@ void OnPositionPartialClosed(
|
||||
void OnTradeStateChanged(const XOnTradeHandlerState &state)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle Restrictions Start Event ...
|
||||
* XCRestrictions ...
|
||||
*/
|
||||
void OnRestrictionsStart()
|
||||
{
|
||||
Print("Restrictions Start ...");
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle Restrictions End Event ...
|
||||
* XCRestrictions ...
|
||||
*/
|
||||
void OnRestrictionsEnd()
|
||||
{
|
||||
Print("Restrictions End ...");
|
||||
}
|
||||
// #endregion
|
||||
|
||||
//
|
||||
@@ -156,6 +156,10 @@ bool IsValid(ENUM_X_POSITION_TYPES value)
|
||||
{
|
||||
return value != X_POSITION_TYPE_NONE;
|
||||
}
|
||||
bool IsXValid(ENUM_X_POSITION_TYPES value)
|
||||
{
|
||||
return IsValid(value);
|
||||
}
|
||||
|
||||
//
|
||||
bool HasSpecifiedType(ENUM_X_POSITION_TYPES value)
|
||||
@@ -4688,8 +4692,8 @@ bool IsProviderFilterPassed(
|
||||
//
|
||||
return !IsValid(provider)
|
||||
? true
|
||||
: provider == item.provider ||
|
||||
Contains(provider, item.provider);
|
||||
: provider == item.provider ||
|
||||
Contains(provider, item.provider);
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user