ludowillems 111 posts msg #149421 - Ignore ludowillems modified |
10/26/2019 7:49:58 AM
Dear all,
I am looking for a filter that returns the number of occurences of a series of 3,4,5,6,7,8,9 green(or red) candles over the last n-days. If for example, the filter returns only one occurence of a series of n-candles in the last n-days (lets say 1000 days, appr. 3 years) there is a great probability that the next candle will be of the opposite color.
so far I managed to identify a series:
Many thanks for your time.
Ludo
|
xarlor 585 posts msg #149430 - Ignore xarlor |
10/26/2019 2:42:49 PM
As an example this will show you stocks that had 9 straight green candles in a row. It ill also show you a histogram of the number of green candles in a row.
If you prefer an oscillator instead of a histogram:
|
ludowillems 111 posts msg #149433 - Ignore ludowillems |
10/27/2019 6:58:30 AM
Thank you Xarlor. I managed to add a column that counts the number of occurences. But there seems to be a limit in number of days in history.
|
xarlor 585 posts msg #149437 - Ignore xarlor |
10/27/2019 3:10:01 PM
Yes, SF has a limit of 1 year's worth of trading days (252 days) on any single indicator. You have to do some trickery to include multiple years.
Here is your filter that gives the number of times there have been 9 green candles in a row within the last 4 years (1008 trading days). A result of 1 means this is the first time it has happened in 4 years. The results are sorted from lowest number of occurrences to highest.
|
ludowillems 111 posts msg #149460 - Ignore ludowillems |
10/28/2019 10:26:44 AM
Great job! thanks for your time!
Ludo
|
SAFeTRADE 645 posts msg #149465 - Ignore SAFeTRADE |
10/28/2019 11:01:33 AM
You can only have count occurrences up to 100.
From Stockfetcher indicators:
Count -- Occurrences
Parameters Indicator,period
Period Limit 100
Usage count(indicator,length)
Hope this helps
|
ludowillems 111 posts msg #149470 - Ignore ludowillems |
10/28/2019 11:45:27 AM
thanks safetrade !
|