oandapybot icon indicating copy to clipboard operation
oandapybot copied to clipboard

Python 3?

Open streetgainer opened this issue 5 years ago • 1 comments

Is this script compatible with python3 or must I run it under 2.7? My linux system has python3 and I keep getting this error:

python3 backtest.py

Traceback (most recent call last): File "backtest.py", line 1, in from backtest.oanda_backtest import OandaBacktest File "/home/linaro/www/oandapybot/backtest/oanda_backtest.py", line 60 print "TOtal PnL: " + str(self.total_PnL) + " NetWorth: " + str(self.GetNetWorth()) ^

Btw, I've left all the settings in settings.py unchanged, as I just want to get it running. Even if I see an invalid account token message from Oanda, at least I know it runs on my system.

Thanks for a wonderful script

streetgainer avatar Jun 22 '19 16:06 streetgainer

Hey idk how old this is but you just have to add parentheses to the print statements. There's only like 2 or 3 of them in the whole thing (to run a backtest anyway). Real quick easy fix. BTW to the guy who wrote this program, please contact me! I have some questions about using it. Thanks!

alias-noa avatar Sep 29 '19 02:09 alias-noa