How to get the high of the previous month on a 15 minute time frame ?

 

Hello traders .

I'm looking for a way to get the high and the low of the previous months and draw them .

Also the high and the low of the previous quarter .

 
  1. Look at the previous MN1, but then you have to deal with 4066 / synchronization issue.

    On MT4: Unless the current chart is that specific symbol(s)/TF(s) referenced, you must handle 4066/4073 errors before accessing candle/indicator values.
              Download history in MQL4 EA - Forex Calendar - MQL4 programming forum - Page 3 #26.4 (2019)

    On MT5: Unless the current chart is that specific pair/TF, you must synchronize the terminal Data from the Server before accessing candle/indicator values.
              Error 4806 while using CopyBuffer() - Expert Advisors and Automated Trading - MQL5 programming forum #10 (2020.12.15)
              Is it mystical?! It is! - Withdraw - Technical Indicators - MQL5 programming forum (2019)
              Timeseries and Indicators Access / Data Access - Reference on algorithmic/automated trading language for MetaTrader 5
              Synchronize Server Data with Terminal Data - Symbols - General - MQL5 programming forum #2 (2018)
              SymbolInfoInteger doesn't work - Symbols - General - MQL5 programming forum (2019)

  2. Find the last candle of the month, first candle and use iHighest.

 
Loop on timeseies access from first to last dates until both comes up , then  2.
 
Azar Malek:

Hello traders .

I'm looking for a way to get the high and the low of the previous months and draw them .

Also the high and the low of the previous quarter .

It is not difficult, use the function above, setting your period to monthly, for quarter you could create buffer holding 4 values, comparing to get the highest ... I have not seen any inbuilt function for quarterly, you could write yours.

 
Azar Malek:

Hello traders .

I'm looking for a way to get the high and the low of the previous months and draw them .

Also the high and the low of the previous quarter .

Use Rectangle from to

Rectangle from to

Рис. 1. Rectangle from to

Reason: