Schau, wie man Roboter kostenlos herunterladen kann
Finden Sie uns auf Twitter!
und werden Sie Mitglied unserer Fangruppe
Interessantes Skript?
Veröffentliche einen Link auf das Skript, damit die anderen ihn auch nutzen können
Hat Ihnen das Skript gefallen?
Bewerten Sie es im Terminal MetaTrader 5
Bibliotheken

Indicator Factory - Bibliothek für den MetaTrader 5

Niklas Schlimm
Veröffentlicht:
Niklas Rolf Alexander Schlimm
Ansichten:
2336
Rating:
(5)
Veröffentlicht:
2021.09.04 17:24
Benötigen Sie einen Roboter oder Indikator, der auf diesem Code basiert? Bestellen Sie ihn im Freelance-Bereich Zum Freelance

Very simple-to-use factory that saved me a lot memory on my expert advisors. I am using hundrets of different strategies in my expert advisors. This factory allows me to re-use instances of CIndicator class along multiple strategies and clients. This in turn saves a lot memory caused by large buffers in indicators.

Simply call it like so:

CIndicators* indicators1 = new CIndicators();
CIndiactors* indicators2 = new CIndicators();
MqlParam rsi[2];
ENUM_TIMEFRAMES tradingTimeframe = PERIOD_CURRENT;
rsi[0].type = TYPE_INT; rsi[0].integer_value=14;
rsi[1].type = TYPE_INT; rsi[1].integer_value=PRICE_CLOSE;
indicators1.Add(IndicatorFactory::getInstance(_Symbol,IND_RSI,tradingTimeframe,rsi));
indicators2.Add(IndicatorFactory::getInstance(_Symbol,IND_RSI,tradingTimeframe,rsi));

This way - regardless how many instances of CIndicators class you may create and use by your clients - you use the same actual indicator instances all the time; as long the specific indicators share the same parameters. 


    Delete All Chart Objects Delete All Chart Objects

    This script is meant for a quick chart clean up.

    AlgoX MA Channel AlgoX MA Channel

    Version: 1.0

    Close All Charts Except Actual Close All Charts Except Actual

    This script will close the symbol charts, except the actual one.

    Price period SMA Price period SMA

    Der Indikator berechnet den Durchschnittspreis für den angegebenen Zeitraum.