I think i dont see the little Problem in the code. COmpile error is 'PositionClose' - undeclared identifier10925
U understand that a function won't work if it's not part of the API or if it hasn't been defined?
that would make more sense
// Prüfen, ob es Zeit ist, den Trade zu schließenif (!tradeOpened && currentHour == CloseHour && currentMinute == CloseMinute)
{
// Alle offenen Positionen durchlaufenfor (int i = PositionsTotal() - 1; i >= 0; i--)
{
if (PositionSelect(_Symbol))
{
if (PositionGetInteger(POSITION_TYPE) == POSITION_TYPE_BUY)
{
tradeOpened = true;
Print("Buy-Trade geschlossen.");
}
}
else
{
Print("Keine offene Buy-Position für das Symbol gefunden.");
}
}
}
if(PositionsTotal()== 0) tradeOpened = false;
I think i dont see the little Problem in the code. COmpile error is 'PositionClose' - undeclared identifier 109 25
U understand that a function won't work if it's not part of the API or if it hasn't been defined?
that would make more sense