und werden Sie Mitglied unserer Fangruppe
Veröffentliche einen Link auf das Skript, damit die anderen ihn auch nutzen können
Bewerten Sie es im Terminal MetaTrader 5
- Veröffentlicht:
- Niklas Rolf Alexander Schlimm
- Ansichten:
- 2837
- Rating:
- 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.

This script is meant for a quick chart clean up.

Version: 1.0

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

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