From 10eb54c96d612e49d9cf1e6e1013f3d06467a4d0 Mon Sep 17 00:00:00 2001 From: kenorb Date: Sat, 30 Oct 2021 22:32:08 +0100 Subject: [PATCH 1/5] Updates classes and strategies --- src/EA31337-Libre.mq5 | 5 +---- src/include/classes | 2 +- src/include/includes.h | 42 +++--------------------------------------- src/include/strategies | 2 +- 4 files changed, 6 insertions(+), 45 deletions(-) diff --git a/src/EA31337-Libre.mq5 b/src/EA31337-Libre.mq5 index 98b8dc7..aaa0752 100644 --- a/src/EA31337-Libre.mq5 +++ b/src/EA31337-Libre.mq5 @@ -70,15 +70,12 @@ void OnDeinit(const int reason) { DeinitVars(); } */ void OnTick() { EAProcessResult _result = ea.ProcessTick(); - if (_result.stg_processed || ea.GetState().new_periods > 0) { + if (_result.stg_processed > 0) { if (EA_DisplayDetailsOnChart && (Terminal::IsVisualMode() || Terminal::IsRealtime())) { string _text = StringFormat("%s v%s by %s (%s)\n", ea_name, ea_version, ea_author, ea_link); _text += SerializerConverter::FromObject(ea, SERIALIZER_FLAG_INCLUDE_DYNAMIC).ToString(); Comment(_text); } - if (ea.GetState().new_periods > 0) { - ea.GetLogger().Flush(10); - } } } diff --git a/src/include/classes b/src/include/classes index 502cc1f..2cc00a6 160000 --- a/src/include/classes +++ b/src/include/classes @@ -1 +1 @@ -Subproject commit 502cc1f623da9e487262af1d1730c0619097736a +Subproject commit 2cc00a69bce86b29b6bf2d3648e9fa0e51256196 diff --git a/src/include/includes.h b/src/include/includes.h index 0836b95..2f3388c 100644 --- a/src/include/includes.h +++ b/src/include/includes.h @@ -35,45 +35,9 @@ #include "classes/Trade.mqh" // Includes indicator classes. -#include "classes/Indicators/Indi_AC.mqh" -#include "classes/Indicators/Indi_AD.mqh" -#include "classes/Indicators/Indi_ADX.mqh" -#include "classes/Indicators/Indi_ADXW.mqh" -#include "classes/Indicators/Indi_AMA.mqh" -#include "classes/Indicators/Indi_AO.mqh" -#include "classes/Indicators/Indi_ASI.mqh" -#include "classes/Indicators/Indi_ATR.mqh" -#include "classes/Indicators/Indi_Alligator.mqh" -#include "classes/Indicators/Indi_BWMFI.mqh" -#include "classes/Indicators/Indi_Bands.mqh" -#include "classes/Indicators/Indi_BearsPower.mqh" -#include "classes/Indicators/Indi_BullsPower.mqh" -#include "classes/Indicators/Indi_CCI.mqh" -#include "classes/Indicators/Indi_CHO.mqh" -#include "classes/Indicators/Indi_DEMA.mqh" -#include "classes/Indicators/Indi_DeMarker.mqh" -#include "classes/Indicators/Indi_Envelopes.mqh" -#include "classes/Indicators/Indi_Force.mqh" -#include "classes/Indicators/Indi_Fractals.mqh" -#include "classes/Indicators/Indi_Gator.mqh" -#include "classes/Indicators/Indi_HeikenAshi.mqh" -#include "classes/Indicators/Indi_Ichimoku.mqh" -#include "classes/Indicators/Indi_MA.mqh" -#include "classes/Indicators/Indi_MACD.mqh" -#include "classes/Indicators/Indi_MFI.mqh" -#include "classes/Indicators/Indi_Momentum.mqh" -#include "classes/Indicators/Indi_OBV.mqh" -#include "classes/Indicators/Indi_OsMA.mqh" -#include "classes/Indicators/Indi_Pattern.mqh" -#include "classes/Indicators/Indi_Pivot.mqh" -#include "classes/Indicators/Indi_Price.mqh" -#include "classes/Indicators/Indi_RSI.mqh" -#include "classes/Indicators/Indi_RVI.mqh" -#include "classes/Indicators/Indi_SAR.mqh" -#include "classes/Indicators/Indi_StdDev.mqh" -#include "classes/Indicators/Indi_Stochastic.mqh" -#include "classes/Indicators/Indi_WPR.mqh" -#include "classes/Indicators/Indi_ZigZag.mqh" +#include "classes/Indicators/Bitwise/indicators.h" +#include "classes/Indicators/Price/indicators.h" +#include "classes/Indicators/indicators.h" // Enums. #include "enum.h" diff --git a/src/include/strategies b/src/include/strategies index e5360dd..47cbb92 160000 --- a/src/include/strategies +++ b/src/include/strategies @@ -1 +1 @@ -Subproject commit e5360ddd6d84d988bbac29fab2799a237632048b +Subproject commit 47cbb92cd2e87e62ee03ab0daae5111d236b45f9 From 374647e7aa4238e455d43d93344e323f3acbb894 Mon Sep 17 00:00:00 2001 From: kenorb Date: Sat, 30 Oct 2021 23:36:58 +0100 Subject: [PATCH 2/5] Adds Pinbar strategy --- src/EA31337-Libre.mq5 | 2 ++ src/include/enum.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/EA31337-Libre.mq5 b/src/EA31337-Libre.mq5 index aaa0752..3544c40 100644 --- a/src/EA31337-Libre.mq5 +++ b/src/EA31337-Libre.mq5 @@ -294,6 +294,8 @@ bool EAStrategyAdd(ENUM_STRATEGY _stg, int _tfs) { return ea.StrategyAdd(_tfs, _magic_no, _stg); case STRAT_PATTERN: return ea.StrategyAdd(_tfs, _magic_no, _stg); + case STRAT_PINBAR: + return ea.StrategyAdd(_tfs, _magic_no, _stg); case STRAT_PIVOT: return ea.StrategyAdd(_tfs, _magic_no, _stg); case STRAT_RSI: diff --git a/src/include/enum.h b/src/include/enum.h index 40beba6..f7bc24d 100644 --- a/src/include/enum.h +++ b/src/include/enum.h @@ -50,6 +50,7 @@ enum ENUM_STRATEGY { // Define list of strategies. STRAT_MOMENTUM, // Momentum STRAT_OBV, // OBV STRAT_OSMA, // OSMA + STRAT_PINBAR, // Pinbar STRAT_PATTERN, // Pattern STRAT_PIVOT, // Pivot STRAT_RSI, // RSI From 92513d3e96eaa223e859cd7b4a644baa5aac5052 Mon Sep 17 00:00:00 2001 From: kenorb Date: Sat, 30 Oct 2021 23:37:38 +0100 Subject: [PATCH 3/5] Updates version to v1.009 --- src/EA31337-Libre.mqproj | 2 +- src/include/define.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/EA31337-Libre.mqproj b/src/EA31337-Libre.mqproj index 329f021..4d9fc76 100644 --- a/src/EA31337-Libre.mqproj +++ b/src/EA31337-Libre.mqproj @@ -3,7 +3,7 @@ "program_type":"expert", "copyright" :"Copyright 2016-2021, EA31337 Ltd", "link" :"https:\/\/github.com\/EA31337\/EA31337-Libre", - "version" :"1.008", + "version" :"1.009", "description" :"Forex trading robot", "optimize" :"0", "fpzerocheck" :"1", diff --git a/src/include/define.h b/src/include/define.h index 767b9d7..1495772 100644 --- a/src/include/define.h +++ b/src/include/define.h @@ -21,7 +21,7 @@ // EA defines. #define ea_name "EA31337 Libre" -#define ea_version "1.008" +#define ea_version "1.009" #define ea_desc "Forex trading robot" #define ea_link "https://github.com/EA31337/EA31337-Libre" #define ea_author "kenorb" From 112eba547e73f71237877eee5b68a4bc97976e11 Mon Sep 17 00:00:00 2001 From: kenorb Date: Sun, 7 Nov 2021 22:43:36 +0000 Subject: [PATCH 4/5] Updates classes and strategies to tag release --- src/EA31337-Libre.mq5 | 2 -- src/include/classes | 2 +- src/include/strategies | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/EA31337-Libre.mq5 b/src/EA31337-Libre.mq5 index 3544c40..ee70041 100644 --- a/src/EA31337-Libre.mq5 +++ b/src/EA31337-Libre.mq5 @@ -170,8 +170,6 @@ bool DisplayStartupInfo(bool _startup = false, string sep = "\n") { _output += "TERMINAL: " + ea.GetTerminal().ToString() + sep; _output += "ACCOUNT: " + ea.Account().ToString() + sep; _output += "EA: " + ea.ToString() + sep; - _output += "SYMBOL: " + ea.SymbolInfo().ToString() + sep; - _output += "MARKET: " + ea.Market().ToString() + sep; if (_startup) { if (ea.GetState().IsTradeAllowed()) { if (!Terminal::HasError()) { diff --git a/src/include/classes b/src/include/classes index 2cc00a6..86dc933 160000 --- a/src/include/classes +++ b/src/include/classes @@ -1 +1 @@ -Subproject commit 2cc00a69bce86b29b6bf2d3648e9fa0e51256196 +Subproject commit 86dc933a1ecd854c93b9b98e87326507d8e58188 diff --git a/src/include/strategies b/src/include/strategies index 47cbb92..52c468d 160000 --- a/src/include/strategies +++ b/src/include/strategies @@ -1 +1 @@ -Subproject commit 47cbb92cd2e87e62ee03ab0daae5111d236b45f9 +Subproject commit 52c468d0afa5c09362908b81ccdb5cf8847b1de9 From ce6b57e2a54848b482c3fa810381cbd1fc630199 Mon Sep 17 00:00:00 2001 From: kenorb Date: Sun, 7 Nov 2021 22:52:07 +0000 Subject: [PATCH 5/5] Adds logs to chart comments --- src/EA31337-Libre.mq5 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/EA31337-Libre.mq5 b/src/EA31337-Libre.mq5 index ee70041..36854cd 100644 --- a/src/EA31337-Libre.mq5 +++ b/src/EA31337-Libre.mq5 @@ -70,10 +70,11 @@ void OnDeinit(const int reason) { DeinitVars(); } */ void OnTick() { EAProcessResult _result = ea.ProcessTick(); - if (_result.stg_processed > 0) { + if (_result.stg_processed_periods > 0) { if (EA_DisplayDetailsOnChart && (Terminal::IsVisualMode() || Terminal::IsRealtime())) { string _text = StringFormat("%s v%s by %s (%s)\n", ea_name, ea_version, ea_author, ea_link); _text += SerializerConverter::FromObject(ea, SERIALIZER_FLAG_INCLUDE_DYNAMIC).ToString(); + _text += ea.GetLogger().ToString(); Comment(_text); } }