Update mt5-xau-lstm-ppo-stoch-adx-bot.py

This commit is contained in:
Vittus Mikiassen
2026-06-16 13:49:32 +02:00
committed by GitHub
parent 8f9a98db44
commit 2dd52e8063
+13 -13
View File
@@ -1532,6 +1532,19 @@ def test_bot(symbol="XAUUSD"):
while True:
now = datetime.now()
seconds_until_next_5m = (
(5 - now.minte % 5) * 60
- now.second
- now.microsecond / 1_000_000
)
if seconds_until_next_5m <= 0:
seconds_until_next_5m += 300
time.sleep(seconds_until_next_5m)
tick = mt5.symbol_info_tick(symbol)
# SL_PIPS = round(tick.bid * 0.00125 * 10, 0)
SL_PIPS = 50
@@ -1708,19 +1721,6 @@ def test_bot(symbol="XAUUSD"):
# f"[{symbol}] PPO HOLD"
# )
now = datetime.now()
seconds_until_next_5m = (
(5 - now.minte % 5) * 60
- now.second
- now.microsecond / 1_000_000
)
if seconds_until_next_5m <= 0:
seconds_until_next_5m += 300
time.sleep(seconds_until_next_5m)
def main():
train_bot("XAUUSD")