Detecting Price Trends in python - Higher Highs, Higher Lows

Поделиться
HTML-код
  • Опубликовано: 14 дек 2024

Комментарии • 58

  • @franky12
    @franky12 Год назад +12

    There is a bug in your code, you assign all four ohlc values from just the single "df.open.astype(float)" column

    • @ChadThackray
      @ChadThackray  Год назад +3

      Oops! Thanks for pointing this out.
      Thankfully it doesn't effect the later code too much. Just a few parameters need tweaking

    • @VanaH-k6l
      @VanaH-k6l 9 месяцев назад

      Hi
      Can you shate the python code? Thanks

  • @Asparuh.Emilov
    @Asparuh.Emilov 9 месяцев назад +4

    Dude, that is amazing! Do you realize this is the perfect filter to count the Elliot Waves? Brilliant

  • @whiteshadow5881
    @whiteshadow5881 Год назад +1

    Mans is leveling up my algo trading skillset

  • @knakibwt
    @knakibwt Месяц назад

    Thanks for the video,here is like for ya❤

  • @accesoremoto6113
    @accesoremoto6113 Год назад +8

    I've been looking for a channel like this for a while.
    Be patient with your growth, keep up the fantastic work you are doing.
    The demand for this type of content (building specific trading tools) is slowly but surely growing.
    I'm sure time will reward your dedication.
    If you don't mind a suggestion, I would recommend (to accelerate that growth) building tools that are normally only available on paid platforms (Cumulative Volume Delta indicators, footprint charts, market profiles, etc). Many new traders are always looking for free platforms to use them and they will definitely stumble across your videos if they do.
    Cheers, mate.

  • @ersineser7610
    @ersineser7610 Год назад +1

    Hi, thank you for sharing videos and your knowledge. Greetings. Have a great year.

  • @bayroncabrera7566
    @bayroncabrera7566 Год назад

    Truly fascinating; I appreciate your sharing of expertise. I eagerly anticipate further enlightening insights from you.

  • @ugx77
    @ugx77 Год назад +1

    Very good and useful tutorial. Thanks Chad 👍

  • @brentnunn2595
    @brentnunn2595 Год назад +1

    Enjoying your videos and learning a lot from them.
    Thank you for sharing!

  • @dutuzeremy5544
    @dutuzeremy5544 9 месяцев назад

    Great work mate!.

  • @amywarke3481
    @amywarke3481 Год назад +1

    Very useful!!👍🏼 This video is the highest high

  • @DannyPhantumm
    @DannyPhantumm 4 месяца назад +3

    Savitzky-Golay filter is not as useful as it is presented here; there's a future leak. Under the hood, Savitzky-Golay calculates a value using a "data window". You chose the value 5 in the savgol_filter method, so your data window length is 5. This means it slides through your data with a window of size 5, fits a polynomial function to ALL 5 points, then outputs the savgol_filter value for the middlemost point. i.e, it uses 2 data points from the future. This is important, obviously, because when using this in real time, you don't know the future... so, you will not catch turns until 2 bars after they happen. This is no issue if you are swinging or otherwise do not need hyper accurate entry.
    However, there are smoothing methods besides Savitzky-Golay which have online/realtime capabilities.

    • @knakibwt
      @knakibwt Месяц назад

      Smoothing doesnt allow to find points. This is find peacks he used. Are you sure with window 5 for smoothing will be 2 bars between pint and edge of the main window?
      And this guy made it for info purposed only, who cares if people run to build gold strategies :)) after watching.
      Anyway representatuij is grat

  • @stevenpham6734
    @stevenpham6734 Год назад +1

    Keep up the work good Chad!
    though isn't quite practical but it's a nice and refreshing concept from the usual TA.
    Love to see more stuff in the future.

  • @timvildanov
    @timvildanov Год назад +1

    Thanks for a very useful video!

  • @oyibeebuka
    @oyibeebuka Год назад +3

    Thanks for the update, but how do I download the source code

  • @NovaBraulio
    @NovaBraulio Год назад +7

    Can you share the source code?, Please

  • @miscelaneousVideos
    @miscelaneousVideos Год назад +2

    Hey Chad, Great video. Is there a link to the code? where we can read it more easily?

  • @mohamedhicham6298
    @mohamedhicham6298 9 месяцев назад

    i do not understand how does th function animate() see the definitions of variables defined outside of it (df, bars_in_frame, price... etc) ?

  • @MotinQ
    @MotinQ 10 месяцев назад +1

    23:02 - 23:04 It's repainting. Is that correct?

    • @ChadThackray
      @ChadThackray  10 месяцев назад

      Yeah this is a repainting indicator. Be careful when backtesting it

  • @RobertoNormândia
    @RobertoNormândia 10 месяцев назад

    Your post is very good! In your example, the fact of calculating trend lines based on the last 30 candles limits the temporal extension of the lines drawn. This means that support and resistance lines will be determined primarily based on the most recent trend, not taking into account more distant historical behavior.
    If we want to identify long-term trends or capture broader historical patterns, wouldn't it be appropriate to consider a more extensive data set when calculating support and resistance lines? How does the algorithm behave?

  • @wakandan1
    @wakandan1 Год назад +3

    can you publish your code?

  • @batuhanbayraktar337
    @batuhanbayraktar337 Год назад +3

    could you share this code ?

  • @dgoullet1
    @dgoullet1 7 месяцев назад

    nice! is that the same to a channel breakout?

  • @stevemorosko6171
    @stevemorosko6171 4 месяца назад

    is there a way to do your programs without binance, maybe yahoo finance I don't have a binance account

  • @drcesarvarela
    @drcesarvarela Год назад

    I haven't seen the whole thing yet but I'm sure it will be an excellent video.

  • @daymaker_trading
    @daymaker_trading Год назад +1

    Hi Chad, thanks so much for your amazing videos, they are so so helpful!!
    In case if it's interesting for you, would be great to know how to detect sideways market regime.
    In sideways filtering out signals by trend gives bad effect. But how to detect it early - that's so hard... Which technique might fit for this task?
    Thank you! All the best.

  • @Mars7822
    @Mars7822 Год назад

    Good work man...........

  • @mosio3210
    @mosio3210 10 месяцев назад

    great job ❤🌹
    can you please make a repo for tutorials and share the repo URL so we could have access to tutatials source codes ?

  • @randomdude79404
    @randomdude79404 Год назад +1

    This code seems to have some look ahead bias (repainting) , the labelling of the low / high seems to change as new data comes in.

    • @ChadThackray
      @ChadThackray  Год назад

      Indeed it does. You should take care in your backtesting to stop it from looking ahead

    • @randomdude79404
      @randomdude79404 Год назад

      @@ChadThackray The use cases are limited in such case , perhaps make a revised video where the indicator is not subject to this ?

    • @ChadThackray
      @ChadThackray  Год назад

      @@randomdude79404 Maybe you can make one for me! What are the current limitations?

  • @k2icc
    @k2icc Год назад

    I got it working but with yfinance data and some tweaks. The only thing not working is the video due to:
    AttributeError: module 'matplotlib' has no attribute 'subplots' for: fig, ax = plt.subplots()

  • @BoHorror
    @BoHorror 6 месяцев назад

    Have you thought about making it buy with a 1 ATR stop loss and a 2 ATR TP perhaps

  • @gianlucaverzichelli1981
    @gianlucaverzichelli1981 Год назад

    is the code available somewhere? can be used to trade in real time? thanks

  • @djdawidoss
    @djdawidoss Год назад

    How can I do the same in django and display to user on web page ?

    • @ChadThackray
      @ChadThackray  Год назад

      You can ask on Stack Overflow or hire a professional if you want help building something like this

  • @jairai2739
    @jairai2739 9 месяцев назад

    where is the find peak function?

  • @shahaffrsshahaffrs5190
    @shahaffrsshahaffrs5190 Год назад +2

    Is anyone going to talk about the double-look-ahead bias in the video? First Savitzky Golay and then find_peaks... each of those use next data points to calculate previous ones. This is the worst mistake possible to make in technical analysis, and it comes from lack of research. Whether or not the demonstrator in the video is aware to this problem, not stating the lookahead bias is very bad.

    • @ChadThackray
      @ChadThackray  Год назад

      Interesting. Do you think using indicators that look ahead are always bad?
      As long as your backtesting system is robust it should be ok, no?

  • @andreialcaza
    @andreialcaza Год назад +3

    repaint and late signals in my opinion

    • @jonathanstearns5587
      @jonathanstearns5587 Год назад

      He stated at the beginning. This is not a signal in and of itself. It is only intention of showing if in an uptrend or downtrend as TA defines by higher high and higher low, etc.

  • @arabtechnologytoday7322
    @arabtechnologytoday7322 Год назад

    please code in your video

    • @ChadThackray
      @ChadThackray  Год назад +2

      You mean code it line by line like some of my other videos?
      I'm experimenting with different formats right now, but I'll take this feedback on board
      Thanks for watching!

  • @oliver3880
    @oliver3880 Год назад +1

    not that useful from the intro alone you see it repaints a lot. so it changes the past labels past on more info so you have a massive data leakage in your code.
    for example let's say you go long based on something in combination with the code saying there is an uptrend, now new information comes in and the code changes that specific uptrend label to a downtrend label. now what do you do.
    should never go back in time and change the labels it gave
    edit: tldr it uses data from the future to label the past

    • @ChadThackray
      @ChadThackray  Год назад +1

      Hey Oliver! Thanks for watching.
      I agree with your analysis of the code, it does re-paint the past. I don't think that's a bad thing though, future price action can and should effect our interpretation of past trends

  • @Annnteee
    @Annnteee Год назад +1

    hi, thanks this is really interesting.
    i am getting following error when displaying in animation. can you pls suggest how to solve it
    File "C:\Python\trend2.py", line 213, in
    video = HTML(anim.to_html5_video())
    ^^^^^^^^^^^^^^^^^^^^^
    File "C:\Python\Lib\site-packages\matplotlib\animation.py", line 1284, in to_html5_video
    Writer = writers[mpl.rcParams['animation.writer']]
    ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Python\Lib\site-packages\matplotlib\animation.py", line 148, in __getitem__
    raise RuntimeError(f"Requested MovieWriter ({name}) not available")
    RuntimeError: Requested MovieWriter (ffmpeg) not availabl