andredumas / techan.js

A visual, technical analysis and charting (Candlestick, OHLC, indicators) library built on D3.
http://techanjs.org/
MIT License
2.4k stars 537 forks source link

Automatic trendline algorithm #3

Open andredumas opened 10 years ago

andredumas commented 10 years ago

I'm searching for a reliable algorithm to detect trendlines.

Once found I'll add it in.

BrittMcDanel commented 9 years ago

Hello, An idea for this is to use William's Fractals (Here is some article explaining how to use them: http://www.investopedia.com/articles/trading/06/fractals.asp). Connecting the fractals would provide trendlines.

andredumas commented 9 years ago

Interesting. I will have a look. Thanks

chip-and-dail commented 9 years ago

+1

albertosantini commented 8 years ago

Another approach is using Directional Changes based on threshold.

For instance, http://www.bracil.net/finance/DirectionalChanges/

andredumas commented 8 years ago

http://stackoverflow.com/questions/373186/mathematical-function-differentiation-with-c/373265#373265

AGrush commented 8 years ago

Hi, checked that link. Need help with this too.. What significance is differentiation to finding trend line points? Also what software are you using to code&trade these trendlines?? any help would be greatly appreciated

andredumas commented 8 years ago

Hi @andrei989

It's related to finding turning points. William's fractals, directional change and differentiation are techniques that can be applied to find these.

The software used to code/trade these is bespoke. Example of experimentation with techan posted on #2 the other day: auto-support-resistance

It's nicely finding tops and bottoms using the calculation from that particular SO post. These pivot points can be used to plot a trend as suggested in this very detailed (and helpful) post: http://stackoverflow.com/questions/8587047/support-resistance-algorithm-technical-analysis/8590007#8590007

andre

AGrush commented 8 years ago

Thats cool thank you.. So could you just say look for low high low bars and then just make sure there and no higher high in the nearest 2 bars left or right to find top points?

On 29 Sep 2016 00:47, "André Dumas" notifications@github.com wrote:

Hi @andrei989 https://github.com/andrei989

It's related to finding turning points. William's fractals, directional change and differentiation are techniques that can be applied to find these.

The software used to code/trade these is bespoke. Example of experimentation with techan posted on #2 https://github.com/andredumas/techan.js/issues/2 the other day: [image: auto-support-resistance] https://cloud.githubusercontent.com/assets/1518740/18621372/c9462608-7e65-11e6-8115-85065e25f74d.png

It's nicely finding tops and bottoms using the calculation from that particular SO post. These pivot points can be used to plot a trend as suggested in this very detailed (and helpful) post: http://stackoverflow.com/questions/8587047/support-resistance-algorithm- technical-analysis/8590007#8590007

andre

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/andredumas/techan.js/issues/3#issuecomment-250333916, or mute the thread https://github.com/notifications/unsubscribe-auth/AVdBHpsTIqyxYN5Enez00FY-_GuQdu5wks5quvyCgaJpZM4Ce6cg .

bennycode commented 6 years ago

@andredumas Have you already worked on this issue or do you need help? 😃

rmcclaincf commented 6 years ago

@andredumas that chart you posted is exactly what I need. Do you have the code you used to generate it?

AGrush commented 6 years ago

No i gave up on the search, but trade it manually still making money.. if you find a way to code it let me know!

On 5 Mar 2018 17:32, "Ron McClain" notifications@github.com wrote:

@andredumas https://github.com/andredumas that chart you posted is exactly what I need. Do you have the code you used to generate it?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/andredumas/techan.js/issues/3#issuecomment-370498313, or mute the thread https://github.com/notifications/unsubscribe-auth/AVdBHoSarf5G5UApILHhxCTcoCqIIP7dks5tbXaggaJpZM4Ce6cg .

ccj242 commented 2 years ago

@andredumas I second @rmcclaincf - the chart you posted is EXACTLY what I need, - I can calculate the floor pivot points using a library like trendyways but I'm having a hard time getting results like the image you posted. Thanks!!

barrard commented 2 years ago

@ccj242 Thanks for the trendyways tip! Not sure how I never managed to find this before but sure looks like it has a lot of nice functions.