mirror of
https://github.com/raa251/Liquidity_Predator.git
synced 2026-07-06 13:42:02 +00:00
21 lines
No EOL
506 B
MQL5
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;
|
|
}
|
|
} |