Voir comment télécharger gratuitement des robots de trading
Retrouvez-nous sur Facebook !
Rejoignez notre page de fans
Rejoignez notre page de fans
Vous avez aimé le script ? Essayez-le dans le terminal MetaTrader 5
CDictionary - bibliothèque pour MetaTrader 5
- Vues:
- 5594
- Note:
- Publié:
- 2017.11.20 10:10
- Mise à jour:
- 2017.12.01 11:38
- Besoin d'un robot ou d'un indicateur basé sur ce code ? Commandez-le sur Freelance Aller sur Freelance
An implementation of the dictionary (associative array) data structure in MQL5, based on CArrayObj and CList.
Hash Function
FNV-1a
Usage
Primitives:
CDictionary *dict=new CDictionary(); //setting dict.Set<string>("costarring","liquid"); dict.Set<double>("liquid",0.1); //getting - variant 1 string variant1 = dict.Get<string>("costarring"); Print(variant1); //getting - variant 2 double variant2 = 0; dict.Get<double>("liquid",variant2); Print(variant2);
It can also store pointers to objects (but not objects or structures):
dict.Set<CObject*>("object",new CObject());
Collision Handling
- Each entry would have its own hash.
- If two or more entries share the same hash, entries are compared by key and typename. This makes it possible to store multiple entries with the same key (but different type).
- When using Set<T>, if there is already an existing entry with the same key and type, the passed value would be treated as a replacement of an existing entry (not a new one). This also applies to pointers.
Resistance & Support
The indicator of support and resistance lines calculated based on the iFractals (Fractals) indicator values.
MACD StochasticThe trading system is based on iMACD (Moving Average Convergence/Divergence, MACD) and iStochastic (Stochastic Oscillator)
PS Magicas - Three moving averages
PS Magicas - Three moving averages that give target and possible entries.
LeadLagRelationshipTesterScript for checking the LeadLagRelationship indicator (https://www.mql5.com/en/market/product/26229)