Indicators
QStick
Description
The Qstick indicator is a technical analysis indicator developed by Tushar Chande to numerically identify trends on a price chart. It is calculated by taking an 'n' period moving average of the difference between the open and closing prices. A Qstick value greater than zero means that the majority of the last 'n' days have been up, indicating that buying pressure has been increasing.
The Qstick Indicator is also called Quick Stick. It is not widely available in trading and charting software.
The Qstick Indicator is also called Quick Stick. It is not widely available in trading and charting software.
For more information, please visit Investopedia.
Params & Instance Methods
#initialize @param series [Array] An array of arrays containing open, close prices, e.g. [[open, close], [open, close]] @param period [Integer] The number of periods to use in the calculation - default is 20 #call @return [Float] The current Qstick value #valid? @return [Boolean] Whether or not the object is valid
Example
require 'ruby-technical-analysis' series = [[62.5625, 64.5625], [64.625, 64.125], [63.5625, 64.3125], [63.9375, 64.875]] period = 4 qstick = RubyTechnicalAnalysis::QStick.new( series: series, period: period ) p qstick.valid? # true p qstick.call # 0.7969