From a024e3abb2a911325cb7de2e1d5872df3ddc638c Mon Sep 17 00:00:00 2001 From: kenorb Date: Sat, 23 Sep 2023 22:51:46 +0100 Subject: [PATCH 1/6] Renames Meta Reversal to Trend --- .github/workflows/backtest.yml | 6 +++--- .github/workflows/compile.yml | 4 ++-- README.md | 15 ++++++++------- Stg_Meta_Reversal.mq4 => Stg_Meta_Trend.mq4 | 2 +- Stg_Meta_Reversal.mq5 => Stg_Meta_Trend.mq5 | 2 +- Stg_Meta_Reversal.mqh => Stg_Meta_Trend.mqh | 0 6 files changed, 15 insertions(+), 14 deletions(-) rename Stg_Meta_Reversal.mq4 => Stg_Meta_Trend.mq4 (93%) rename Stg_Meta_Reversal.mq5 => Stg_Meta_Trend.mq5 (98%) rename Stg_Meta_Reversal.mqh => Stg_Meta_Trend.mqh (100%) diff --git a/.github/workflows/backtest.yml b/.github/workflows/backtest.yml index aa22124..273f2d9 100644 --- a/.github/workflows/backtest.yml +++ b/.github/workflows/backtest.yml @@ -41,14 +41,14 @@ jobs: include: . init-platform: true mt-version: 5.0.0.2361 - path: Stg_Meta_Reversal.mq4 + path: Stg_Meta_Trend.mq4 verbose: true - name: Compile for MQL5 uses: fx31337/mql-compile-action@master with: include: . mt-version: 5.0.0.2515 - path: Stg_Meta_Reversal.mq5 + path: Stg_Meta_Trend.mq5 verbose: true - name: List compiled files run: '(Get-ChildItem -Recurse -Path . -Include *.ex[45]).fullname' @@ -79,7 +79,7 @@ jobs: OptFormatBrief: true OptFormatJson: true OptVerbose: true - TestExpert: "Stg_Meta_Reversal" + TestExpert: "Stg_Meta_Trend" TestPeriod: M1 TestReportName: Report-${{ matrix.year }}-${{ matrix.month }} - name: Upload results diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index b847826..ae0bd66 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -43,14 +43,14 @@ jobs: include: . init-platform: true mt-version: 5.0.0.2361 - path: Stg_Meta_Reversal.mq4 + path: Stg_Meta_Trend.mq4 verbose: true - name: Compile for MQL5 uses: fx31337/mql-compile-action@master with: include: . mt-version: 5.0.0.2515 - path: Stg_Meta_Reversal.mq5 + path: Stg_Meta_Trend.mq5 verbose: true - name: List compiled files run: '(Get-ChildItem -Recurse -Path . -Include *.ex[45]).fullname' diff --git a/README.md b/README.md index d41f15a..b44d9c0 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Strategy Meta Reversal +# Strategy Meta Trend [![Status][gha-image-check-master]][gha-link-check-master] [![Status][gha-image-compile-master]][gha-link-compile-master] @@ -7,7 +7,8 @@ [![License][license-image]][license-link] [![Edit][gh-edit-badge]][gh-edit-link] -Reversal meta strategy reverses signals of another strategy. +Trend meta strategy to filter out +signals of other strategies based on the current trend. ## Dependencies @@ -21,12 +22,12 @@ Reversal meta strategy reverses signals of another strategy. [gh-discuss-link]: https://github.com/EA31337/EA31337-Strategies/discussions [gh-edit-badge]: https://img.shields.io/badge/GitHub-edit-purple.svg?logo=github -[gh-edit-link]: https://github.dev/EA31337/Strategy-Meta_Reversal +[gh-edit-link]: https://github.dev/EA31337/Strategy-Meta_Trend -[gha-link-check-master]: https://github.com/EA31337/Strategy-Meta_Reversal/actions?query=workflow:Check+branch%3Amaster -[gha-image-check-master]: https://github.com/EA31337/Strategy-Meta_Reversal/workflows/Check/badge.svg?branch=master -[gha-link-compile-master]: https://github.com/EA31337/Strategy-Meta_Reversal/actions?query=workflow:Compile+branch%3Amaster -[gha-image-compile-master]: https://github.com/EA31337/Strategy-Meta_Reversal/workflows/Compile/badge.svg?branch=master +[gha-link-check-master]: https://github.com/EA31337/Strategy-Meta_Trend/actions?query=workflow:Check+branch%3Amaster +[gha-image-check-master]: https://github.com/EA31337/Strategy-Meta_Trend/workflows/Check/badge.svg?branch=master +[gha-link-compile-master]: https://github.com/EA31337/Strategy-Meta_Trend/actions?query=workflow:Compile+branch%3Amaster +[gha-image-compile-master]: https://github.com/EA31337/Strategy-Meta_Trend/workflows/Compile/badge.svg?branch=master [tg-channel-image]: https://img.shields.io/badge/Telegram-join-0088CC.svg?logo=telegram [tg-channel-link]: https://t.me/EA31337 diff --git a/Stg_Meta_Reversal.mq4 b/Stg_Meta_Trend.mq4 similarity index 93% rename from Stg_Meta_Reversal.mq4 rename to Stg_Meta_Trend.mq4 index 581e85c..38cdb8e 100644 --- a/Stg_Meta_Reversal.mq4 +++ b/Stg_Meta_Trend.mq4 @@ -10,4 +10,4 @@ */ // Includes the main code. -#include "Stg_Meta_Reversal.mq5" +#include "Stg_Meta_Trend.mq5" diff --git a/Stg_Meta_Reversal.mq5 b/Stg_Meta_Trend.mq5 similarity index 98% rename from Stg_Meta_Reversal.mq5 rename to Stg_Meta_Trend.mq5 index c340563..79f8b07 100644 --- a/Stg_Meta_Reversal.mq5 +++ b/Stg_Meta_Trend.mq5 @@ -32,7 +32,7 @@ input ENUM_LOG_LEVEL Log_Level = V_INFO; // Log level. input bool Info_On_Chart = true; // Display info on chart. // Includes strategy class. -#include "Stg_Meta_Reversal.mqh" +#include "Stg_Meta_Trend.mqh" // Defines. #define ea_name "Strategy Meta Reversal" diff --git a/Stg_Meta_Reversal.mqh b/Stg_Meta_Trend.mqh similarity index 100% rename from Stg_Meta_Reversal.mqh rename to Stg_Meta_Trend.mqh From 3600e8e2daa6fceab1a4dc0f1960c7b93d73ca97 Mon Sep 17 00:00:00 2001 From: kenorb Date: Sat, 23 Sep 2023 23:54:07 +0100 Subject: [PATCH 2/6] Replaces Reversal with Trend --- Stg_Meta_Trend.mq4 | 2 +- Stg_Meta_Trend.mq5 | 10 +++--- Stg_Meta_Trend.mqh | 85 +++++++++++++++++++++++----------------------- 3 files changed, 48 insertions(+), 49 deletions(-) diff --git a/Stg_Meta_Trend.mq4 b/Stg_Meta_Trend.mq4 index 38cdb8e..e709df9 100644 --- a/Stg_Meta_Trend.mq4 +++ b/Stg_Meta_Trend.mq4 @@ -6,7 +6,7 @@ /** * @file - * Implements Reversal meta strategy. + * Implements Trend meta strategy. */ // Includes the main code. diff --git a/Stg_Meta_Trend.mq5 b/Stg_Meta_Trend.mq5 index 79f8b07..e7ca22a 100644 --- a/Stg_Meta_Trend.mq5 +++ b/Stg_Meta_Trend.mq5 @@ -1,6 +1,6 @@ /** * @file - * Implements Reversal meta strategy. + * Implements Trend meta strategy. */ // Includes conditional compilation directives. @@ -35,10 +35,10 @@ input bool Info_On_Chart = true; // Display info on chart. #include "Stg_Meta_Trend.mqh" // Defines. -#define ea_name "Strategy Meta Reversal" +#define ea_name "Strategy Meta Trend" #define ea_version "2.000" -#define ea_desc "Reversal meta strategy reverses signals of another strategy." -#define ea_link "https://github.com/EA31337/Strategy-Meta_Reversal" +#define ea_desc "Trend meta strategy to filter out signals of other strategies based on the current trend." +#define ea_link "https://github.com/EA31337/Strategy-Meta_Trend" #define ea_author "EA31337 Ltd" // Properties. @@ -64,7 +64,7 @@ int OnInit() { bool _result = true; EAParams ea_params(__FILE__, Log_Level); ea = new EA(ea_params); - _result &= ea.StrategyAdd(Active_Tfs); + _result &= ea.StrategyAdd(Active_Tfs); return (_result ? INIT_SUCCEEDED : INIT_FAILED); } diff --git a/Stg_Meta_Trend.mqh b/Stg_Meta_Trend.mqh index fc62259..0e85d16 100644 --- a/Stg_Meta_Trend.mqh +++ b/Stg_Meta_Trend.mqh @@ -1,75 +1,74 @@ /** * @file - * Implements Reversal meta strategy. + * Implements Trend meta strategy. */ // Prevents processing this includes file multiple times. -#ifndef STG_META_REVERSAL_MQH -#define STG_META_REVERSAL_MQH +#ifndef STG_META_TREND_MQH +#define STG_META_TREND_MQH // User input params. -INPUT2_GROUP("Meta Reversal strategy: main params"); -INPUT2 ENUM_STRATEGY Meta_Reversal_Strategy = STRAT_ATR; // Strategy to reverse signals -INPUT2_GROUP("Meta Reversal strategy: common params"); -INPUT2 float Meta_Reversal_LotSize = 0; // Lot size -INPUT2 int Meta_Reversal_SignalOpenMethod = 0; // Signal open method -INPUT2 float Meta_Reversal_SignalOpenLevel = 0; // Signal open level -INPUT2 int Meta_Reversal_SignalOpenFilterMethod = 32; // Signal open filter method -INPUT2 int Meta_Reversal_SignalOpenFilterTime = 3; // Signal open filter time (0-31) -INPUT2 int Meta_Reversal_SignalOpenBoostMethod = 0; // Signal open boost method -INPUT2 int Meta_Reversal_SignalCloseMethod = 0; // Signal close method -INPUT2 int Meta_Reversal_SignalCloseFilter = 32; // Signal close filter (-127-127) -INPUT2 float Meta_Reversal_SignalCloseLevel = 0; // Signal close level -INPUT2 int Meta_Reversal_PriceStopMethod = 0; // Price limit method -INPUT2 float Meta_Reversal_PriceStopLevel = 2; // Price limit level -INPUT2 int Meta_Reversal_TickFilterMethod = 32; // Tick filter method (0-255) -INPUT2 float Meta_Reversal_MaxSpread = 4.0; // Max spread to trade (in pips) -INPUT2 short Meta_Reversal_Shift = 0; // Shift -INPUT2 float Meta_Reversal_OrderCloseLoss = 30; // Order close loss -INPUT2 float Meta_Reversal_OrderCloseProfit = 30; // Order close profit -INPUT2 int Meta_Reversal_OrderCloseTime = -10; // Order close time in mins (>0) or bars (<0) +INPUT2_GROUP("Meta Trend strategy: main params"); +INPUT2 ENUM_STRATEGY Meta_Trend_Strategy = STRAT_ATR; // Strategy to reverse signals +INPUT2_GROUP("Meta Trend strategy: common params"); +INPUT2 float Meta_Trend_LotSize = 0; // Lot size +INPUT2 int Meta_Trend_SignalOpenMethod = 0; // Signal open method +INPUT2 float Meta_Trend_SignalOpenLevel = 0; // Signal open level +INPUT2 int Meta_Trend_SignalOpenFilterMethod = 32; // Signal open filter method +INPUT2 int Meta_Trend_SignalOpenFilterTime = 3; // Signal open filter time (0-31) +INPUT2 int Meta_Trend_SignalOpenBoostMethod = 0; // Signal open boost method +INPUT2 int Meta_Trend_SignalCloseMethod = 0; // Signal close method +INPUT2 int Meta_Trend_SignalCloseFilter = 32; // Signal close filter (-127-127) +INPUT2 float Meta_Trend_SignalCloseLevel = 0; // Signal close level +INPUT2 int Meta_Trend_PriceStopMethod = 0; // Price limit method +INPUT2 float Meta_Trend_PriceStopLevel = 2; // Price limit level +INPUT2 int Meta_Trend_TickFilterMethod = 32; // Tick filter method (0-255) +INPUT2 float Meta_Trend_MaxSpread = 4.0; // Max spread to trade (in pips) +INPUT2 short Meta_Trend_Shift = 0; // Shift +INPUT2 float Meta_Trend_OrderCloseLoss = 30; // Order close loss +INPUT2 float Meta_Trend_OrderCloseProfit = 30; // Order close profit +INPUT2 int Meta_Trend_OrderCloseTime = -10; // Order close time in mins (>0) or bars (<0) // Structs. // Defines struct with default user strategy values. -struct Stg_Meta_Reversal_Params_Defaults : StgParams { - Stg_Meta_Reversal_Params_Defaults() - : StgParams(::Meta_Reversal_SignalOpenMethod, ::Meta_Reversal_SignalOpenFilterMethod, - ::Meta_Reversal_SignalOpenLevel, ::Meta_Reversal_SignalOpenBoostMethod, - ::Meta_Reversal_SignalCloseMethod, ::Meta_Reversal_SignalCloseFilter, - ::Meta_Reversal_SignalCloseLevel, ::Meta_Reversal_PriceStopMethod, ::Meta_Reversal_PriceStopLevel, - ::Meta_Reversal_TickFilterMethod, ::Meta_Reversal_MaxSpread, ::Meta_Reversal_Shift) { - Set(STRAT_PARAM_LS, Meta_Reversal_LotSize); - Set(STRAT_PARAM_OCL, Meta_Reversal_OrderCloseLoss); - Set(STRAT_PARAM_OCP, Meta_Reversal_OrderCloseProfit); - Set(STRAT_PARAM_OCT, Meta_Reversal_OrderCloseTime); - Set(STRAT_PARAM_SOFT, Meta_Reversal_SignalOpenFilterTime); +struct Stg_Meta_Trend_Params_Defaults : StgParams { + Stg_Meta_Trend_Params_Defaults() + : StgParams(::Meta_Trend_SignalOpenMethod, ::Meta_Trend_SignalOpenFilterMethod, ::Meta_Trend_SignalOpenLevel, + ::Meta_Trend_SignalOpenBoostMethod, ::Meta_Trend_SignalCloseMethod, ::Meta_Trend_SignalCloseFilter, + ::Meta_Trend_SignalCloseLevel, ::Meta_Trend_PriceStopMethod, ::Meta_Trend_PriceStopLevel, + ::Meta_Trend_TickFilterMethod, ::Meta_Trend_MaxSpread, ::Meta_Trend_Shift) { + Set(STRAT_PARAM_LS, Meta_Trend_LotSize); + Set(STRAT_PARAM_OCL, Meta_Trend_OrderCloseLoss); + Set(STRAT_PARAM_OCP, Meta_Trend_OrderCloseProfit); + Set(STRAT_PARAM_OCT, Meta_Trend_OrderCloseTime); + Set(STRAT_PARAM_SOFT, Meta_Trend_SignalOpenFilterTime); } }; -class Stg_Meta_Reversal : public Strategy { +class Stg_Meta_Trend : public Strategy { protected: Ref strat; public: - Stg_Meta_Reversal(StgParams &_sparams, TradeParams &_tparams, ChartParams &_cparams, string _name = "") + Stg_Meta_Trend(StgParams &_sparams, TradeParams &_tparams, ChartParams &_cparams, string _name = "") : Strategy(_sparams, _tparams, _cparams, _name) {} - static Stg_Meta_Reversal *Init(ENUM_TIMEFRAMES _tf = NULL, EA *_ea = NULL) { + static Stg_Meta_Trend *Init(ENUM_TIMEFRAMES _tf = NULL, EA *_ea = NULL) { // Initialize strategy initial values. - Stg_Meta_Reversal_Params_Defaults stg_reversal_defaults; - StgParams _stg_params(stg_reversal_defaults); + Stg_Meta_Trend_Params_Defaults stg_trend_defaults; + StgParams _stg_params(stg_trend_defaults); // Initialize Strategy instance. ChartParams _cparams(_tf, _Symbol); TradeParams _tparams; - Strategy *_strat = new Stg_Meta_Reversal(_stg_params, _tparams, _cparams, "(Meta) Reversal"); + Strategy *_strat = new Stg_Meta_Trend(_stg_params, _tparams, _cparams, "(Meta) Trend"); return _strat; } /** * Event on strategy's init. */ - void OnInit() { SetStrategy(Meta_Reversal_Strategy); } + void OnInit() { SetStrategy(Meta_Trend_Strategy); } /** * Sets strategy. @@ -302,4 +301,4 @@ class Stg_Meta_Reversal : public Strategy { } }; -#endif // STG_META_REVERSAL_MQH +#endif // STG_META_TREND_MQH From 82272dd4c4d4e536738381a0fdacdba52b4c6ffd Mon Sep 17 00:00:00 2001 From: kenorb Date: Sun, 24 Sep 2023 00:21:39 +0100 Subject: [PATCH 3/6] Implements initial strategy logic --- Stg_Meta_Trend.mqh | 58 +++++++++++++++++++++++++++++++++++----------- 1 file changed, 44 insertions(+), 14 deletions(-) diff --git a/Stg_Meta_Trend.mqh b/Stg_Meta_Trend.mqh index 0e85d16..d550880 100644 --- a/Stg_Meta_Trend.mqh +++ b/Stg_Meta_Trend.mqh @@ -9,7 +9,7 @@ // User input params. INPUT2_GROUP("Meta Trend strategy: main params"); -INPUT2 ENUM_STRATEGY Meta_Trend_Strategy = STRAT_ATR; // Strategy to reverse signals +INPUT2 ENUM_STRATEGY Meta_Trend_Strategy = STRAT_ATR; // Strategy to filter by trend INPUT2_GROUP("Meta Trend strategy: common params"); INPUT2 float Meta_Trend_LotSize = 0; // Lot size INPUT2 int Meta_Trend_SignalOpenMethod = 0; // Signal open method @@ -25,12 +25,16 @@ INPUT2 float Meta_Trend_PriceStopLevel = 2; // Price limit level INPUT2 int Meta_Trend_TickFilterMethod = 32; // Tick filter method (0-255) INPUT2 float Meta_Trend_MaxSpread = 4.0; // Max spread to trade (in pips) INPUT2 short Meta_Trend_Shift = 0; // Shift -INPUT2 float Meta_Trend_OrderCloseLoss = 30; // Order close loss -INPUT2 float Meta_Trend_OrderCloseProfit = 30; // Order close profit -INPUT2 int Meta_Trend_OrderCloseTime = -10; // Order close time in mins (>0) or bars (<0) +INPUT2 float Meta_Trend_OrderCloseLoss = 200; // Order close loss +INPUT2 float Meta_Trend_OrderCloseProfit = 200; // Order close profit +INPUT2 int Meta_Trend_OrderCloseTime = 2880; // Order close time in mins (>0) or bars (<0) +INPUT_GROUP("Meta Trend strategy: RSI oscillator params"); +INPUT int Meta_Trend_RSI_Period = 16; // Period +INPUT ENUM_APPLIED_PRICE Meta_Trend_RSI_Applied_Price = PRICE_WEIGHTED; // Applied Price +INPUT int Meta_Trend_RSI_Shift = 0; // Shift +INPUT ENUM_IDATA_SOURCE_TYPE Meta_Trend_RSI_SourceType = IDATA_BUILTIN; // Source type // Structs. - // Defines struct with default user strategy values. struct Stg_Meta_Trend_Params_Defaults : StgParams { Stg_Meta_Trend_Params_Defaults() @@ -38,11 +42,11 @@ struct Stg_Meta_Trend_Params_Defaults : StgParams { ::Meta_Trend_SignalOpenBoostMethod, ::Meta_Trend_SignalCloseMethod, ::Meta_Trend_SignalCloseFilter, ::Meta_Trend_SignalCloseLevel, ::Meta_Trend_PriceStopMethod, ::Meta_Trend_PriceStopLevel, ::Meta_Trend_TickFilterMethod, ::Meta_Trend_MaxSpread, ::Meta_Trend_Shift) { - Set(STRAT_PARAM_LS, Meta_Trend_LotSize); - Set(STRAT_PARAM_OCL, Meta_Trend_OrderCloseLoss); - Set(STRAT_PARAM_OCP, Meta_Trend_OrderCloseProfit); - Set(STRAT_PARAM_OCT, Meta_Trend_OrderCloseTime); - Set(STRAT_PARAM_SOFT, Meta_Trend_SignalOpenFilterTime); + Set(STRAT_PARAM_LS, ::Meta_Trend_LotSize); + Set(STRAT_PARAM_OCL, ::Meta_Trend_OrderCloseLoss); + Set(STRAT_PARAM_OCP, ::Meta_Trend_OrderCloseProfit); + Set(STRAT_PARAM_OCT, ::Meta_Trend_OrderCloseTime); + Set(STRAT_PARAM_SOFT, ::Meta_Trend_SignalOpenFilterTime); } }; @@ -68,7 +72,16 @@ class Stg_Meta_Trend : public Strategy { /** * Event on strategy's init. */ - void OnInit() { SetStrategy(Meta_Trend_Strategy); } + void OnInit() { + SetStrategy(Meta_Trend_Strategy); + // Initialize indicators. + { + IndiRSIParams _indi_params(::Meta_Trend_RSI_Period, ::Meta_Trend_RSI_Applied_Price, ::Meta_Trend_RSI_Shift); + _indi_params.SetDataSourceType(::Meta_Trend_RSI_SourceType); + _indi_params.SetTf(PERIOD_D1); + SetIndicator(new Indi_RSI(_indi_params)); + } + } /** * Sets strategy. @@ -132,6 +145,9 @@ class Stg_Meta_Trend : public Strategy { case STRAT_DEMARKER: _result &= StrategyAdd(_tf, _magic_no, _sid); break; + case STRAT_DPO: + _result &= StrategyAdd(_tf, _magic_no, _sid); + break; case STRAT_ENVELOPES: _result &= StrategyAdd(_tf, _magic_no, _sid); break; @@ -156,6 +172,9 @@ class Stg_Meta_Trend : public Strategy { case STRAT_MA: _result &= StrategyAdd(_tf, _magic_no, _sid); break; + case STRAT_MA_BREAKOUT: + _result &= StrategyAdd(_tf, _magic_no, _sid); + break; case STRAT_MA_CROSS_PIVOT: _result &= StrategyAdd(_tf, _magic_no, _sid); break; @@ -272,15 +291,26 @@ class Stg_Meta_Trend : public Strategy { * Check strategy's opening signal. */ bool SignalOpen(ENUM_ORDER_TYPE _cmd, int _method, float _level = 0.0f, int _shift = 0) { - bool _result = false; + bool _result = true; if (!strat.IsSet()) { // Returns false when strategy is not set. - return _result; + return false; + } + IndicatorBase *_indi = GetIndicator(); + // uint _ishift = _indi.GetShift(); + uint _ishift = _shift; + switch (_cmd) { + case ORDER_TYPE_BUY: + _result &= _indi[_shift][0] >= 50 && _indi[_shift + 1][0] >= 50; + break; + case ORDER_TYPE_SELL: + _result &= _indi[_shift][0] <= 50 && _indi[_shift + 1][0] <= 50; + break; } _level = _level == 0.0f ? strat.Ptr().Get(STRAT_PARAM_SOL) : _level; _method = _method == 0 ? strat.Ptr().Get(STRAT_PARAM_SOM) : _method; _shift = _shift == 0 ? strat.Ptr().Get(STRAT_PARAM_SHIFT) : _shift; - _result |= strat.Ptr().SignalOpen(Order::NegateOrderType(_cmd), _method, _level, _shift); + _result &= strat.Ptr().SignalOpen(_cmd, _method, _level, _shift); return _result; } From 7726c26ab34228eb1d28465a7edb524106cdc403 Mon Sep 17 00:00:00 2001 From: kenorb Date: Sun, 24 Sep 2023 00:27:22 +0100 Subject: [PATCH 4/6] Sets Stochastic by default --- Stg_Meta_Trend.mqh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Stg_Meta_Trend.mqh b/Stg_Meta_Trend.mqh index d550880..9e4db3c 100644 --- a/Stg_Meta_Trend.mqh +++ b/Stg_Meta_Trend.mqh @@ -9,7 +9,7 @@ // User input params. INPUT2_GROUP("Meta Trend strategy: main params"); -INPUT2 ENUM_STRATEGY Meta_Trend_Strategy = STRAT_ATR; // Strategy to filter by trend +INPUT2 ENUM_STRATEGY Meta_Trend_Strategy = STRAT_STOCHASTIC; // Strategy to filter by trend INPUT2_GROUP("Meta Trend strategy: common params"); INPUT2 float Meta_Trend_LotSize = 0; // Lot size INPUT2 int Meta_Trend_SignalOpenMethod = 0; // Signal open method From c685b66aff4f756f89d5356ad729c8b04fef26fd Mon Sep 17 00:00:00 2001 From: kenorb Date: Sun, 24 Sep 2023 00:32:37 +0100 Subject: [PATCH 5/6] Sets DeMarker by default --- Stg_Meta_Trend.mqh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Stg_Meta_Trend.mqh b/Stg_Meta_Trend.mqh index 9e4db3c..790dadd 100644 --- a/Stg_Meta_Trend.mqh +++ b/Stg_Meta_Trend.mqh @@ -9,7 +9,7 @@ // User input params. INPUT2_GROUP("Meta Trend strategy: main params"); -INPUT2 ENUM_STRATEGY Meta_Trend_Strategy = STRAT_STOCHASTIC; // Strategy to filter by trend +INPUT2 ENUM_STRATEGY Meta_Trend_Strategy = STRAT_DEMARKER; // Strategy to filter by trend INPUT2_GROUP("Meta Trend strategy: common params"); INPUT2 float Meta_Trend_LotSize = 0; // Lot size INPUT2 int Meta_Trend_SignalOpenMethod = 0; // Signal open method From 28825e363c3180aac4a69aa7d22c20f3fb7b470a Mon Sep 17 00:00:00 2001 From: kenorb Date: Sun, 24 Sep 2023 00:41:06 +0100 Subject: [PATCH 6/6] Revert "Sets DeMarker by default" This reverts commit 4ea7f8f11bb817418c22c37d329e101b325325b6. --- Stg_Meta_Trend.mqh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Stg_Meta_Trend.mqh b/Stg_Meta_Trend.mqh index 790dadd..9e4db3c 100644 --- a/Stg_Meta_Trend.mqh +++ b/Stg_Meta_Trend.mqh @@ -9,7 +9,7 @@ // User input params. INPUT2_GROUP("Meta Trend strategy: main params"); -INPUT2 ENUM_STRATEGY Meta_Trend_Strategy = STRAT_DEMARKER; // Strategy to filter by trend +INPUT2 ENUM_STRATEGY Meta_Trend_Strategy = STRAT_STOCHASTIC; // Strategy to filter by trend INPUT2_GROUP("Meta Trend strategy: common params"); INPUT2 float Meta_Trend_LotSize = 0; // Lot size INPUT2 int Meta_Trend_SignalOpenMethod = 0; // Signal open method