From e9f565d88c27ea0dcc46027a4fb500f8deddeee9 Mon Sep 17 00:00:00 2001 From: kenorb Date: Wed, 6 Oct 2021 15:45:18 +0100 Subject: [PATCH] Renames Action to TaskAction --- .github/workflows/test.yml | 1 - EA.mqh | 2 +- EA.struct.h | 2 +- Indicators/Indi_Drawer.mqh | 6 +- Order.mqh | 2 +- Task/Task.enum.h | 4 +- Task/Task.h | 8 +-- Task/Task.struct.h | 10 +-- Action.enum.h => Task/TaskAction.enum.h | 6 +- Action.mqh => Task/TaskAction.h | 64 +++++++++---------- Action.struct.h => Task/TaskAction.struct.h | 58 ++++++++--------- Task/TaskCondition.enum.h | 4 +- Task/TaskCondition.struct.h | 2 +- Task/tests/Task.test.mq5 | 3 +- .../tests/TaskAction.test.mq4 | 4 +- .../tests/TaskAction.test.mq5 | 16 ++--- Trade.mqh | 4 +- tests/CompileTest.mq5 | 2 +- 18 files changed, 99 insertions(+), 99 deletions(-) rename Action.enum.h => Task/TaskAction.enum.h (95%) rename Action.mqh => Task/TaskAction.h (84%) rename Action.struct.h => Task/TaskAction.struct.h (67%) rename tests/ActionTest.mq4 => Task/tests/TaskAction.test.mq4 (93%) rename tests/ActionTest.mq5 => Task/tests/TaskAction.test.mq5 (92%) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index de9a7ccec..cb632fbc3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,7 +40,6 @@ jobs: matrix: test: - AccountTest - - ActionTest - BufferStructTest - BufferTest - ChartTest diff --git a/EA.mqh b/EA.mqh index 588324794..f336d9456 100644 --- a/EA.mqh +++ b/EA.mqh @@ -30,7 +30,6 @@ #define EA_MQH // Includes. -#include "Action.enum.h" #include "Chart.mqh" #include "Data.struct.h" #include "Dict.mqh" @@ -46,6 +45,7 @@ #include "Strategy.mqh" #include "SummaryReport.mqh" #include "Task/Task.h" +#include "Task/TaskAction.enum.h" #include "Task/TaskCondition.enum.h" #include "Terminal.mqh" #include "Trade.mqh" diff --git a/EA.struct.h b/EA.struct.h index 9cde47bab..bb42214a7 100644 --- a/EA.struct.h +++ b/EA.struct.h @@ -225,7 +225,7 @@ struct EAState { public: // @todo: Move to protected. DateTime last_updated; // Last updated. protected: - unsigned int flags; // Action flags. + unsigned int flags; // TaskAction flags. unsigned int new_periods; // Started periods. public: /* Struct's enumerations */ diff --git a/Indicators/Indi_Drawer.mqh b/Indicators/Indi_Drawer.mqh index f6ea7ecf7..463545b9d 100644 --- a/Indicators/Indi_Drawer.mqh +++ b/Indicators/Indi_Drawer.mqh @@ -24,10 +24,10 @@ struct IndicatorParams; // Includes. -#include "../Action.mqh" #include "../DictStruct.mqh" #include "../Indicator/IndicatorTickOrCandleSource.h" #include "../Redis.mqh" +#include "../Task/TaskAction.h" #include "Indi_Drawer.struct.h" #include "Price/Indi_Price.mqh" @@ -106,7 +106,7 @@ class Indi_Drawer : public IndicatorTickOrCandleSource { virtual void OnTick() { Indicator::OnTick(); - ActionEntry action(INDI_ACTION_SET_VALUE); + TaskActionEntry action(INDI_ACTION_SET_VALUE); ArrayResize(action.args, 3); action.args[0].type = TYPE_LONG; action.args[0].integer_value = GetBarTime(); @@ -133,7 +133,7 @@ class Indi_Drawer : public IndicatorTickOrCandleSource { Print("Got: ", message.Message); #endif if (message.Command == "message" && message.Channel == "INDICATOR_DRAW") { - ActionEntry action_entry; + TaskActionEntry action_entry; SerializerConverter::FromString(message.Message).ToObject(action_entry); ExecuteAction((ENUM_INDICATOR_ACTION)action_entry.action_id, action_entry.args); #ifdef __debug__ diff --git a/Order.mqh b/Order.mqh index a06a2475d..107d0cb94 100644 --- a/Order.mqh +++ b/Order.mqh @@ -30,7 +30,6 @@ #define ORDER_MQH // Includes. -#include "Action.enum.h" #include "Convert.mqh" #include "Data.define.h" #include "Data.struct.h" @@ -44,6 +43,7 @@ #include "Std.h" #include "String.mqh" #include "SymbolInfo.mqh" +#include "Task/TaskAction.enum.h" #include "Terminal.define.h" /* Defines for backward compatibility. */ diff --git a/Task/Task.enum.h b/Task/Task.enum.h index 0fcbc5b48..66b180b1f 100644 --- a/Task/Task.enum.h +++ b/Task/Task.enum.h @@ -30,14 +30,14 @@ #pragma once #endif -/* Structure for task actions for Action class. */ +/* Structure for task actions for TaskAction class. */ enum ENUM_TASK_ACTION { TASK_ACTION_NONE = 0, // Does nothing. TASK_ACTION_PROCESS, // Process tasks. FINAL_TASK_ACTION_ENTRY }; -/* Structure for task conditions for Action class. */ +/* Structure for task conditions for TaskAction class. */ enum ENUM_TASK_CONDITION { TASK_COND_NONE = 0, // Empty condition. TASK_COND_IS_ACTIVE, // Is active. diff --git a/Task/Task.h b/Task/Task.h index 2c41e2ead..4c5863a32 100644 --- a/Task/Task.h +++ b/Task/Task.h @@ -30,12 +30,12 @@ #define TASK_MQH // Includes. -#include "../Action.mqh" #include "../DictStruct.mqh" #include "../Refs.mqh" -#include "../Task/TaskCondition.h" #include "Task.enum.h" #include "Task.struct.h" +#include "TaskAction.h" +#include "TaskCondition.h" class Task { protected: @@ -99,8 +99,8 @@ class Task { bool _result = false; if (_entry.IsActive()) { if (TaskCondition::Test(_entry.GetCondition())) { - ActionEntry _action = _entry.GetAction(); - Action::Execute(_action); + TaskActionEntry _action = _entry.GetAction(); + TaskAction::Execute(_action); if (_action.IsDone()) { _entry.SetFlag(TASK_ENTRY_FLAG_IS_DONE, _action.IsDone()); _entry.SetFlag(TASK_ENTRY_FLAG_IS_FAILED, _action.IsFailed()); diff --git a/Task/Task.struct.h b/Task/Task.struct.h index 57b5d856c..4c9b328d0 100644 --- a/Task/Task.struct.h +++ b/Task/Task.struct.h @@ -31,20 +31,20 @@ #endif // Includes. -#include "../Action.struct.h" #include "Task.enum.h" +#include "TaskAction.struct.h" #include "TaskCondition.struct.h" struct TaskEntry { - ActionEntry action; // Action of the task. + TaskActionEntry action; // TaskAction of the task. TaskConditionEntry cond; // TaskCondition of the task. datetime expires; // Time of expiration. datetime last_process; // Time of the last process. datetime last_success; // Time of the last success. - unsigned char flags; // Action flags. + unsigned char flags; // TaskAction flags. // Constructors. void TaskEntry() { Init(); } - void TaskEntry(ActionEntry &_action, TaskConditionEntry &_cond) : action(_action), cond(_cond) { Init(); } + void TaskEntry(TaskActionEntry &_action, TaskConditionEntry &_cond) : action(_action), cond(_cond) { Init(); } void TaskEntry(long _aid, ENUM_ACTION_TYPE _atype, long _cid, ENUM_TASK_CONDITION_TYPE _ctype) : action(_aid, _atype), cond(_cid, _ctype) { Init(); @@ -79,7 +79,7 @@ struct TaskEntry { // Getters. long GetActionId() { return action.GetId(); } long GetConditionId() { return cond.GetId(); } - ActionEntry GetAction() { return action; } + TaskActionEntry GetAction() { return action; } TaskConditionEntry GetCondition() { return cond; } ENUM_ACTION_TYPE GetActionType() { return action.GetType(); } ENUM_TASK_CONDITION_TYPE GetConditionType() { return cond.GetType(); } diff --git a/Action.enum.h b/Task/TaskAction.enum.h similarity index 95% rename from Action.enum.h rename to Task/TaskAction.enum.h index 551ae44f7..ed6a40cb6 100644 --- a/Action.enum.h +++ b/Task/TaskAction.enum.h @@ -21,7 +21,7 @@ /** * @file - * Includes Action's enums. + * Includes TaskAction's enums. */ #ifndef __MQL__ @@ -45,7 +45,7 @@ enum ENUM_ACTION_ENTRY_FLAGS { /* Defines action types. */ enum ENUM_ACTION_TYPE { ACTION_TYPE_NONE = 0, // None. - ACTION_TYPE_ACTION, // Action of action. + ACTION_TYPE_ACTION, // TaskAction of action. ACTION_TYPE_EA, // EA action. ACTION_TYPE_INDICATOR, // Order action. ACTION_TYPE_ORDER, // Order action. @@ -56,7 +56,7 @@ enum ENUM_ACTION_TYPE { FINAL_ACTION_TYPE_ENTRY }; -/* Defines action types for Action class. */ +/* Defines action types for TaskAction class. */ enum ENUM_ACTION_ACTION { ACTION_ACTION_NONE = 0, // Does nothing. ACTION_ACTION_DISABLE, // Disables action. diff --git a/Action.mqh b/Task/TaskAction.h similarity index 84% rename from Action.mqh rename to Task/TaskAction.h index 92696c6de..961a52fe0 100644 --- a/Action.mqh +++ b/Task/TaskAction.h @@ -30,18 +30,18 @@ #define ACTION_MQH // Forward class declaration. -class Action; +class TaskAction; // Includes. -#include "Action.enum.h" -#include "Action.struct.h" -#include "EA.mqh" -#include "Task/TaskCondition.enum.h" +#include "../EA.mqh" +#include "TaskAction.enum.h" +#include "TaskAction.struct.h" +#include "TaskCondition.enum.h" /** - * Action class. + * TaskAction class. */ -class Action { +class TaskAction { public: protected: // Class variables. @@ -49,30 +49,30 @@ class Action { public: // Class variables. - DictStruct actions; + DictStruct actions; /* Special methods */ /** * Class constructor. */ - Action() {} - Action(ActionEntry &_entry) { actions.Push(_entry); } - Action(long _action_id, ENUM_ACTION_TYPE _type) { - ActionEntry _entry(_action_id, _type); + TaskAction() {} + TaskAction(TaskActionEntry &_entry) { actions.Push(_entry); } + TaskAction(long _action_id, ENUM_ACTION_TYPE _type) { + TaskActionEntry _entry(_action_id, _type); actions.Push(_entry); } template - Action(T _action_id, void *_obj = NULL) { - ActionEntry _entry(_action_id); + TaskAction(T _action_id, void *_obj = NULL) { + TaskActionEntry _entry(_action_id); if (_obj != NULL) { _entry.SetObject(_obj); } actions.Push(_entry); } template - Action(T _action_id, MqlParam &_args[], void *_obj = NULL) { - ActionEntry _entry(_action_id); + TaskAction(T _action_id, MqlParam &_args[], void *_obj = NULL) { + TaskActionEntry _entry(_action_id); _entry.SetArgs(_args); if (_obj != NULL) { _entry.SetObject(_obj); @@ -83,7 +83,7 @@ class Action { /** * Class copy constructor. */ - Action(Action &_cond) { actions = _cond.GetActions(); } + TaskAction(TaskAction &_cond) { actions = _cond.GetActions(); } /* Main methods */ @@ -92,9 +92,9 @@ class Action { */ bool Execute() { bool _result = true, _executed = false; - for (DictStructIterator iter = actions.Begin(); iter.IsValid(); ++iter) { + for (DictStructIterator iter = actions.Begin(); iter.IsValid(); ++iter) { bool _curr_result = false; - ActionEntry _entry = iter.Value(); + TaskActionEntry _entry = iter.Value(); if (!_entry.IsValid()) { // Ignore invalid entries. continue; @@ -109,12 +109,12 @@ class Action { /** * Execute specific action. */ - static bool Execute(ActionEntry &_entry) { + static bool Execute(TaskActionEntry &_entry) { bool _result = false; switch (_entry.type) { case ACTION_TYPE_ACTION: if (Object::IsValid(_entry.obj)) { - _result = ((Action *)_entry.obj).ExecuteAction((ENUM_ACTION_ACTION)_entry.action_id, _entry.args); + _result = ((TaskAction *)_entry.obj).ExecuteAction((ENUM_ACTION_ACTION)_entry.action_id, _entry.args); } else { _result = false; _entry.AddFlags(ACTION_ENTRY_FLAG_IS_INVALID); @@ -249,15 +249,15 @@ class Action { /** * Returns actions. */ - DictStruct *GetActions() { return &actions; } + DictStruct *GetActions() { return &actions; } /** * Count entry flags. */ unsigned int GetFlagCount(ENUM_ACTION_ENTRY_FLAGS _flag) { unsigned int _counter = 0; - for (DictStructIterator iter = actions.Begin(); iter.IsValid(); ++iter) { - ActionEntry _entry = iter.Value(); + for (DictStructIterator iter = actions.Begin(); iter.IsValid(); ++iter) { + TaskActionEntry _entry = iter.Value(); if (_entry.HasFlag(_flag)) { _counter++; } @@ -272,8 +272,8 @@ class Action { */ bool SetFlags(ENUM_ACTION_ENTRY_FLAGS _flag, bool _value = true) { unsigned int _counter = 0; - for (DictStructIterator iter = actions.Begin(); iter.IsValid(); ++iter) { - ActionEntry _entry = iter.Value(); + for (DictStructIterator iter = actions.Begin(); iter.IsValid(); ++iter) { + TaskActionEntry _entry = iter.Value(); switch (_value) { case false: if (_entry.HasFlag(_flag)) { @@ -298,7 +298,7 @@ class Action { * Checks for Task condition. * * @param ENUM_ACTION_CONDITION _cond - * Action condition. + * TaskAction condition. * @return * Returns true when the condition is met. */ @@ -321,21 +321,21 @@ class Action { // Is invalid. return IsInvalid(); default: - logger.Ptr().Error(StringFormat("Invalid Action condition: %s!", EnumToString(_cond), __FUNCTION_LINE__)); - break; + logger.Ptr().Error(StringFormat("Invalid TaskAction condition: %s!", EnumToString(_cond), __FUNCTION_LINE__)); + return false; } return _result; } bool CheckCondition(ENUM_ACTION_CONDITION _cond) { ARRAY(DataParamEntry, _args); - return Action::CheckCondition(_cond, _args); + return TaskAction::CheckCondition(_cond, _args); } /** * Execute action of action. * * @param ENUM_ACTION_ACTION _action - * Action of action to execute. + * TaskAction of action to execute. * @return * Returns true when the action has been executed successfully. */ @@ -368,7 +368,7 @@ class Action { } bool ExecuteAction(ENUM_ACTION_ACTION _action) { ARRAY(DataParamEntry, _args); - return Action::ExecuteAction(_action, _args); + return TaskAction::ExecuteAction(_action, _args); } /* Other methods */ diff --git a/Action.struct.h b/Task/TaskAction.struct.h similarity index 67% rename from Action.struct.h rename to Task/TaskAction.struct.h index 43d13cfaa..cb3aac782 100644 --- a/Action.struct.h +++ b/Task/TaskAction.struct.h @@ -21,7 +21,7 @@ /** * @file - * Includes Action's structs. + * Includes TaskAction's structs. */ #ifndef __MQL__ @@ -30,41 +30,41 @@ #endif // Includes. -#include "Account/Account.enum.h" -#include "Action.enum.h" -#include "Chart.enum.h" -#include "Data.struct.h" -#include "EA.enum.h" -#include "Indicator.enum.h" -//#include "Market.enum.h" -#include "Order.enum.h" -#include "Serializer.mqh" -#include "Strategy.enum.h" -#include "Task/Task.enum.h" -#include "Trade.enum.h" +#include "../Account/Account.enum.h" +#include "../Chart.enum.h" +#include "../Data.struct.h" +#include "../EA.enum.h" +#include "../Indicator.enum.h" +#include "TaskAction.enum.h" +//#include "../Market.enum.h" +#include "../Order.enum.h" +#include "../Serializer.mqh" +#include "../Strategy.enum.h" +#include "../Trade.enum.h" +#include "Task.enum.h" -/* Entry for Action class. */ -struct ActionEntry { - unsigned char flags; /* Action flags. */ +/* Entry for TaskAction class. */ +struct TaskActionEntry { + unsigned char flags; /* TaskAction flags. */ datetime last_success; /* Time of the previous check. */ int frequency; /* How often to check. */ - long action_id; /* Action ID. */ + long action_id; /* TaskAction ID. */ short tries; /* Number of retries left. */ void *obj; /* Reference to associated object. */ - ENUM_ACTION_TYPE type; /* Action type. */ - DataParamEntry args[]; /* Action arguments. */ + ENUM_ACTION_TYPE type; /* TaskAction type. */ + DataParamEntry args[]; /* TaskAction arguments. */ // Constructors. - ActionEntry() : type(FINAL_ACTION_TYPE_ENTRY), action_id(WRONG_VALUE) { Init(); } - ActionEntry(long _action_id, ENUM_ACTION_TYPE _type) : type(_type), action_id(_action_id) { Init(); } - ActionEntry(ActionEntry &_ae) { this = _ae; } - ActionEntry(ENUM_EA_ACTION _action_id) : type(ACTION_TYPE_EA), action_id(_action_id) { Init(); } - ActionEntry(ENUM_ORDER_ACTION _action_id) : type(ACTION_TYPE_ORDER), action_id(_action_id) { Init(); } - ActionEntry(ENUM_INDICATOR_ACTION _action_id) : type(ACTION_TYPE_INDICATOR), action_id(_action_id) { Init(); } - ActionEntry(ENUM_STRATEGY_ACTION _action_id) : type(ACTION_TYPE_STRATEGY), action_id(_action_id) { Init(); } - ActionEntry(ENUM_TASK_ACTION _action_id) : type(ACTION_TYPE_TASK), action_id(_action_id) { Init(); } - ActionEntry(ENUM_TRADE_ACTION _action_id) : type(ACTION_TYPE_TRADE), action_id(_action_id) { Init(); } + TaskActionEntry() : type(FINAL_ACTION_TYPE_ENTRY), action_id(WRONG_VALUE) { Init(); } + TaskActionEntry(long _action_id, ENUM_ACTION_TYPE _type) : type(_type), action_id(_action_id) { Init(); } + TaskActionEntry(TaskActionEntry &_ae) { this = _ae; } + TaskActionEntry(ENUM_EA_ACTION _action_id) : type(ACTION_TYPE_EA), action_id(_action_id) { Init(); } + TaskActionEntry(ENUM_ORDER_ACTION _action_id) : type(ACTION_TYPE_ORDER), action_id(_action_id) { Init(); } + TaskActionEntry(ENUM_INDICATOR_ACTION _action_id) : type(ACTION_TYPE_INDICATOR), action_id(_action_id) { Init(); } + TaskActionEntry(ENUM_STRATEGY_ACTION _action_id) : type(ACTION_TYPE_STRATEGY), action_id(_action_id) { Init(); } + TaskActionEntry(ENUM_TASK_ACTION _action_id) : type(ACTION_TYPE_TASK), action_id(_action_id) { Init(); } + TaskActionEntry(ENUM_TRADE_ACTION _action_id) : type(ACTION_TYPE_TRADE), action_id(_action_id) { Init(); } // Deconstructor. - ~ActionEntry() { + ~TaskActionEntry() { // Object::Delete(obj); } // Flag methods. diff --git a/Task/TaskCondition.enum.h b/Task/TaskCondition.enum.h index 25faf93a4..13cb5542c 100644 --- a/Task/TaskCondition.enum.h +++ b/Task/TaskCondition.enum.h @@ -104,7 +104,7 @@ enum ENUM_TASK_CONDITION_STATEMENT { /* Defines condition types. */ enum ENUM_TASK_CONDITION_TYPE { COND_TYPE_ACCOUNT = 1, // Account condition. - COND_TYPE_ACTION, // Action condition. + COND_TYPE_ACTION, // TaskAction condition. COND_TYPE_CHART, // Chart condition. COND_TYPE_DATETIME, // Datetime condition. COND_TYPE_EA, // EA condition. @@ -164,7 +164,7 @@ enum ENUM_ACCOUNT_CONDITION { FINAL_ACCOUNT_CONDITION_ENTRY }; -/* Action conditions. */ +/* TaskAction conditions. */ enum ENUM_ACTION_CONDITION { ACTION_COND_NONE = 0, // Empty condition. ACTION_COND_IS_ACTIVE, // Is active. diff --git a/Task/TaskCondition.struct.h b/Task/TaskCondition.struct.h index 97b10383e..8e81470b4 100644 --- a/Task/TaskCondition.struct.h +++ b/Task/TaskCondition.struct.h @@ -30,7 +30,7 @@ #endif // Includes. -#include "../Account.enum.h" +#include "../Account/Account.enum.h" #include "../Chart.enum.h" #include "../DateTime.enum.h" #include "../EA.enum.h" diff --git a/Task/tests/Task.test.mq5 b/Task/tests/Task.test.mq5 index f84783996..5b38c12df 100644 --- a/Task/tests/Task.test.mq5 +++ b/Task/tests/Task.test.mq5 @@ -28,10 +28,11 @@ struct DataParamEntry; // Includes. -#include "../../Action.mqh" #include "../../Chart.mqh" #include "../../DictObject.mqh" #include "../../EA.mqh" +#include "../TaskAction.h" +#include "../TaskCondition.h" #include "../../Test.mqh" #include "../Task.h" diff --git a/tests/ActionTest.mq4 b/Task/tests/TaskAction.test.mq4 similarity index 93% rename from tests/ActionTest.mq4 rename to Task/tests/TaskAction.test.mq4 index 5aba4100d..080ea3c49 100644 --- a/tests/ActionTest.mq4 +++ b/Task/tests/TaskAction.test.mq4 @@ -21,8 +21,8 @@ /** * @file - * Test functionality of Action class. + * Test functionality of TaskAction class. */ // Includes. -#include "ActionTest.mq5" +#include "TaskAction.test.mq5" diff --git a/tests/ActionTest.mq5 b/Task/tests/TaskAction.test.mq5 similarity index 92% rename from tests/ActionTest.mq5 rename to Task/tests/TaskAction.test.mq5 index f5a8ece2c..475530773 100644 --- a/tests/ActionTest.mq5 +++ b/Task/tests/TaskAction.test.mq5 @@ -21,7 +21,7 @@ /** * @file - * Test functionality of Action class. + * Test functionality of TaskAction class. */ // Defines. @@ -31,15 +31,15 @@ struct DataParamEntry; // Includes. -#include "../Action.mqh" -#include "../DictObject.mqh" -#include "../EA.mqh" -#include "../Test.mqh" +#include "../../DictObject.mqh" +#include "../../EA.mqh" +#include "../../Test.mqh" +#include "../TaskAction.h" // Global variables. Chart *chart; EA *ea; -DictObject actions; +DictObject actions; // Define strategy classes. class Stg1 : public Strategy { @@ -79,12 +79,12 @@ int OnInit() { assertTrueOrReturnFalse(ea.CheckCondition(EA_COND_IS_ENABLED), "Wrong condition: EA_COND_IS_ENABLED!"); #ifdef ACTION_EA_ENABLED // Disables EA and confirm it's disabled. - Action *action1 = new Action(EA_ACTION_DISABLE, ea); + TaskAction *action1 = new TaskAction(EA_ACTION_DISABLE, ea); action1.Execute(); assertTrueOrReturnFalse(!ea.CheckCondition(EA_COND_IS_ENABLED), "Wrong condition: EA_COND_IS_ENABLED!"); delete action1; // Re-enables EA and confirm it's enabled. - Action *action2 = new Action(EA_ACTION_ENABLE, ea); + TaskAction *action2 = new TaskAction(EA_ACTION_ENABLE, ea); action2.Execute(); assertTrueOrReturnFalse(ea.CheckCondition(EA_COND_IS_ENABLED), "Wrong condition: EA_COND_IS_ENABLED!"); delete action2; diff --git a/Trade.mqh b/Trade.mqh index 915c34091..bd2ebf7f0 100644 --- a/Trade.mqh +++ b/Trade.mqh @@ -31,7 +31,6 @@ class Trade; // Includes. #include "Account.mqh" -#include "Action.enum.h" #include "Chart.mqh" #include "Convert.mqh" #include "DictStruct.mqh" @@ -39,6 +38,7 @@ class Trade; #include "Object.mqh" #include "Order.mqh" #include "OrderQuery.h" +#include "Task/TaskAction.enum.h" #include "Task/TaskCondition.enum.h" #include "Trade.enum.h" #include "Trade.struct.h" @@ -1811,7 +1811,7 @@ HistorySelect(0, TimeCurrent()); // Select history for access. return Trade::CheckCondition(_cond, _args); } - /* Actions */ + /* TaskActions */ /** * Execute trade action. diff --git a/tests/CompileTest.mq5 b/tests/CompileTest.mq5 index a2923ce26..f92657227 100644 --- a/tests/CompileTest.mq5 +++ b/tests/CompileTest.mq5 @@ -37,8 +37,8 @@ // Includes. #include "../Account.mqh" -#include "../Action.mqh" #include "../Array.mqh" +#include "../Task/TaskAction.h" //#include "../BasicTrade.mqh" // @removeme #include "../Buffer.mqh" #include "../BufferStruct.mqh"