Open saulable opened 4 years ago
Otherwise I get error of NameError: name 'METHOD_PROBHOUGH' is not defined when doing like so
trendln.plot_support_resistance( hist[-1000:].Close, method=METHOD_PROBHOUGH)
I have the same problem but also when passing with quotes i get error:
ValueError: method must be one of METHOD_NCUBED, METHOD_NSQUREDLOGN, METHOD_HOUGHPOINTS, METHOD_HOUGHLINES, METHOD_PROBHOUGH
And without quotes:
NameError: name 'METHOD_NSQUREDLOGN' is not defined
@GregoryMorse @saulable
has this been resolved? thanks
I am having the same issue
@saulable It's an enum not a string, try this one:
trendln.plot_support_resistance(
hist[-1000:].Close, method=trendln.METHOD_NCUBED)
The correct solution is to either import everything e.g. import trendln
and to as suggested use trendln.CONSTANT_NAME
syntax or use from trendln import CONSTANT_NAME
. It is not necessary for these to be strings. However I will update the examples or look for scenarios where this confusion can come up so it will be corrected in the next version. These are just numeric constants with names provided for convenience. Strings might be okay as performance is not particularly an issue on these parameters but nonetheless, constants seem cleaner.
Hello,
I'm not that great with Python, more of a JS dev, so I don't know if this is correct?
When trying to pass in the parameters method, extmethod without quotes results in error. I suggest a fix.
Then on lines 950 - 960 of init.py