Skip to content

Commit

Permalink
Uses StrategiesMetaManager when __strategies_meta__ is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
kenorb committed Oct 28, 2023
1 parent 83919f7 commit faec77d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 0 additions & 4 deletions Stg_Meta_RSI.mq5
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@
#include "../enum.h"
#include "../includes.h"
#include "../manager.h"
#else
#include <EA31337-strategies-meta/enum.h>
#include <EA31337-strategies-meta/includes.h>
#include <EA31337-strategies-meta/manager.h>
#endif

// Inputs.
Expand Down
2 changes: 2 additions & 0 deletions Stg_Meta_RSI.mqh
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,11 @@ class Stg_Meta_RSI : public Strategy {
bool StrategyAdd(ENUM_STRATEGY _sid, long _index = -1) {
ENUM_TIMEFRAMES _tf = Get<ENUM_TIMEFRAMES>(STRAT_PARAM_TF);
Ref<Strategy> _strat = StrategiesManager::StrategyInitByEnum(_sid, _tf);
#ifdef __strategies_meta__
if (!_strat.IsSet()) {
_strat = StrategiesMetaManager::StrategyInitByEnum((ENUM_STRATEGY_META)_sid, _tf);
}
#endif
if (_strat.IsSet()) {
_strat.Ptr().Set<long>(STRAT_PARAM_ID, Get<long>(STRAT_PARAM_ID));
_strat.Ptr().Set<ENUM_TIMEFRAMES>(STRAT_PARAM_TF, _tf);
Expand Down

0 comments on commit faec77d

Please sign in to comment.