Skip to content

Commit

Permalink
Merge pull request #28 from EA31337/dev
Browse files Browse the repository at this point in the history
Development enhancements
  • Loading branch information
kenorb authored Nov 7, 2021
2 parents 590bc33 + ce6b57e commit e6a37f9
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 49 deletions.
10 changes: 4 additions & 6 deletions src/EA31337-Libre.mq5
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,13 @@ 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_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<SerializerJson>();
_text += ea.GetLogger().ToString();
Comment(_text);
}
if (ea.GetState().new_periods > 0) {
ea.GetLogger().Flush(10);
}
}
}

Expand Down Expand Up @@ -173,8 +171,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()) {
Expand Down Expand Up @@ -296,6 +292,8 @@ bool EAStrategyAdd(ENUM_STRATEGY _stg, int _tfs) {
return ea.StrategyAdd<Stg_OsMA>(_tfs, _magic_no, _stg);
case STRAT_PATTERN:
return ea.StrategyAdd<Stg_Pattern>(_tfs, _magic_no, _stg);
case STRAT_PINBAR:
return ea.StrategyAdd<Stg_Pinbar>(_tfs, _magic_no, _stg);
case STRAT_PIVOT:
return ea.StrategyAdd<Stg_Pivot>(_tfs, _magic_no, _stg);
case STRAT_RSI:
Expand Down
2 changes: 1 addition & 1 deletion src/EA31337-Libre.mqproj
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/include/classes
Submodule classes updated 190 files
2 changes: 1 addition & 1 deletion src/include/define.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions src/include/enum.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
42 changes: 3 additions & 39 deletions src/include/includes.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/include/strategies
Submodule strategies updated 54 files
+5 −40 .github/Test.mq5
+13 −10 .github/workflows/compile.yml
+12 −0 .gitmodules
+3 −3 .pre-commit-config.yaml
+1 −1 AC
+1 −1 AD
+1 −1 ADX
+1 −1 AMA
+1 −1 ASI
+1 −1 ATR
+1 −0 ATR_MA_Trend
+1 −1 Alligator
+1 −1 Awesome
+1 −1 BWMFI
+1 −1 Bands
+1 −1 BearsPower
+1 −1 BullsPower
+1 −1 CCI
+1 −1 Chaikin
+1 −1 DEMA
+1 −1 DeMarker
+1 −1 Demo
+1 −1 ElliottWave
+1 −1 Envelopes
+1 −1 Force
+1 −1 Fractals
+1 −1 Gator
+1 −1 HeikenAshi
+1 −1 Ichimoku
+1 −1 MA
+1 −1 MACD
+1 −1 MFI
+1 −1 Momentum
+1 −1 OBV
+1 −1 OsMA
+1 −1 Pattern
+1 −0 Pinbar
+1 −1 Pivot
+49 −0 README.md
+1 −1 RSI
+1 −1 RVI
+1 −1 SAR
+1 −1 SAWA
+1 −1 SVE_Bollinger_Bands
+1 −1 StdDev
+1 −1 Stochastic
+1 −0 SuperTrend
+1 −1 TMAT_SVEBB
+1 −0 TMA_CG
+1 −1 TMA_True
+1 −1 WPR
+1 −1 ZigZag
+27 −18 enum.h
+4 −0 strategies.h

0 comments on commit e6a37f9

Please sign in to comment.