Specification
Expand ENUM_TIMEFRAMES predefined timeframes PERIOD
I would like Metatrader 5 to behave like it can handle custom time frame.
I don’t think this can be done without a native MT5 update by MetaQuotes
but maybe you know how?
I would like ENUM_TIMEFRAMES to include custom PERIOD
https://www.mql5.com/en/docs/constants/chartconstants/enum_timeframes
i.e.
PERIOD_T1 (1 Tick)
PERIOD_T5 (5 Tick)
PERIOD_S1 (1 Second)
PERIOD_S5 (5 Second)
etc.
You get the idea.
My goal is to be able to use any PERIOD in any Indicators in an EA to do Multi-Instrument Real-Time-Trading as well as in Strategy Tester's backtesting.
For example, with an EA like the code below, the ENUM_TIMEFRAMES could be any PERIOD.
(I use the indicator RSI, PERIOD_T1 and PERIOD_S1 just for illustration but it could be any indicator or period.)
i.e.
double RSI1[]; int EURUSD_handle = 0; double RSI2[]; int GBPUSD_handle = 0; ... EURUSD_handle=iRSI(EURUSD,PERIOD_T1,ma_period,applied_price); GBPUSD_handle=iRSI(GBPUSD,PERIOD_S1,ma_period,applied_price); ... if ( (RSI1[0] < 70) && (RSI2[0] > 30) )
Please make sure you understand what I’m asking for before replying.
Reply by telling me your approach to solve this problem.