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

Exp_CaudateXPeriodCandle_Tm_Plus - MetaTrader 5 Expert

author EAcpu | 5 reads | 0 comments |

Exp_CaudateXPeriodCandle_Tm_Plus - expert for MetaTrader 5

Exp_CaudateXPeriodCandle_Tm_Plus - expert for MetaTrader 5

Trading systems based on tailed X-period candles can set indicator signals for fixed holding times. If a tail candlestick appears, a signal is formed at the close of the bar. Once the position holding time exceeds the preset fixed limit, the position will be closed immediately:

 Input boolean time trading = true ; //enable closing positions by time
Input unit n time = 240 ; //Position time (minutes)

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

Please note that the Trade Algorithms .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. You can download more variants of this library via the following link: Trading Algorithms .

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_CaudateXPeriodCandle_Tm_Plus - expert for MetaTrader 5

Figure 1. Example of trade on chart

2016 GBPUSD H4 test results:

Exp_CaudateXPeriodCandle_Tm_Plus - expert for MetaTrader 5

Figure 2. Test result graph


Attachment download

📎 Exp_CaudateXPeriodCandle_Tm_Plus.mq5 (17.18 KB)

📎 SmoothAlgorithms.mqh (130.2 KB)

📎 TradeAlgorithms.mqh (223.62 KB)

📎 CaudateXPeriodCandle.mq5 (21.42 KB)

Source: MQL5 #21118

Verification code Refresh