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

Added math function ‘Median’ and ‘Mode’ to Stock History and Stock Relative History #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Added math function ‘Median’ and ‘Mode’ to Stock History and Stock Relative History #11

wants to merge 2 commits into from

Conversation

dennislwy
Copy link
Contributor

Added math function ‘Median’ and ‘Mode’ to Stock History and Stock Relative History
-Median, http://www.mathsisfun.com/definitions/median.html
-Mode, http://www.mathsisfun.com/definitions/mode.html

@dennislwy dennislwy changed the title Added math function ‘Median’ and ‘Mode’ to Stock History and Stock Relative History in Stock Indicator Editor Added math function ‘Median’ and ‘Mode’ to Stock History and Stock Relative History Apr 5, 2014
@yccheok
Copy link
Owner

yccheok commented Apr 11, 2014

Thanks for the contribution.

In fact, we can almost add "many more" math functions if we want. The important question is, "are the added math functions useful to stock indicator builder"?

In another word, have you come across any stock indicators, which require "mean" and "mode" functions?

@dennislwy
Copy link
Contributor Author

There isn't any official stock indicator uses median or mode.

I do agree "Median" have no real usage most of the time, I just added in just for the sake of Math Statistic completeness.

But i do use a lot "Mode" in my own custom indicator to indicate what is the most common price a stock falls at, hence knowing is a good time to buy in that stock

Example: Say i identified a potential stock and kept in my watchlist but price is consider high now, I wanted to create a BUY SIGNAL indicator for this stock when the price is below or equal it's support price (the lowest price that it always falls at in past 30days).

I feel this is when "Mode" is more useful instead of "Mean" in this situation

The indicator will goes like this,
Real Time(Last Price) <= Relative(Mode(Days:30days, Last Price)) -> ALERT

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

Successfully merging this pull request may close these issues.

2 participants