Pon "Me gusta" y sigue las noticias
Deje un enlace a él, ¡qué los demás también lo valoren!
Evalúe su trabajo en el terminal MetaTrader 5
![Librerías](https://c.mql5.com/i/code/library.png)
Authenticate into an MT4 account from MQL4 (tested in build 880) - librería para MetaTrader 4
- Visualizaciones:
- 9281
- Ranking:
- Publicado:
- 2015.09.25 11:20
- Actualizado:
- 2016.11.22 07:32
-
¿Necesita un robot o indicador basado en este código? Solicítelo en la bolsa freelance Pasar a la bolsa
Since MetaTrader 4 build 880 was released, it's no longer easy to programmatically fill values in Login dialog.
This library hides the complicated stuff and provides easy to use API to login to any MetaTrader 4 account from within MQL4 script/expert.
Any contribution appreciated.
Example:
//+------------------------------------------------------------------+ //| mql4-auth-example.mq4 | //| Copyright 2015, Sergey Lukin | //+------------------------------------------------------------------+ #include <mql4-auth.mqh> //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ void OnStart() { // Just in case... if(loginDialogIsOpen()) closeLoginDialog(); // Let's do it! if(auth("ACCOUNT_NUMBER","PASSWORD","SERVER IP/HOSTNAME")) { Print("Hooray, I found the login dialog, inserted credentials, now wait until MT4 connects :)"); } else { Print("Sorry, I could not even find the Login dialog... Is your MT4 older than v880 or something?"); } } //+------------------------------------------------------------------+
Source:
Source is distributed at Github repository. Any contribution is highly appreciated.
![Custom Bollinger Bands](https://c.mql5.com/i/code/indicator.png)
Bollinger Bands with customizable moving average method and applied price.
![History Dump CSV with heat map for Excel analysis](https://c.mql5.com/i/code/script.png)
This script creates a .CSV file of your order history so you can import it into Excel and analyse it using the calculated heat map slots and other calculated values. All trading attributes are extracted from the history and output to the .CSV file. Updated version 1.03 (about 27KB) has NetProfit, OpenDay, OpenHour, OpenSlot, CloseDay, CloseHour, CloseSlot, DurationMinutes, PotentialWinPips, PotentialLossPips and others. The file is tab delimited for easier conversion from text to columns in Excel. Times are server time. Handles 4 and 5 digit brokers and 2/3 and 4/5 point value pairs, e.g. JPY correctly.
![Basic Trailing Stop](https://c.mql5.com/i/code/expert.png)
An EA template to add a simple trailing stop to your strategy.
![Close symbol with profit or loss](https://c.mql5.com/i/code/expert.png)
Easy EA for closing positions of the symbol with profit or loss. You can use it for hidden SL too.