Comments (7)
Hi Weibo,
Are you running this in Windows, Mac or Linux?
If the latter, have you got the environment variables set for your account properly in your shell file?
Mike.
from qsforex.
Hi Mike,
I'm running it in Windows.
At present, to make the program easy to understand, I directly assign the value to those variables in settings.py, like: ACCOUNT_ID = '1234567'
Best,
from qsforex.
Hi Weibo,
If you download the latest version of the code (updated a couple of days ago) and try running trading.py with the OANDA practice account open, do you see any trades being made?
You should be seeing some tick data output through the console.
If you're not seeing anything I think that might mean that the streaming prices object is not functioning correctly.
I presume you've installed all of the necessary dependencies (including the 'requests' library?). I imagine you have, otherwise you'd get some error messages, but good to check!
What version of Python are you running? Is it 2.7.x or 3.4.x?
Mike.
from qsforex.
Hi Mike,
I rewrite the code and now the program can show some tick data on the screen. In line 150 and 171 of portfolio.py, my Python notifies that:
undefined name 'add_position_units'
However, if I change it to 'self.add_position_units', there's no notifications anymore, but the program just don't give me any feedback on the screen. How does that happen?
Besides, in line 46 of trading.py, you write 'heartbeat = 0.0', and the reference is 'half a sencond between polling'. I'm a little confused, shouldn't the heartbeat be 0.5?
By the way, I'm using Python 3.4.
Best,
from qsforex.
Hi Weibo,
Would you mind sending me any of the modifications you have made, in particular any changes to strategy.py? I can then try and replicate your error. The current code-base seems to work fine on my system (including Python 3.4), so I'd like to know if you've done anything differently. My email address is mike AT quantstart DOT com.
I've also modified the requirements.txt file, so if you update your packages that accordingly, we can make sure that isn't the problem.
And, as to your reference to the heartbeat being 0.0 instead of 0.5, yes, this is a slip-up on my part! The comment needs to be changed. I've added this as an issue:
#15
Kind regards,
Mike.
from qsforex.
Hi Mike,
I update all the packages, and now the program seems to work fine.
The only modification I made is in portfolio.py, and I already sent a mail to you.
I have another question, in the price.py, you write the following codes:
inv_bid = (Decimal("1.0")/bid).quantize(Decimal("0.00001"))
inv_ask = (Decimal("1.0")/ask).quantize(Decimal("0.00001"))
However, if we want to get the quote of USDGBP from quote of GBPUSD, maybe we should use the following equation:
inv_bid = 1/ask
inv_ask = 1/bid
Am I making any misunderstanding?
By the way, I just bought your book "Successful Algorithmic Trading" and it's amazing! I have a question: what is the main difference between those two packages of this book? Will the $79 package provide some codes that $39 package doesn't include?
Best,
from qsforex.
Hi Weibo
I have the same problem, may you please share how you fixed it
from qsforex.
Related Issues (20)
- adding home/quote and home/base to the prices_dict in the PriceHandler
- Use a PriorityQueue object instead of "standard" Queue for the backtesting loop, to reduce pile-up of tick events HOT 1
- How hard to apply this backtester to another type of instrument? HOT 2
- ImportError: No module named urllib3
- OHLCV bar features
- Using Enum HOT 1
- Position accounting mode
- TypeError: Passing a bool to header is invalid with Pandas 0.18.1 HOT 3
- Can qsforex make order with trailing stop?
- Support of other brokers (BTC on Kraken)
- getting the same error on multiple computer operation systems. HOT 4
- How can I make my trading system working on a 5 or 15 minutes time frame interval? HOT 3
- ImportError: No module named 'qsforex' HOT 1
- execution error when running for some time. HOT 3
- add a little GUI
- decimal.InvalidOperation: Invalid literal for Decimal: 'Bid' HOT 3
- trading.py - <Response [400]> - how to for request HOT 3
- V20 Interface HOT 1
- Is project alive? HOT 4
- change the instrument pair format from 'aaabbb' to 'aaa_bbb'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qsforex.