0
konzentrieren Sie sich auf
0
Anhänger

Problem beim automatischen Starten und Stoppen des Roboters

Erstellt in: 2020-10-30 15:12:13, aktualisiert am:
comments   4
hits   1152

Ich habe den automatischen Start und den Stillstand der Inlands-Futures kontrolliert, und vielleicht funktioniert das auch für einen Tag, aber manchmal gibt es folgende Probleme, was ist der Grund?

Traceback (most recent call last): File “”, line 982, in init_ctx File “”, line 119, in File “”, line 65, in main File “”, line 27, in api URLError:

Ein Teil des Codes lautet: if currentime (() > 0.2100 and currentime (() < 0.2359 and currentwday (()! = 6 and currentwday (()! = 0 and status==False:# Nicht-Wochenende täglich von 8:55 bis 3:01 Uhr status=True LogStatus(“0.2100–0.2359,Restart”) robotftrade=api(‘RestartRobot’,RobotFTrade) Log ((“Robotftrade Ausführung gestartet,api==”,robotftrade) swtradetrade=api(‘RestartRobot’,swTrade) Log ((“swtradetrade wird ausgeführt,api==”,swtradetrade) Sleep(10000) if currentime ((() <0.0855 or currentwday ((() == 6 or currentwday (()) == 0 and status== True: # kleiner als 8:55 Uhr oder am Samstag oder Sonntag status=False LogStatus(“0.0000–0.900 or weekend,StopRobot”) robotftrade=api(‘StopRobot’,RobotFTrade) Log ((“robotftrade Ausführung gestoppt,api==”,robotftrade) swtradetrade=api(‘StopRobot’,swTrade) Log ((“swtradetrade wurde nicht ausgeführt,api==”,swtradetrade) Sleep(10000)