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

Trade style specific question [Support and resistence] #1126

Open
moritz31 opened this issue Dec 8, 2023 · 8 comments
Open

Trade style specific question [Support and resistence] #1126

moritz31 opened this issue Dec 8, 2023 · 8 comments
Labels

Comments

@moritz31
Copy link

moritz31 commented Dec 8, 2023

Dear community,

i have very specific use case for this library. My trading is based on price action. Normally on the chart the first thing i do is drawing in significant support and resistence levels. I read the documentation and looked into the source, but couldn't find anything simliar.

Is this currently supported ? Or would this be possible to implement?

Best regards
Moritz

@TheCookieLab
Copy link
Member

TheCookieLab commented Dec 8, 2023 via email

@moritz31
Copy link
Author

moritz31 commented Dec 8, 2023

Thanks for the fast reply. So i Look at the Chart and i see a lot of reactions at a specific Level so i draw a box at that Level so that i get the Most reactions but do Not let the Zone get too big.

@TheCookieLab
Copy link
Member

TheCookieLab commented Dec 8, 2023 via email

@moritz31
Copy link
Author

moritz31 commented Dec 8, 2023

so maybe i make an example to be more clear.

I draw in the chart some support and resistence levels like described here
https://www.thebalancemoney.com/how-to-trade-based-on-support-and-resistance-levels-4043477

and then trade reactions on them based on trends and candlestick patterns.
There are basically some candlestick pattern indicators in ta4j, but i would need to combine them with the support and resistence levels. For these are currently no indicators implemented when i'm right and i am not sure if it is possible to implement something like this into ta4j. What would basically need to be done:

For every bar look into the past and find price points where the chart reacts and create support and resistance points for that. So every bar would basically have something like a set of support and resistance levels because the can change over time. This needs then be combined with the candlestick rules.

@TheCookieLab
Copy link
Member

TheCookieLab commented Dec 8, 2023 via email

@Andre0711er
Copy link

Hi.
I just run in same issue, trying find a way how to detect support and resistance level's programmatically.
Did someone has an idea, how other frameworks (might be in python?) will has that or how they do that?

I just will try creating one and give it back to ta4j repo.

Greets,

André.

@TheCookieLab
Copy link
Member

TheCookieLab commented Dec 19, 2023

I'm currently out of the country on vacation until the end of the year but just thinking out loud, perhaps we may be able to implement this as an indicator (i.e. TrendLineResistanceIndicator) that roughly does the following:

  1. Finds the last N swing highs (see Feature/recent swing high and low indicators #1125) using those values as the y-coordinate and their respective index as the x-coordinate
  2. Take a "high pass filter" to the results of Step 2, keeping only the highest swing highs (perhaps highest swing high value for every x bars)
  3. Uses the values from Step 2 to calculate and cache a modified best fit line (perhaps using SimpleLinearRegressionIndicator or something similar but with a ceiling function)
  4. Thus when calling TrendLineResistanceIndicator.calculate(index i) it returns the best fit line values found in step 3 for the given index

Any thoughts on the why or why nots of this approach?

@Andre0711er
Copy link

Hi.

Cool. good idea! I will do my own research next days too.
Otherwise, i just play around with "Kairi Relative Index" (KRI) which give pretty good "hints" on high's and low's. (Spikes greater 1 for high's and spikes lower -1 for low's)
So, if you interested, i can paste my example code here for research.

KRI Indicator can be found here: https://github.com/Cypher01/ta4j-extended/blob/main/src/main/java/org/ta4j/core/indicators/KRIIndicator.java

Greetings,

Andre.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants