MetaTrader 5 Python User Group - Come usare Python in Metatrader - pagina 28

 
Bene, se tutti i dati provengono da un solo terminale, allora è chiaro che lo spostamento temporale non è importante. Ma si suppone che questo sia uno strumento di analisi (ad esempio il collegamento a notizie o altri dati) - e il tempo è diverso lì, quindi devi convertire.
 
Lyuk:
Bene, se tutti i dati provengono da un solo terminale, allora è chiaro che lo spostamento temporale non è importante. Ma si suppone che questo sia uno strumento di analisi (ad esempio il collegamento a notizie o altri dati) - e lì il tempo è diverso, quindi dobbiamo convertirlo.

Sembra facile

pd.tz_convert(None)
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.dt.tz_convert.html
 
Non è difficile, quando hai già trovato un bug che ha bisogno di tempo per essere corretto, il debugging è difficile.
 

La libreria non è installata e nemmeno aggiornata. La versione attuale che sto usando è la 5.0.4 e l'ultima versione è la 5.0.8.

È un registro. Cosa devo fare?

Collecting MetaTrader5
  Downloading https: //files.pythonhosted.org/packages/56/76/58682d9a70b8eea2a707634125fb495bf457b21fef565d2d4bac559aad94/MetaTrader5-5.0.8.tar.gz
