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

2008.07.01 08:26

Base64 - library for MetaTrader 4

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

votes: 16
Base64.mq4 (4.61 KB)view

Base64 encoding was developed to provide the possibility of transferring binary data through transport channels that are not purely 8-bit, like the message body. The encoded data consumes about 33% less volume as compared to the original data. The encoding is often used for a simple encryption of data.

The library consists of two functions:

  • void Base64Encode(string in,string &out) The encoding of the input entry "in" and placing the result to the "out"
  • void Base64Decode(string in,string &out) The decoding of the input entry "in" and placing the result to the "out"

An example of usage:

#include "..\libraries\Base64.mq4"
void start()
   string original="Hello world!";
   string result="",restored="";
   Print("Original: ",original);
   Print("Encoded : ",result);
   Print("Restored: ",restored);


Original: Hello world!
Encoded : SGVsbG8gd29ybGQh
Restored: Hello world!

Translated from Russian by MetaQuotes Software Corp.
Original code:

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.

TP-SL_Removing TP-SL_Removing

Immediately deletes the SL/TP of all positions.

Closed_TOTAL Closed_TOTAL

Total closure of all positions (winners/losers). You can also select which are of a single instrument.