File tree Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -47,18 +47,17 @@ jobs:
4747 - name : Install MetaTrader5 Python package
4848 run : pip install MetaTrader5
4949
50- - name : Run your Python script
50+ - name : Run Python inline script
5151 run : |
52- python - << 'EOF'
52+ python -c "
5353 import MetaTrader5 as mt5
54-
55- if not mt5.initialize(path=r"C:/Program Files/MetaTrader 5/terminal64.exe", timeout=300000 ):
56- print("initialize() failed, error code:" , mt5.last_error())
54+ print('Testing MT5 initialization...')
55+ if not mt5.initialize():
56+ print('Failed to initialize:' , mt5.last_error())
5757 exit(1)
58-
59- # Example: print account info
60- print(mt5.account_info())
61-
62- mt5.shutdown()
63- EOF
58+ else:
59+ print('MT5 initialized successfully')
60+ mt5.shutdown()
61+ "
6462 shell : pwsh
63+
You can’t perform that action at this time.
0 commit comments