Building wheels for collected packages: MetaTrader5
  Building wheel for MetaTrader5 (setup.py) ... error
  ERROR: Command errored out with exit status 1 :
   command: 'c:\python35\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = ' "'" 'C:\\Users\\la\\AppData\\Local\\Temp\\pip-install-s2bqudzg\\MetaTrader5\\setup.py' "'" '; __file__=' "'" 'C:\\Users\\la\\AppData\\Local\\Temp\\pip-install-s2bqudzg\\MetaTrader5\\setup.py' "'" ';f=getattr(tokenize, ' "'" 'open' "'" ', open)(__file__);code=f.read().replace(' "'" '\r\n' "'" ', ' "'" '\n' "'" ');f.close();exec(compile(code, __file__, ' "'" 'exec' "'" '))'  bdist_wheel -d  'C:\Users\la\AppData\Local\Temp\pip-wheel-6x877lgv'  --python-tag cp35
        cwd: C:\Users\la\AppData\Local\Temp\pip-install-s2bqudzg\MetaTrader5\
  Complete output ( 10 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64- 3.5
  creating build\lib.win-amd64- 3.5 \MetaTrader5
  copying MetaTrader5\__init__.py -> build\lib.win-amd64- 3.5 \MetaTrader5
  running build_ext
  building 'MetaTrader5.C' extension
  error: [WinError 2 ] The system cannot find the file specified
  ----------------------------------------
  ERROR: Failed building wheel for MetaTrader5
  Running setup.py clean for MetaTrader5
Failed to build MetaTrader5
Installing collected packages: MetaTrader5
  Found existing installation: MetaTrader5 5.0 . 4
    Uninstalling MetaTrader5- 5.0 . 4 :
      Successfully uninstalled MetaTrader5- 5.0 . 4
    Running setup.py install for MetaTrader5 ... error
    ERROR: Command errored out with exit status 1 :
     command: 'c:\python35\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = ' "'" 'C:\\Users\\la\\AppData\\Local\\Temp\\pip-install-s2bqudzg\\MetaTrader5\\setup.py' "'" '; __file__=' "'" 'C:\\Users\\la\\AppData\\Local\\Temp\\pip-install-s2bqudzg\\MetaTrader5\\setup.py' "'" ';f=getattr(tokenize, ' "'" 'open' "'" ', open)(__file__);code=f.read().replace(' "'" '\r\n' "'" ', ' "'" '\n' "'" ');f.close();exec(compile(code, __file__, ' "'" 'exec' "'" '))' install --record 'C:\Users\la\AppData\Local\Temp\pip-record-7ohhmuga\install-record.txt'  --single-version-externally-managed --compile
          cwd: C:\Users\la\AppData\Local\Temp\pip-install-s2bqudzg\MetaTrader5\
    Complete output ( 10 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64- 3.5
    creating build\lib.win-amd64- 3.5 \MetaTrader5
    copying MetaTrader5\__init__.py -> build\lib.win-amd64- 3.5 \MetaTrader5
    running build_ext
    building 'MetaTrader5.C' extension
    error: [WinError 2 ] The system cannot find the file specified
    ----------------------------------------
  Rolling back uninstall of MetaTrader5
  Moving to c:\python35\lib\site-packages\metatrader5- 5.0 . 4 .dist-info\
   from c:\python35\lib\site-packages\~etatrader5- 5.0 . 4 .dist-info
  Moving to c:\python35\lib\site-packages\metatrader5\
   from c:\python35\lib\site-packages\~-tatrader5
ERROR: Command errored out with exit status 1 : 'c:\python35\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = ' "'" 'C:\\Users\\la
 \\AppData\\Local\\Temp\\pip-install-s2bqudzg\\MetaTrader5\\setup.py' "'" '; __file__=' "'" 'C:\\Users\\la
 \\AppData\\Local\\Temp\\pip-install-s2bqudzg\\MetaTrader5\\setup.py' "'" ';f=getattr(tokenize, ' "'" 'open' "'" ', open)(__file__);code=f.read().replace(' "'" '\r\n' "'" ', ' "'" '\n' "'" ');f.close();exec(compile(code, __file__, ' "'" 'exec' "'" '))' install --record 'C:\Users\la \AppData\Local\Temp\pip-record-7ohhmuga\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
 
jaffer wilson:

La libreria non è installata e nemmeno aggiornata. La versione attuale che sto usando è la 5.0.4 e l'ultima versione è la 5.0.8.

È un file di registro. Cosa devo fare?

Reinstalla Python (3.7 o 3.8 è meglio) e riprova, per favore.

 
MetaQuotes Software Corp. :

Reinstalla Python (preferibilmente 3.7 o 3.8) e riprova, per favore.

Sto usando Python 3.5.0. La versione precedente funziona bene. Ma l'ultimo aggiornamento non aggiorna. Cosa potrebbe essere la causa di questo?

 
jaffer wilson:

Sto usando Python 3.5.0. La versione precedente funziona bene. Ma l'ultimo aggiornamento non aggiorna. Quale potrebbe essere la ragione di questo?

Reinstalla Python 3.5.0 x64 e riprova.

 
MetaQuotes Software Corp. :

Reinstalla Python 3.5.0 x64 e riprova.

Grazie per la vostra risposta. L'ho fatto. Ma il problema rimane lo stesso.

 
jaffer wilson:

La libreria non è installata e nemmeno aggiornata. La versione attuale che sto usando è la 5.0.4 e l'ultima versione è la 5.0.8.

È un registro. Cosa devo fare?

A giudicare dai log stai cercando di costruire un modulo dal sorgente, devi avere Visual Studio 2017/2019 o Visual C++ Build Tools per questo.

Prova ad entrare:

pip uninstall MetaTrader5
pip install MetaTrader5

l'installazione dovrebbe andare da whl:

E:\>pip install MetaTrader5
Collecting MetaTrader5
  Downloading https://files.pythonhosted.org/packages/e4/fc/dc782c6b6b1c9270b8efbca08b2304150354a87fff5695671f930af8f0ad/MetaTrader5-5.0.9-cp37-cp37m-win_amd64.whl
Installing collected packages: MetaTrader5
Successfully installed MetaTrader5-5.0.9
 
Almaz :

A giudicare dai log stai cercando di costruire un modulo dal sorgente, devi avere Visual Studio 2017/2019 o Visual C++ Build Tools per questo.

Prova ad entrare:

l'installazione dovrebbe andare da whl:

Ho provato anche questo. Ma non capisco perché questo accade. Se disinstallo Metatrader e provo a reinstallarlo, ottengo lo stesso errore. Anche per la versione 5.0.4.

E sto usando Python 3.5.0 rigorosamente.

Motivazione: