Liquidity_Predator/Utilities/M_KeepAliveTrade.mqh
2026-05-09 08:59:15 +02:00

21 lines
No EOL
506 B
MQL5

void M_KeepAliveTrade()
{
string symbol = _Symbol;
if(!M_SpreadOK())
bool Var = false;
else if(Trade.Buy(0.01, symbol, 0, 0, 0, "Keep account alive")) // Buy öffnen
{
M_LogInfo("Trade opened to keep account alive");
Sleep(5000);
// Position sofort schließen
if(PositionSelect(symbol))
{
Trade.PositionClose(symbol);
M_LogInfo("Trade closed to keep account alive");
}
stGVL.bDemandKeepAccountAliveTrade = false;
}
}