Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Active is always EURUSD-OTC #3

Open
j1and1 opened this issue Dec 13, 2016 · 1 comment
Open

Active is always EURUSD-OTC #3

j1and1 opened this issue Dec 13, 2016 · 1 comment

Comments

@j1and1
Copy link

j1and1 commented Dec 13, 2016

Acording to the code in pattern base.py line self.api.getcandles(76, 60) the robot is always checking for the EURUSD-OTC candles not the active I chose in config....

Also when creating patterns in signaler.py active ID is not passed in as param to pattern constructor... so it always gets the candles for EURUSD-OTC with hardcoded id 76

Oh and by the way...... it sometimes crashes in pattern code because theres no check if the candles ar NoneType

I'm not a python guru, and I may be mistaking here somewhere, but please investigate this!

Oh and thanks for the great API ;)

@f1ab83o
Copy link

f1ab83o commented Jan 25, 2017

For NoneType error, try to set self.candles into a var and check if is not None.
For example:

def put(self):
"""Method to check put pattern."""
t_candles = self.candles
if t_candles is not None and ( t_candles.current_candle.candle_type == "red" ):
return True

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants