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

OpenTime 2 - MetaTrader 5 Expert | MT5 EA Download - MetaTrader 5 Resources

author EAcpu | 4 reads | 0 comments |

OpenTime 2 - expert for MetaTrader 5

The EA is open for further development version 1.

Both intervals use the same lot and trailing functions. The EA may have only one position per time interval.

A unique magic number is generated for each time interval. The magic number specifying interval #1 magic is in the input argument :

 Enter ultra-short InpTakeProfitTwo = 90 ; // Take profit interval #2 (in pips)
Enter string _____3_____= "Advisor Options" ; Enter m_magic = 714479490 ; // MagicNumber Interval #1 (Interval #2 == MagicNumber+1)
//---
Enter own m_slippage = 30 ;

This magic number is stored in the internal m_magic_one variable, and the magic number for range #2 is stored in the internal m_magic_two variable, which is greater than m_magic_one by one:

 //+------------------------------------------------------------------+
//---
#define m_magic_one m_magic #define m_magic_two m_magic_one+ 1
//---
#Include <Trading\PositionInfo.mqh>


EURUSD, M30 test results:

OpenTime 2 - expert for MetaTrader 5


Attachment download

📎 opentime_2.mq5 (45.87 KB)

Source: MQL5 #20087

Verification code Refresh