Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

period ConverterALL - MetaTrader 4 Script - MT4/MT5 Resource

author EAcpu | 5 reads | 0 comments |

The second version of the script is used to convert the M1 timeframe chart to all other charts of the standard timeframe and recreate the M1 timeframe chart.

Advanced functionality of chart conversion for M1 time range charts depends on the ReCreateM1Volume input parameter. It can take the following values:

Default is -2 or less (-3, -4, etc.). The script simply converts the М1 timeframe chart to all other charts of the standard timeframe;
-1. The script recreates the M1 timeframe chart according to the following rules: If the volume of bar М1 is equal to 1, the volume will be recalculated based on the inequality rules of open, close, high, low. For example: the opening price is 1.2524, the closing price is 1.2530, the highest price is 1.2540, and the lowest price is 1.2524. The new quantity will be set to 3 (i.e. there are 3 different prices in the bar). At the same time, the closing price must not be equal to the highest price and the lowest price. Conversions to all other timeframes will then be performed;
0: The script performs the recreation of the М1 timeframe according to the same rules as "-1", but absolutely for all bars ignoring their initial volume. Conversions to all other timeframes will then be performed;
1: (2, 3, 4, etc.). The script performs the re-creation of the М1 timeframe, sets the user-specified volume for all М1 bars,
That is, the value of the ReCreateM1Volume input parameter. Conversions to all other timeframes will then be performed.

Finally, when recreating using the M1 timeframe, make sure to restart the terminal so that the recreated quotes appear in the history center.

Good luck.


Attachment download

📎period_converterALL.mq4 (7.81 KB)

Source: MQL5 #7055

Verification code Refresh