#ifndef LIB_MQLPLUS_MQL4_COMPATIBILITY_MQH_INCLUDED #define LIB_MQLPLUS_MQL4_COMPATIBILITY_MQH_INCLUDED #property version "1.0"; #property strict /********************************************************************************** * Copyright (C) 2010-2022 Dominik Egert * * This file is the MQL4 backward compatibility include file. * * MQLplus, including this file may not be copied and/or distributed * without explecit permit by the author. * Author Dominik Egert / Freie Netze UG. ********************************************************************************** * * Version: 1.0 * State: development * * File information * ================ * * * */ #ifdef DBG_MSG_TRACE_FILE_LOADER DBG_MSG_TRACE_FILE_LOADER; #endif ///////////////////////////////////////////////////////////////////////////////////////////////////// // // MQL4 namespace compatibility // #ifdef __MQL5__ #ifndef LIB_NAMESPACE #define LIB_NAMESPACE(x, y) x::y #endif #ifndef LIB_NAMESPACE_DEF #define LIB_NAMESPACE_DEF(x, y) y #endif #else #ifndef __MQL4_COMPATIBILITY_CODE__ #define __MQL4_COMPATIBILITY_CODE__ #endif #ifndef __MQLPLUS_MQL4_COMPATIBLITY__ #define __MQLPLUS_MQL4_COMPATIBLITY__ #endif #ifndef LIB_NAMESPACE #define LIB_NAMESPACE(x, y) x##_##y #endif #ifndef LIB_NAMESPACE_DEF #define LIB_NAMESPACE_DEF(x, y) LIB_NAMESPACE(x, y) #endif #endif // ///////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////// // // Library namespace handler macro // #ifndef LIB_MQLPLUS_LIBRARY_PREFIX #define LIB_MQLPLUS_LIBRARY_PREFIX MQLplus #endif #ifdef LIB_NAMESPACE_ADD #undef LIB_NAMESPACE_ADD #endif #define LIB_NAMESPACE_ADD(x) x #ifndef __MQL4_COMPATIBILITY_CODE__ #undef LIB_NAMESPACE_ADD #define LIB_NAMESPACE_ADD(x) LIB_MQLPLUS_LIBRARY_PREFIX::x #endif // ///////////////////////////////////////////////////////////////////////////////////////////////////// //*********************************************************************************************************************************************************/ // // BEGIN MQL4 compatibility additions // #ifdef __MQL4_COMPATIBILITY_CODE__ ///////////////////////////////////////////////////////////////////////////////////////////////////// // // Include MQL4 compatibility // // This provides replacements, as far as possible, for functions // supported by MQL5, missing in MQL4. // // This include should provide compatibility to run MQL5-Code on // MQL$ Terminals. // // Not all functionality is supported by MQL4, thus will give journal prints // to function calls, not supported by MQL4, and which could not be replaced by // any means with MQL4 supplied functions. // #include #include #include #include #include #include #include #include // // END MQL compatibility */ //*********************************************************************************************************************************************************/ #endif // __MQL4_COMPATIBILITY_CODE__ #endif // LIB_MQLPLUS_MQL4_COMPATIBILITY_MQH_INCLUDED