- MetaEditor - Professional editor of trading applications
- MetaTrader 5 web platform
- Flexible MetaTrader 5 trading system with all order types
mpr:
I hope this isn't asking too much, but I'm hoping someone can get me started on understanding MT5. I've been reading the documentation, but I'm just not following it very well. I'm hoping someone will be kind enough to look at this code, then post it's equivalent in MT5. If feel like if I saw it and compared the two, it would give me a 'kick start' to understanding MT5 a little better. Thanks!
I hope this isn't asking too much, but I'm hoping someone can get me started on understanding MT5. I've been reading the documentation, but I'm just not following it very well. I'm hoping someone will be kind enough to look at this code, then post it's equivalent in MT5. If feel like if I saw it and compared the two, it would give me a 'kick start' to understanding MT5 a little better. Thanks!
You can look at Code Base. Here some of them that develop by Integer :
- Eugene
and more.
mpr:
I hope this isn't asking too much, but I'm hoping someone can get me started on understanding MT5. I've been reading the documentation, but I'm just not following it very well. I'm hoping someone will be kind enough to look at this code, then post it's equivalent in MT5. If feel like if I saw it and compared the two, it would give me a 'kick start' to understanding MT5 a little better. Thanks!
I hope this isn't asking too much, but I'm hoping someone can get me started on understanding MT5. I've been reading the documentation, but I'm just not following it very well. I'm hoping someone will be kind enough to look at this code, then post it's equivalent in MT5. If feel like if I saw it and compared the two, it would give me a 'kick start' to understanding MT5 a little better. Thanks!
Order send in MQL5 is a little bit "detail" than MQL4 which is more simple. Here's I found some Order Send code from MQL4 to MQL5 (click here). You may want also to read Migrating from MQL4 to MQL5.
Hope that's help.
mpr:
I hope this isn't asking too much, but I'm hoping someone can get me started on understanding MT5. I've been reading the documentation, but I'm just not following it very well. I'm hoping someone will be kind enough to look at this code, then post it's equivalent in MT5. If feel like if I saw it and compared the two, it would give me a 'kick start' to understanding MT5 a little better. Thanks!
I hope this isn't asking too much, but I'm hoping someone can get me started on understanding MT5. I've been reading the documentation, but I'm just not following it very well. I'm hoping someone will be kind enough to look at this code, then post it's equivalent in MT5. If feel like if I saw it and compared the two, it would give me a 'kick start' to understanding MT5 a little better. Thanks!
This only one way to do it, in MQL5 there are always several ways :
ulong MagicNumber = 123456789; input double MaxSpread = 3.0; //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { bool SellOrder = false; MqlTradeRequest request = {0}; MqlTradeResult result = {0}; MqlTick tick; if (SymbolInfoTick(Symbol(), tick) && SymbolInfoInteger("GBPUSD", SYMBOL_SPREAD) < MaxSpread) { request.action = TRADE_ACTION_DEAL; // setting a pending order request.magic = MagicNumber; // ORDER_MAGIC request.symbol = "GBPUSD"; // symbol request.volume = 1.0; // volume in 0.1 lots request.sl = 0; // Stop Loss is not specified request.tp = 0; // Take Profit is not specified request.type = ORDER_TYPE_SELL; // order type request.price = tick.bid; // open price request.deviation = 5; // Slippage //--- send a trade request OrderSend(request, result); } }
WARNING : DO NOT USE THIS CODE AS IS TO TRADE, THIS IS ONLY AS EDUCATION PURPOSE.
Thanks everyone!! Plenty of info to get me started!

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register