Liquidity_Predator/Utilities/M_KeepAliveTrade.mqh

21 lines
506 B
MQL5
Raw Permalink Normal View History

2026-05-09 08:09:47 +02:00
void M_KeepAliveTrade()
{
string symbol = _Symbol;
if(!M_SpreadOK())
bool Var = false;
2026-05-09 08:59:15 +02:00
else if(Trade.Buy(0.01, symbol, 0, 0, 0, "Keep account alive")) // Buy öffnen
2026-05-09 08:09:47 +02:00
{
M_LogInfo("Trade opened to keep account alive");
2026-05-09 08:48:09 +02:00
Sleep(5000);
2026-05-09 08:09:47 +02:00
// Position sofort schließen
if(PositionSelect(symbol))
{
Trade.PositionClose(symbol);
M_LogInfo("Trade closed to keep account alive");
}
stGVL.bDemandKeepAccountAliveTrade = false;
}
}