diff --git a/.vscode/vscode-kanban.json b/.vscode/vscode-kanban.json index 9abfb83d..6b9eb651 100644 --- a/.vscode/vscode-kanban.json +++ b/.vscode/vscode-kanban.json @@ -1,6 +1,5 @@ { - "todo": [], - "in-progress": [ + "todo": [ { "assignedTo": { "name": "Hadi Khazaee Asl" @@ -13,6 +12,21 @@ "id": "82", "references": [], "title": "add trend line class and test it" + } + ], + "in-progress": [ + { + "assignedTo": { + "name": "Hadi Khazaee Asl" + }, + "creation_time": "2024-06-26T18:27:39.722Z", + "description": { + "content": "- [] Linear Regression Line 9 and 18;\n- [] Linear Regression Value;\n\nadd all those into 1 Indicator for Recieveing Verification for Signals;", + "mime": "text/markdown" + }, + "id": "85", + "references": [], + "title": "Converts Linear Regression Line and Value indicator" }, { "assignedTo": { diff --git a/Classes/x-saherelm.x121.setup.xea.mq5 b/Classes/x-saherelm.x121.setup.xea.mq5 index 6b8b4255..8bcbb9f1 100644 --- a/Classes/x-saherelm.x121.setup.xea.mq5 +++ b/Classes/x-saherelm.x121.setup.xea.mq5 @@ -5303,7 +5303,15 @@ private: int positionsCount = mTrader.GetPositions(positions); if (!IsValidSize(positionsCount)) { + // mForce = false; + + // + datetime cTime = TimeCurrent(); + string message = "Exit From Force State: " + ToString(cTime); + + // + // Log(message); return; } @@ -5315,7 +5323,32 @@ private: ); // - mForce = marigin >= forceMargin && oldestAge >= 288; + // Check Force State ... + bool isForce = marigin >= forceMargin && oldestAge >= 288; + if (!isForce) + { + // + if (mForce) + { + // + mForce = false; + + // + datetime cTime = TimeCurrent(); + string message = "Exit From Force State: " + ToString(cTime); + + // + // Log(message); + } + return; + } + else + { + mForce = true; + } + + // + // Prevent Moving Forward From Non Force State ... if (!mForce) { return; @@ -5347,7 +5380,7 @@ private: } // - Log("symbolPositionsCount: " + ToString(symbolPositionsCount)); + // Log("symbolPositionsCount: " + ToString(symbolPositionsCount)); } // diff --git a/Indicators/Linear regression line.mq5 b/Indicators/Linear regression line.mq5 new file mode 100644 index 00000000..3c86afb6 Binary files /dev/null and b/Indicators/Linear regression line.mq5 differ diff --git a/Indicators/Linear regression slope.mq5 b/Indicators/Linear regression slope.mq5 new file mode 100644 index 00000000..161ac497 Binary files /dev/null and b/Indicators/Linear regression slope.mq5 differ diff --git a/Indicators/Linear regression value.mq5 b/Indicators/Linear regression value.mq5 new file mode 100644 index 00000000..4122bb7c Binary files /dev/null and b/Indicators/Linear regression value.mq5 differ diff --git a/Indicators/linear_regression_line.mq5 b/Indicators/linear_regression_line.mq5 new file mode 100644 index 00000000..3c86afb6 Binary files /dev/null and b/Indicators/linear_regression_line.mq5 differ