Download MetaTrader 5

Watch how to download trading robots for free

Interesting script?
So post a link to it -
let others appraise it

You liked the script? Try it in the MetaTrader 5 terminal

2015.09.25 11:20
Authenticate into an MT4 account from MQL4 (tested in build 880)

Authenticate into an MT4 account from MQL4 (tested in build 880) - library for MetaTrader 4

| English Español Português Русский Deutsch 日本語

votes: 18
mql4-auth.mqh (4.74 KB)view


Created by lukins (Sergey Lukin)


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.


//|                                            mql4-auth-example.mq4 |
//|                                     Copyright 2015, Sergey Lukin |
#include <mql4-auth.mqh>
//|                                                                  |
void OnStart()
// Just in case...
   if(loginDialogIsOpen()) closeLoginDialog();

// Let's do it!
      Print("Hooray, I found the login dialog, inserted credentials, now wait until MT4 connects :)");
      Print("Sorry, I could not even find the Login dialog... Is your MT4 older than v880 or something?");


Source is distributed at Github repository. Any contribution is highly appreciated.

Accelerator Oscillator (AC) Accelerator Oscillator (AC)

The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force.

Average Directional Movement Index (ADX) Average Directional Movement Index (ADX)

The Average Directional Movement Index Indicator (ADX) helps to determine if there is a price trend.

LinesProfitLoss LinesProfitLoss

Calculates profit (loss) of the current orders on the symbol.

FFC - Forex Factory Calendar FFC - Forex Factory Calendar

Modified version of FF Calendar Indicator with new features.