Diskussion zum Artikel "Zeitreihen in der Bibliothek DoEasy (Teil 55): Die Kollektionsklasse der Indikatoren"

 

Neuer Artikel Zeitreihen in der Bibliothek DoEasy (Teil 55): Die Kollektionsklasse der Indikatoren :

Der Artikel setzt die Entwicklung von Objektklassen für die Indikatoren und deren Kollektionen fort. Für jedes Indikatorobjekt erstellen wir seine Beschreibung und die richtige Kollektionsklasse für die fehlerfreie Speicherung und das Abrufen von Indikatorobjekten aus der Kollektionsliste.

Kompilieren Sie den EA und starten Sie ihn auf dem Chart im Terminal.
Nach seiner Initialisierung zeigt das Journal "Experts" Bibliotheksmeldungen zur Initialisierung an. Darunter befinden sich vollständige und kurze Listen der Parameter von zwei erstellten Indikatoren:

Account 8550475: Artyom Trishkin (MetaQuotes Software Corp.) 10425.23 USD, 1:100, Hedge, Demo account MetaTrader 5
--- Initializing the "DoEasy" library ---
Work only with the current symbol: "EURUSD"
Work with a predefined list of Periods:
"H1" "H4"
Symbol time series EURUSD: 
- Timeseries "EURUSD" H1: Required: 1000, Actual: 1000, Created: 1000, On server: 6350
- Timeseries "EURUSD" H4: Required: 1000, Actual: 1000, Created: 1000, On server: 6255
============= The beginning of the event parameter list: "Standard indicator" =============
Indicator status: Standard indicator
Indicator type: AMA
Indicator timeframe: H1
Indicator handle: 10
Indicator group: Trend indicator
------
Empty value for plotting, for which there is no drawing: EMPTY_VALUE
------
Indicator symbol: EURUSD
Indicator name: "Adaptive Moving Average"
Indicator shortname: "AMA(EURUSD,H1)"
--- Indicator parameters --- 
- Averaging period: 9
- Fast MA period: 2
- Slow MA period: 30
- Horizontal shift of the indicator: 0
- Price type or handle: CLOSE
================== End of the parameter list: "Standard indicator" ==================
 
============= The beginning of the event parameter list: "Standard indicator" =============
Indicator status: Standard indicator
Indicator type: AMA
Indicator timeframe: H1
Indicator handle: 11
Indicator group: Trend indicator
------
Empty value for plotting, for which there is no drawing: EMPTY_VALUE
------
Indicator symbol: EURUSD
Indicator name: "Adaptive Moving Average"
Indicator shortname: "AMA(EURUSD,H1)"
--- Indicator parameters --- 
- Averaging period: 10
- Fast MA period: 3
- Slow MA period: 32
- Horizontal shift of the indicator: 5
- Price type or handle: CLOSE
================== End of the parameter list: "Standard indicator" ==================
 
Standard indicator Adaptive Moving Average EURUSD H1 [10]
Standard indicator Adaptive Moving Average EURUSD H1 [11]
Library initialization time: 00:00:00.000

Es ist zwar nur ein Indikatortyp - AMA - aber es wurden zwei Handles dieses Indikators erstellt, da die Parameter der erstellten Indikatoren unterschiedlich waren. Daher handelt es sich um zwei verschiedene Indikatoren - jeder hat sein Handle. Dementsprechend werden zwei Indikatorobjekte erstellt und in der Kollektion der Indikatoren abgelegt.

Autor: Artyom Trishkin