Detecting Price Trends in python - Higher Highs, Higher Lows

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

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

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

    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 6 месяцев назад

      Hi
      Can you shate the python code? Thanks

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

    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

  • @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.

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

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

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

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

  • @DannyPhantumm
    @DannyPhantumm 2 месяца назад +1

    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.

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

    Can you share the source code?, Please

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

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

  • @miscelaneousVideos
    @miscelaneousVideos 9 месяцев назад +2

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

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

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

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

    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?

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

    could you share this code ?

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

    can you publish your code?

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

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

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

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

  • @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.

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

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

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

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

  • @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()

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

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

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

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

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

    nice! is that the same to a channel breakout?

  • @shahaffrsshahaffrs5190
    @shahaffrsshahaffrs5190 10 месяцев назад +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  10 месяцев назад

      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?

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

    where is the find peak function?

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

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

  • @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.

  • @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 Год назад

    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

  • @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.

  • @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!

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

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

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

    Thanks for a very useful video!

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

    Great work mate!.

  • @djdawidoss
    @djdawidoss 11 месяцев назад

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

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

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

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

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

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

    please code in your video

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

      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!