darwinex / dwx-zeromq-connector

Wrapper library for algorithmic trading in Python 3, providing DMA/STP access to Darwinex liquidity via a ZeroMQ-enabled MetaTrader Bridge EA.
https://blog.darwinex.com/zeromq-interface-python-r-metatrader4/
BSD 3-Clause "New" or "Revised" License
344 stars 228 forks source link

Path issue #33

Closed alhennessey92 closed 5 years ago

alhennessey92 commented 5 years ago

Hi, i am having an issue with the path in the coin_flip_trader script. i have set it to _path = '../../..' which should take me to the project root, however i am still getting an error when executing exec(open("coin_flip_traders_v1.0.py").read())

The error i get is

File "/Users/Al/Desktop/Trading/examples/template/strategies/base/DWX_ZMQ_Strategy.py", line 20, in os.chdir(_path) NameError: name '_path' is not defined

If i add a path to the DWX_ZMQ_STRATEGY.py like _path = '../../../..' i get the error

File "/Users/Al/Desktop/Trading/examples/template/strategies/base/DWX_ZMQ_Strategy.py", line 24, in from api.DWX_ZeroMQ_Connector_v2_0_1_RC8 import DWX_ZeroMQ_Connector ModuleNotFoundError: No module named 'api'

Not sure what i am doing wrong, i know it must have something to do with the path.

Thanks for your help