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

Libraries

HashMap implementation - library for MetaTrader 4

| English Español Português 日本語 Deutsch

Views:
7619
Rating:
votes: 17
Published:
2014.02.11 15:34
Updated:
2016.11.22 07:32
\MQL4\Include\
hash.mqh (20.7 KB)view
Description:

This is a HashMap implementation. This allows something like arrays but with string indexes. It maps strings to Objects. The Objects must be a subclass of the HashValue class provided.

The Hash by default will 'adopt' the value objects. In which case it will free the memory when they are no longer in the hash. This can be disabled in the constructor.

The Codebase version might not be the most recent. The latest version can be found here.

Documentation:

Hash class

HashLoop class

Version

125


Below is an example, and it is also used in my JSON Parser class, to represent JSON Objects.

    
    Hash *h = new Hash();

    // Store values
    h.hPutInt("low",0);
    h.hPutInt("high",1);

    // Get values
    int high = h.gGetInt("high");
 
    // Loop
    HashLoop *l ;
    for( l = new HashLoop(h) ; l.hasNext() ; l.next()) {

        string key = l.key();

        int j = l.valInt();

        Print(key," = ",j);

    }
    delete l;

    delete h;


RosePipsIndicator RosePipsIndicator

This indicator will calculate pips wins and losses for any pair with a parsar and doji star trading strategy. You can see pip targets and losses and see if you can find a winning pair with this. 5MIN charts are the best on current settings.

DF-ProfitMonitor DF-ProfitMonitor

With this indicator you can follow the evolution of account profit.

HTTP requests for new MQL4 (tested in build 600) HTTP requests for new MQL4 (tested in build 600)

Simple library that allows sending requests via HTTP protocol from new MQL4

OpenAlert v1.0 OpenAlert v1.0

Someone needed a quick way to open the Alert window again, after they had closed it. Place this script in your \experts\scripts folder.