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

Exp_SpearmanRankCorrelation_Histogram_TimeWeekPeriod - MetaTrader 5 Expert

author EAcpu | 2 reads | 0 comments |

Exp_SpearmanRankCorrelation_Histogram_TimeWeekPeriod - expert for MetaTrader 5

Expert Advisor Exp_SpearmanRankCorrelation_Histogram adds the option to trade only within the weekly range, the boundaries of which are specified in the EA's input settings:

 Input boolean time trading = true ; //Allow trading by time interval
//----
Enter DAYS_OF_WEEK to start D=ENUM_DAY_OF_WEEK_2; //Transaction starts (day of the week)
Enter HOURS start H=ENUM_HOUR_8; //Transaction starts (hour)
Enter the minute StartM=ENUM_MINUT_0; //Transaction starts (minutes)
Enter the number of seconds to start S=ENUM_SECOND_0; //Transaction starts (second time)
//----
Enter DAYS_OF_WEEK to end D=ENUM_DAY_OF_WEEK_5; //Transaction ends (day of the week)
Enter the hour EndH=ENUM_HOUR_20; //End of transaction (hour)
Enter minutes EndM=ENUM_MINUT_59; //End of transaction (minutes)
Enter SECONDS EndS=ENUM_SECOND_40; //Transaction ends (second time)

In order for the generated EA to run correctly, the compiled SpearmanRankCorrelation_Histogram.ex5 indicator file should be located in the <terminal data directory>\MQL5\indicator folder.

Please note that the TradeAlgorithms.mqh library file allows trading Expert Advisors with non-zero spreads and the option to set Stop Loss and Take Profit along with opening positions with brokers that offer the following services.

The input parameters of the default Expert Advisor were used in the test shown below. Stop Loss and Take Profit were not used during testing.

Exp_SpearmanRankCorrelation_Histogram_TimeWeekPeriod - expert for MetaTrader 5

Figure 1. Example of trades within the interval within the last week of the chart


Attachment download

📎 tradealgorithms.mqh (242.04 KB)

📎 spearmanrankcorrelation_histogram.mq5 (17.83 KB)

📎 exp_spearmanrankcorrelation_histogram_timeweekperiod.mq5 (22.97 KB)

Source: MQL5 #23342

Verification code Refresh