MT4 to MT5: the differences that matter most
- Orders and positions: MT5 separates orders, deals and positions. Use
CTradefrom<Trade\Trade.mqh>instead ofOrderSendwith tickets. - Indicator handles: in MT5,
iMA()returns a handle once (in OnInit); read values withCopyBuffer(). - Series arrays: MT4 arrays like
Close[]are reversed by default; in MT5 useCopyClose()orArraySetAsSeries(). - Netting and hedging: an MT5 account may hold only one position per symbol. Check
ACCOUNT_MARGIN_MODE. - Filling modes: set the order filling type the symbol allows, or orders can be refused.
The Lab converts in both directions and shows what it changed; the starter library has every program in both versions to compare side by side.
0 comments
Sign in to join the conversation.
No comments yet. Be the first.