Bitte KEINE Doppel-Posts - habe anderen gelöscht.
Danke, Carl. Bei den Doppelpost hatte ich wohl auf die falschen Knöpfe gedrückt, war keine Absicht.
Weißt Du (oder sonst wer), wie man die Terminal Settings für TERMINAL_MAXBARS ändert? Bin schon in die Ini-Datei gegangen, habe aber nichts gefunden.
Danke für den HInweis zu dem Maximum unter Extras => Diagramme => Max. Bars im Chart. Ich habe das jetzt auf unbegrenzt gesetzt und bekomme Daten, die bis zum 1.1.1070 gehen - im Skript.
Beim EA ändert sich nichts. Die Zahl 12620 ist durchTERMINAL_MAXBARS definiert (= Rückgabewert), die ich über TerminalInfoInteger abfragen kann.
Die Terminal Properties sind offenbar nicht identisch mit den Global Terminal variables ,die ich verändern könnte (siehe: https://www.mql5.com/en/docs/globals/globalvariablename)
- www.mql5.com
Bin inzwischen ein bisschen weiter gekommen: Kann es sein, dass mich mein Broker beschränkt, weil ich zu viel teste?
Folgender Code:
Print("Total number of bars for the symbol-period at this moment = ", SeriesInfoInteger(Symbol(),Period(),SERIES_BARS_COUNT)); Print("The first date for the symbol-period at this moment = ", (datetime)SeriesInfoInteger(Symbol(),Period(),SERIES_FIRSTDATE)); Print("The first date in the history for the symbol-period on the server = ", (datetime)SeriesInfoInteger(Symbol(),Period(),SERIES_SERVER_FIRSTDATE)); Print("Symbol data are synchronized = ", (bool)SeriesInfoInteger(Symbol(),Period(),SERIES_SYNCHRONIZED));
bringt durch Skript aufgerufen:
2022.07.14 22:01:49.574 Server (EURUSD,M30) Total number of bars for the symbol-period at this moment = 297615
2022.07.14 22:01:49.574 Server (EURUSD,M30) The first date for the symbol-period at this moment = 1971.01.04 01:00:00
2022.07.14 22:01:49.574 Server (EURUSD,M30) The first date in the history for the symbol-period on the server = 1971.01.04 00:00:00
2022.07.14 22:01:49.574 Server (EURUSD,M30) Symbol data are synchronized = false
durch EA aufgerufen:
LN 0 22:03:22.153 Core 01 2021.01.07 09:30:00 Total number of bars for the symbol-period at this moment = 12620
LP 0 22:03:22.153 Core 01 2021.01.07 09:30:00 The first date for the symbol-period at this moment = 2020.01.02 03:00:00
PK 0 22:03:22.153 Core 01 2021.01.07 09:30:00 The first date in the history for the symbol-period on the server = 2020.01.01 00:00:00
DM 0 22:03:22.153 Core 01 2021.01.07 09:30:00 Symbol data are synchronized = true
Oder liegt es daran, dass Demo-Accounts Beschränkungen haben?
- Freie Handelsapplikationen
- Über 8.000 Signale zum Kopieren
- Wirtschaftsnachrichten für die Lage an den Finanzmärkte
Sie stimmen der Website-Richtlinie und den Nutzungsbedingungen zu.
Hallo in die Runde,
das Problem:
Unterschiedliche Ergebnisse über verfügbare Bars, je nachdem ob ich aus EA oder Skript abfrage.
Folgende Funktion arbeitet mit den Bars:
Die Debug-Prints bringen folgende Ergebnisse:
OL 0 17:01:29.067 Core 01 2021.01.07 09:30:00 Bar count on the 'EURUSD,M30' is 12620
GG 0 17:01:29.067 Core 01 2021.01.07 09:30:00 Bar count on the 'EURUSD,H4' is 1581
GI 0 17:01:29.067 Core 01 2021.01.07 09:30:00 Bar count on the 'EURUSD,D1' is 264
OM 0 17:01:29.067 Core 01 2021.01.07 09:30:00 Bar count on the 'EURUSD,W1' is 54
FK 0 17:01:29.067 Core 01 2021.01.07 09:30:00 Bar count on the 'EURUSD,MN1' is 13
Das stimmt auch, Preisabfragen, früher als 12620 bringen Null-Ergebnisse.
Genau den selben Codeblock habe ich in einem Skript:
Wenn ich das Skript anwende, steht im Terminal:
2022.07.14 17:07:20.065 bars (EURUSD,M30) Number of bars in the terminal history for the symbol-period at the moment = 100000
2022.07.14 17:07:58.278 Barcount (EURUSD,M30) Bar count on the 'EURUSD,M30' is 100000
2022.07.14 17:07:58.278 Barcount (EURUSD,M30) Bar count on the 'EURUSD,H4' is 43759
2022.07.14 17:07:58.278 Barcount (EURUSD,M30) Bar count on the 'EURUSD,D1' is 13267
2022.07.14 17:07:58.278 Barcount (EURUSD,M30) Bar count on the 'EURUSD,W1' is 2686
2022.07.14 17:07:58.278 Barcount (EURUSD,M30) Bar count on the 'EURUSD,MN1' is 618
Damit könnte ich arbeiten. Wie kann ich es erreichen, dass mir diese Anzahl von Bars im EA zur Verfügung steht?
Versuche, die Terminal-Settings zu ändern bisher erfolglos.
Mit Dank im voraus