technical-analysis
technical-analysis copied to clipboard
Add Higest high and lowest low indicator
Using the lib, I realized there is not any indicator to get the highest high from a data set.
I let the code i used for it.
def highest source, index, len = 20
@input_data.slice(index..index+len).map{|it| it[source] }.max
end
...
def lowest source, index, len = 20
@input_data.slice(index..index+len).map{|it| it[source] }.min
end
Probably this could be included on a helper class just like the standard deviation. Then they could be reused by other indicators.
Best Regards!