Coder Social home page Coder Social logo

No result from the screen about qsforex HOT 7 OPEN

mhallsmoore avatar mhallsmoore commented on August 22, 2024
No result from the screen

from qsforex.

Comments (7)

mhallsmoore avatar mhallsmoore commented on August 22, 2024

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.

zwblst007 avatar zwblst007 commented on August 22, 2024

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,

Weibo

from qsforex.

mhallsmoore avatar mhallsmoore commented on August 22, 2024

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.

zwblst007 avatar zwblst007 commented on August 22, 2024

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,

Weibo

from qsforex.

mhallsmoore avatar mhallsmoore commented on August 22, 2024

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.

zwblst007 avatar zwblst007 commented on August 22, 2024

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,

Weibo

from qsforex.

Simangaliso avatar Simangaliso commented on August 22, 2024

Hi Weibo
I have the same problem, may you please share how you fixed it

from qsforex.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.