Probleme mit HistoryDealGetString() und HistoryDealGetInteger()
Das Problem ist "POSITION_SYMBOL"!
Das gilt nicht für Deals, deren Enum beginnen alle mit DEAL_.... (siehe hier: https://www.mql5.com/de/docs/trading/historydealgetstring).
Ich glaube, wenn Du "DEAL_SYMBOL" nimmst passt's.
Ich hatte auch schon solche Probleme, Du bist da nicht alleine :)
- www.mql5.com
Das Problem ist "POSITION_SYMBOL"!
Das gilt nicht für Deals, deren Enum beginnen alle mit DEAL_.... (siehe hier: https://www.mql5.com/de/docs/trading/historydealgetstring).
Ich glaube, wenn Du "DEAL_SYMBOL" nimmst passt's.
Ich hatte auch schon solche Probleme, Du bist da nicht alleine :)
Laut Dokumentation sollte das funktionieren, mach ich da was falsch?
symbol ist string,
ticket ist ulong.
Dokumentation:
1. Immediately returns the property value.
string HistoryDealGetString(
ulong ticket_number, // Ticket
ENUM_DEAL_PROPERTY_STRING property_id // Property identifier
);
2. Returns true or false, depending on the success of the function. If successful, the value of the property is placed into a target variable passed by reference by the last parameter.
bool HistoryDealGetString(
ulong ticket_number, // Ticket
ENUM_DEAL_PROPERTY_STRING property_id, // Property identifier
string& string_var // Here we accept the property value
);
Das meldet der Compiler:
Ich finde die Ursache einfach nicht.
Simples Codebeispie hab ich drangehängt.
Die Funktion 'allow_open' soll prüfen ob bei offenen und/oder geschlossenen Positionen eine gewisse Zeitspanne (in Bars) vergangen ist.
Account ist HEDGING/MT5. Auf einem NETTING Account funktioniert das so nicht.
Oder ist das ein bug?
Bitte schaut euch das an, danke im vorraus.