Triangle Price Pattern Detection In Python | Algorithmic Trading Indicator

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

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

  • @sidharthgarg2348
    @sidharthgarg2348 2 года назад +5

    Amount of efforts ,u put in making this strategy is crazy 💯

  • @jameswang6714
    @jameswang6714 2 года назад +2

    Not only the efforts, but also the brightness. It is obviously better than those technical indicators. Genius!We all get benifit from you.

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад +1

      Thank you so much for your kind comment, I am glad these videos are of help.

  • @xuloIsaias
    @xuloIsaias 2 года назад +5

    Great video. Once it breaks the resistance or the support level, you can check if the new percentage of the volume increased or now compared to the previous volume, so if it is a big breakout then the volume will tell you

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад

      Thanks for sharing, indeed I haven't thought about the volume in here, good idea!

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

    AMAZING!!
    truly one of the most fitting and educential videos on this subject
    great job

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

      Thank you so much for your appreciation! Good luck to you!

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

    Interesting method. I like how it fits the line based on however many pivot points are in a set lookback. I've only ever experimented using the last N pivot points. I'll have to try yours out. In my experience, I've had better results using just the close (rather than high/low) to identify pivot points. I believe its because the high/low often have spurious spikes.

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

      You are absolutely right about using the close price, I tried using the highs and lows and looking at the data not many patterns were present or detected, maybe if I use the closing price I might get more out of the data.

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

    This was a great video! Thank you for sharing the code. We hope you don't mind, we modified the code to find wedge and flag patterns. We will post the videos of the results soon.

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

      Sure keep us posted, good luck!

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

      ​@@CodeTradingCafe Is it possible to write this algorithm on PineScript version 5 ?

  • @user-cn5ep4kq7x
    @user-cn5ep4kq7x 2 года назад +5

    yes plsssssssss we need backtest for this stratgey that will be number 1 in youtube

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад +1

      Thank you for your support, a backtest is more demanding I will add it to the list but will need few weeks

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

      @@CodeTradingCafe Did you ever backtest this? :)

  • @sefatergbashi
    @sefatergbashi 2 года назад +7

    Amazing. Thank you so very much for your time and effort in putting together these awesome tutorials!

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад

      Thank you for your support and appreciation, hopefully videos will be of help.

  • @steeltormentors
    @steeltormentors 2 года назад +4

    Sir, any plan on continuing this series? I see these kind of videos are quite popular in your channel with 10k plus views.
    Would be awesome if you do the other chart pattern like Triple Top / Triple Bottom, Rising Wedge / Falling Wedge, etc...
    Great content!

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад +2

      Thank you for your comment, can be extended to more videos if needed but might need some time.

    • @steeltormentors
      @steeltormentors 2 года назад

      @@CodeTradingCafe that would be awesome!
      Also can you consider modifying the code to make this chart pattern recognition scan let's say S&P 500 stocks in the last 50 days of trading and the output would be a list of stocks that are currently forming a descending triangle or an ascending triangle.
      The list would be super useful and actionable for the trader to consider taking some positions.
      In this video we get a list of all triangles that have formed in the dataset, we don't actually need all triangles...from a trader's point of view we only need the most recent triangle.
      Scale it to scan all S&P 500 stocks and booomm...actionable insights from the output.

  • @bikramssharemarkettradingc7366
    @bikramssharemarkettradingc7366 2 года назад +1

    I think you can find out trend lines this way. Lots of stats reading necessary to understand .. a nice video though hv little technical complexity. But for stocks or general chart a % can be used instead of absolute values

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад

      Thank you for your comment, you are right a percentage is nicer.

  • @cooperdes3950
    @cooperdes3950 2 года назад +2

    great vid, helpful for learning how to apply linear regression. However, for backtesting I believe the 'pivot' function will suffer from a lookahead bias. you call pivot with a current df index, but once in pivot, you look k-indices ahead to check for extrema.

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад +1

      Hi thanks for sharing, but I would disagree, because you can take a current candle and simply look for past pivots to fit your triangle, this video shows the fitting part but not the full function ready to use.
      Edit: I avoided providing the full function because viewers tend to copy and paste using it as a blackbox without modifications

    • @cooperdes3950
      @cooperdes3950 2 года назад +1

      @@CodeTradingCafe that makes sense 👍. easy modification to prevent the supposed bias anyways. Ran a strat with S&R levels with great success since I had (ignorantly) unknowingly looked ahead. Appreciate the feedback! Have found great results using this technique to identify breakout. Best of luck!

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад +1

      @@cooperdes3950 but you are right to stay alert about the look ahead issue I have seen it in so many algotrading blogs (mainly one candle ahead because of indexing edge cases).

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад +1

      @@cooperdes3950 something similar happened when I randomly sampled sequential data for machine learning model, and the results were so amazing I knew there was a mistake. Too bad I had high hopes for less than a second 🙂

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

    Interesting indicator. However it introduces a look-ahead bias into the data. If we were backtesting data and computing the pivots, they might change slightly throughout the simulation. Therefore, I think it would be better to compute the pivots on the fly as you are looping through the data.

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

      Hi, you are right, we should only consider past candles, it would still work though for detecting channel boundaries/patterns. Good luck!

  • @azrulfyz1162
    @azrulfyz1162 2 года назад +1

    Thanks, this was a good example for coding a few pattern detection... 😍

  • @santhosh6700
    @santhosh6700 2 года назад

    Most awaited topic and it is one of my request...
    Thank you bro...

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад

      Thank you for your comment, I hope the video will be of help

  • @ZAREIGH61
    @ZAREIGH61 2 года назад +2

    Thank you. It is very nice. I think we could use this code for detecting wedge patterns too. But both slopes must be rising or falling at the same time and it must have at least 3 minimum for falling wedges and at least 3 maximum for rising wedges. Could you make a video in this regard?

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад +1

      Thank you for your support and for sharing this idea yes I will add wedges on the list and it's correct as you are saying

    • @ZAREIGH61
      @ZAREIGH61 2 года назад +1

      @@CodeTradingCafe thanks again and I will appreciate it if you do that video and publish the code.🙏

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад +1

      @@ZAREIGH61 sure, I always publish the codes, but will need some time, the list is long

    • @steeltormentors
      @steeltormentors 2 года назад +1

      yeah I've been wanting to see more videos about chart pattern recognition. Any patterns will do..

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

    finished watching

  • @robin7769
    @robin7769 2 года назад +1

    Great effort, please backtest this pattern in a strategy, that way we can be sure if it can be used in a profitable way.

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад

      Backtest is more difficult but will add it to the list

    • @robin7769
      @robin7769 2 года назад

      @@CodeTradingCafe I have a modified backtesting system, if you want we can collaborate

  • @futurestadawul
    @futurestadawul 2 года назад +1

    Thanks man for sharing this precious work..

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад +1

      Thank you for your support, I am glad these videos are of help

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

    Thank you sir...... very helpful.

  • @sukdeb5315
    @sukdeb5315 2 года назад +1

    You are Genuine

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

    great video! thank you so much

  • @philomenantonybenhur6780
    @philomenantonybenhur6780 2 года назад +1

    Thank you so much for this video !

  • @luvrahooo
    @luvrahooo 2 года назад +1

    Great efforts. Very good way of detecting the triangles. There is one such famous strategy which is very popular nowadays in India, it is the 5 EMA short selling intraday strategy. I see a lot of videos where people show strategies on historical data along with graph but very few people have video to live trading or paper trading. How to implement that in live market? Please take some day trading example say 5 minutes or even 1 minute. Please show some example on how a proper bot must be created how frequently candles must be downloaded, how to optimize for multiple stocks?

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад +1

      Hi a trading bot is relatively simple to code however testing takes a month or two because you have to wait that long to get the final results. I will have to make a video about it in the future.

    • @luvrahooo
      @luvrahooo 2 года назад +1

      @@CodeTradingCafe Thanks. There are n number of ways but wanted to know which is better whether cronjob or websocket or schedule library, also how to handle positions if 2 signals come. How to restrict number of trades in a day etc or how to pyramid or say to put a trailing stoploss in actual using python code to modify a stop loss. How to scale up this process. All these things will be interesting to learn. Will be waiting for more videos.

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад +1

      I will include these in the python learning playlist, will need some time though. technically it will depend on the API interface of your trading platform/broker check this video meanwhile ruclips.net/video/e1Ut4Iap10M/видео.html

    • @nilesh168
      @nilesh168 2 года назад +1

      @@luvrahooo for this you will have to build -> implement-> test -> and tune -> test->tune untill profit to loss ratio is more.

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад +1

      Thanks for the help 🙂

  • @durchnet
    @durchnet 2 года назад +2

    Can you do a video on central pivot range CPR and back test it? i have never seen anyone do it on jupyter and has a good winrate

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад

      Thank you for your comment, I will check it out but honestly the list is long

  • @sankettilekar8650
    @sankettilekar8650 11 месяцев назад +1

    Thanks!

  • @pietraderdetective8953
    @pietraderdetective8953 2 года назад

    Woww you made it!
    Super awesome Sir..really appreciate your effort!

  • @dexter_hacks
    @dexter_hacks 2 года назад +2

    What changes are required to get it working with YFinance historic stock data instead of csv? After getting the data into df, the code exits after running for a while. Sometimes I get warning in linregress FloatingPointError: invalid value encountered in double_scalars" warning. Is there a sample code available which shows how to get this working with YFinance?

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад +1

      Hi, theoretically it should run straight when you replace the csv part by loading yfinance data unless you have a missing value somewhere or different columns titles just small bugs like that. Once you manage a clean dataframe it should be fine.

    • @dexter_hacks
      @dexter_hacks 2 года назад +1

      @@CodeTradingCafe I think the issue was I directly jumped on the code after watching half of your video. I understand now that I would first need to check if any candleid is present as the initial check. Then try and plot the lines using that candleid as reference. Thanks for the video!

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад

      I am glad it's solved and thank you for your feedback!

  • @YasirAlbayatijaype
    @YasirAlbayatijaype 2 года назад +1

    hi , thx for ur videos , when u will test it as strategy

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад

      Hi I have a long list so it might be a while before putting it into a code... sorry. I will keep it in mind hopefully I will get the chance to do it. Thanks a lot for your support.

  • @eliotharreau7627
    @eliotharreau7627 2 года назад +1

    Very nice my freind. Can you make a program who detect a range and also detect the exit from this range ? Cheers. ✌💪

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад +1

      Doable but now I am investing in the vwap it seems to work nicely!

  • @epo295
    @epo295 2 года назад +1

    Hey! Great video. I' m a beginner. i have a question regarding the line: df['pointpos']= df.apply(lambda row: pointpos(row), axis=1 ) Why are we using row here? I tried x instead and it still worked. So I was interested if there was any particular reason to do it that way.

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад +1

      Hi thank you, it's the same I just called my x row instead.

  • @bosypuspus
    @bosypuspus 2 года назад +1

    This content is gold. I was wondering is it possible to use an image recognition algorithm e.g. CNN to detect these patterns?

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад

      Thank you for your comment, it is possible but it doesn't work well usually CNN is data hungry

  • @orangen9290
    @orangen9290 2 года назад +1

    hello i like your videos. Can you make a quasimodo pattern?

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад +1

      Hi thank you, check my video on head and shoulders pattern it might be of help.

  • @vanaromHUOT
    @vanaromHUOT Месяц назад +1

    Hi
    Can you combine all patterns code in python in one file? thanks

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

      Yes it's possible, but it becomes too large file for a video :)

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

      Thanks! Can share the python file with all patterns

  • @top10top54
    @top10top54 2 года назад +1

    this is amazing

  • @sukdeb5315
    @sukdeb5315 2 года назад +1

    Thank you Sir

  • @thetrianglewaffle
    @thetrianglewaffle 2 года назад +1

    Hi there man, I sent you an email yesterday about possibily having a session with you to take a look at a simple bearish engulfing algo I'm trying to make. Let me know what you think cheers

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад

      Yes sorry for the delay, I didn't expect as many requests for such a small channel, I will send you an email reply today.

  • @scottbirkby2944
    @scottbirkby2944 2 года назад +1

    under the pivotid code (lambda, why do you have x.name?)?
    Thanks

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад

      Hi, actually looking at it now I think it can be removed just put x if I am not mistaken... Try it out I will check from my side and get back with a better answer, kind of hard to remember what I did there

    • @scottbirkby2944
      @scottbirkby2944 2 года назад

      @@CodeTradingCafe I am getting a lot of errors on that first def pivotit(df1, l, n1, n2)... I am using a yahoo finance pull on the data (spy index) not sure if that has anything to do with the errors?

  • @Tormento0o1
    @Tormento0o1 2 года назад +1

    Thank for your different code :). I have a question, i don't have x.name in my dataFrame. how can i get de row for the l param in pivotid fonctonne ?

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад

      Hi thank you, I am not sure I understand your question, but usually I build x.name whatever columns needed before starting the function.

    • @thomastthai
      @thomastthai 2 года назад +1

      x.name defaults to the index column if it's not used to compare to the other column heading names.

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад +1

      Reading my 3 months old answer I don't know what I meant by that, probably Gomes didn't either!

  • @nilesh168
    @nilesh168 2 года назад +1

    Hi, this code is only for back testing. How about live data say 5min candel data? I tried to implement but it always gives signal after 3 candels as our pivot find function takes 3 candels. Can we add modify code so that it takes last candle assuming pivot and generates graph. I know it will challange to decide last candel to consider pivot for max or min line. Can we consider both and give applicable breackout chart?
    I can share more details like data i am trying on.

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад

      Hi, it can be coded in a way that no channel is confirmed unless you have at least 3 pivots high and 3 pivots low for example, this way your channel is clearer, just like in real life you can't guess a channel is forming until most of it is already on the screen.

  • @kudzovu
    @kudzovu 2 года назад +1

    Can you make gen signal backtest with this strategy ?

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад

      Surely doable, but if you want to try it quickly, you can put it all in a function and use it in a backtest.

    • @kudzovu
      @kudzovu 2 года назад +1

      @@CodeTradingCafe I'm not very good at python so can you test this strategy with Backtesting.py like you did before and send me the source code?

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

    How would you detect the bearkout?

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

      Easiest way is to check if close or open values are above or below the computed slopes. I might think of a video for this but it will take me a while to record.

  • @andrewpiriazev386
    @andrewpiriazev386 2 года назад +1

    Good afternoon, I'm very interested in the triangle pattern. Could you tell me how to find part of this pattern on the last bars. Thank you for the videos!

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад +1

      Hi, use exactly the same Algorithm in this video just add a backcandles variable and for each candle check if the pattern is triangular within the backcandles

  • @Khaninz3779
    @Khaninz3779 2 года назад +1

    Hi great video, I cannot find other way to message you. But do you play GW2 and have youtube tutorial about it? You sounds very familiar.

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад

      Hi thank you, I stopped gaming few years ago I always envy gaming channels, they look more fun

  • @binanaquant2480
    @binanaquant2480 2 года назад +1

    wow , can i ask u please how i can use if statement for Brekout ,, for exampel if price > upslope: --->sell and thank you very much

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад

      Hi it's easier if I put it in a video... Sorry it's longer wouldn't fit in a comment

    • @binanaquant2480
      @binanaquant2480 2 года назад +1

      @@CodeTradingCafe please we need more videos for this amazing strategy

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад

      will think of something to do for future videos, I am not promising it will work though:)

    • @thomastthai
      @thomastthai 2 года назад +1

      @CodeTrading is right that a video would answer your question better. Here is a general idea:
      If a triangle is detected, you can use the slope formula y=mx+b on the current candle to get the y (prices) for both the maxima and minima lines that MAY intersect with the candle.
      y is the price, m is the slope, x is the index of the candle, and b is the intercept. The code already gave you all those variables except for y.
      Then check if the current candle close price breaks above or below the current candles' slope potential intersecting maxima or minima price and carry out the buy or sell condition you want.

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

    Is it possible to implement this algorithm on PineScript version 5 ?

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

      Sure there must be a way you might struggle with the linear regression maybe. I am not familiar with Pine though.

  • @gabrielvalencia3565
    @gabrielvalencia3565 2 года назад +1

    do you have a course for python for trading ?

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад

      Hi, thank you for your interest, I am preparing one slowly almost bone video every other week or so, check this playlist ruclips.net/p/PLwEOixRFAUxZVV0XNWlapem1yoRA4rt_O

  • @techwithupeh
    @techwithupeh 6 месяцев назад +1

    So how do you detect when it breaks the triangle?

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

      We have the slopes equations we can check for a candle above the upper or below the lower triangle sides.

  • @royk999
    @royk999 2 года назад +1

    Hey...i have a simple Support Resistance strategy using RSI in tradingview which works good for me, can it be converted to python as screener,.. if you can help it would be great....nowhere in youtube i found something similar....

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад +1

      Hi, thank you for your message, it definitely can, however I would not be able to do it because I'm getting a lot of requests recently and time is very short. The best is to choose the closest program from my channel and modify it so it fits your strategy. Sorry about this, I hope in couple of months I will have more time.

    • @royk999
      @royk999 2 года назад +1

      @@CodeTradingCafe np, i am looking into the RSI strategy from your video and trying to code it in python as per my requirement.... thanks for replying :)

    • @top10top54
      @top10top54 2 года назад

      @@CodeTradingCafe What if you create discord server? we could collaborate on this

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад

      @@top10top54 I will look into it but I am afraid it will require additional time that I don't have at the moment

  • @THE.BEST.TRADING.CAANNELS
    @THE.BEST.TRADING.CAANNELS Год назад +1

    I entered the code, then pressed Run, but the card did not come out. Can you make a video explaining that, please?

  • @mombabycare5950
    @mombabycare5950 2 года назад

    Could we convert this into a breakout strategy and backtest...

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад

      We can I only noticed that it's not a very frequent pattern on the daily timeframe so I skipped for now...

  • @THE.BEST.TRADING.CAANNELS
    @THE.BEST.TRADING.CAANNELS Год назад +1

    Where does the chart appear, is it in a detailed program or what?

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

      Hi, it's in the program but you have to run it in jupyter notebook

    • @THE.BEST.TRADING.CAANNELS
      @THE.BEST.TRADING.CAANNELS Год назад +1

      @@CodeTradingCafe I entered the code, then pressed Run, but the card did not come out. Can you make a video explaining that, please?

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

      Which card? Do you mean the candles plot?

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

    here you have your like :D

  • @kudzovu
    @kudzovu 2 года назад +2

    Make it for Bob Volman trading. You can going to millionaire!

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад

      Not aware will check it out

    • @kudzovu
      @kudzovu 2 года назад

      @@CodeTradingCafe bob volman need trendline and ema, it the same this triangle. Can you make it?

  • @benwesi
    @benwesi 2 года назад +1

    How could you implement this for live data?

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад

      Well it's more complicated, you need a strategy first then a money management system all put together into a full working code... maybe one day when I get enough time to experiment this startegy.

    • @benwesi
      @benwesi 2 года назад

      @@CodeTradingCafe I see, because I weed trying to figure out how I could implement this on live 1d1min data to find potential triangle patterns

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад

      @@benwesi the easiest way is to put the algo in one function, and use yfinance to download the latest let's say 40 candles every hour and detect the triangle shape if any... Then send yourself an email through python when it's a triangle shape, I have a video on how to automate emails in Python for tradi i will find the link and add it here
      Edit: ruclips.net/video/jFyj4w88kjs/видео.html

  • @surajnov01
    @surajnov01 20 дней назад

    Hey. I just wanted to check, what if I want to find all possible triangles formed over a period of time. I do not think this code supports that function

    • @CodeTradingCafe
      @CodeTradingCafe  17 дней назад +1

      Not as is, but you will need to use a function detection triangles and iterate over different windows of candles.

  • @jack_sparrow1049
    @jack_sparrow1049 2 года назад +1

    What is the difference between xxmax & maxim ? aren't that same

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад

      No if I recap correctly xxmax is for the index of the max but maxim is the value of the max, think about x and y axis coordinates

    • @jack_sparrow1049
      @jack_sparrow1049 2 года назад +1

      @@CodeTradingCafe Thank got it.

    • @jack_sparrow1049
      @jack_sparrow1049 2 года назад +1

      @@CodeTradingCafe By the way do you have any reference materials for these kind of pattern detection ?

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад

      No specific reference I usually check some know websites like babypips or similar

  • @xylnxai790
    @xylnxai790 2 года назад +1

    Hi, I would like to replicate what is shown in the youtube video to make sure that I am doing it correctly. However, the csv datafile for this youtube video is not given in the code link. Specifically, df = pd.read_csv("EURUSD_Candlestick_4_Hour_ASK_05.05.2003-16.10.2021.csv") does not work because you do not provide a link to this particular csv file. Thanks.

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад

      Hi, there is a data file shared in the description of this video ruclips.net/video/phy57DZOIwc/видео.html
      I think it's the same data 4h timeframe

  • @liamblake4767
    @liamblake4767 2 года назад +1

    The link for the Jupyter notebook does not work ?.

  • @michaelcarnevale5620
    @michaelcarnevale5620 2 года назад +1

    so can this tool be useful in real time?

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад

      It might be useful if used properly but it's not that easy I did try it in a strategy and some situations are challenging to code properly

    • @michaelcarnevale5620
      @michaelcarnevale5620 2 года назад +1

      @@CodeTradingCafe ya i imagine so... i tried doing this once and gave up lol
      but it does seem possible in theory to develop a stock scanner that searches the market for triangle patterns (or other patterns) for day/swing trading.
      i wonder if the new AIs like GPT3 will be used for this.

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад +1

      @@michaelcarnevale5620 well I did finish the program but results were disappointing maybe I can put it in a video in the future just for educational purposes ... And who knows

    • @pietraderdetective8953
      @pietraderdetective8953 2 года назад +1

      @@CodeTradingCafe may I ask disappointing in what way? In terms of the returns performance or something else?

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад +1

      @@pietraderdetective8953 the returns were not that high and signals were too far apart not many triangles every week.

  • @ventiladorbueno1846
    @ventiladorbueno1846 2 года назад +1

    Thank youu

  • @kodzuvu
    @kodzuvu 2 года назад

    how to calculate price end of line xxmax+15?

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

    im getting an error invalid value encountered in scalar divide

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

      Hi check where it's coming from, add print values in the corresponding code to see which variable is causing this, it's hard to debug without details.

  • @fernandopereira3580
    @fernandopereira3580 2 года назад

    Perfect

  • @THE.BEST.TRADING.CAANNELS
    @THE.BEST.TRADING.CAANNELS Год назад +1

    How do I design this program?

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

      Hi you can download the code from the link in the description, check it out.

    • @THE.BEST.TRADING.CAANNELS
      @THE.BEST.TRADING.CAANNELS Год назад +1

      @@CodeTradingCafe
      I have uploaded the code, but how do I apply it to the Python program? Did you make a video explaining the method, my friend🤔🤔

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

      You can open it in a jupyter notebook to run it, but if it's your first experience with python I would invest a month in learning and familiarizing with python first, it's worth it on the long run

    • @THE.BEST.TRADING.CAANNELS
      @THE.BEST.TRADING.CAANNELS Год назад +1

      @@CodeTradingCafe ok thanks 🌹🌹🌹

    • @THE.BEST.TRADING.CAANNELS
      @THE.BEST.TRADING.CAANNELS Год назад

      Where does the chart appear, is it in a detailed program or what?

  • @kudzovu
    @kudzovu 2 года назад

    Backtest where?

  • @user-cn5ep4kq7x
    @user-cn5ep4kq7x 2 года назад +1

    thankss bro pls can i have code , TrianglePricePatterns.ipynb not work .. can u pls upload code on github or txt file or in replay

  • @g.samitha4439
    @g.samitha4439 2 года назад +1

    *Can i use this code as indicater tradingview ?*

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад

      Yes but you need to add the part were it streams live data for analysis

  • @hariprasad-zq2bp
    @hariprasad-zq2bp 2 года назад +1

    Thanks, pls make video on harmonic patterns detection , plss it's request

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад

      I will check it out but can't promise anything soon, moreover I don't think harmonics are worth the pain (out of experience) 🙂

  • @kudzovu
    @kudzovu 2 года назад

    How to predict in real time?

  • @einanc8945
    @einanc8945 2 года назад +1

    bro how can we use it in real time

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад

      It's a long way forward, need to implement it in a strategy and backtest first... Edit: but it's a start I was curious about

  • @lucksimi3320
    @lucksimi3320 2 года назад +1

    Hi
    Can make a python code for all patterns( head & shoulder, double bottoms, etc...), thanks

  • @kodzuvu
    @kodzuvu 2 года назад +1

    Can you make a bot live tradding

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад

      Yes but you mean using triangles pattern?

    • @kodzuvu
      @kodzuvu 2 года назад +1

      @@CodeTradingCafe yes can you make a bot live trading with this method?

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад

      Yes I did try it quickly on my own didn't put it on RUclips the backtest was not that impressive

  • @nilesh168
    @nilesh168 2 года назад +1

    Can anyone share file "EURUSD_Candlestick_4_Hour_ASK_05.05.2003-16.10.2021.csv" ? Thanks in advance.

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад +1

      I added a link in the description, name of the file is different so you can take this into account in the jupyter notebook file. Good luck

    • @nilesh168
      @nilesh168 2 года назад +1

      Thanks for quick feedback. Is it possible to find triangle pattern with reverse points from dataframe. For now it is taking candle id from beginning

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад +1

      @@nilesh168 yes but you can avoid this by ... For each candle take a slice let's say of 30 previous candles and check if they're in a triangle pattern, this way you can use it in live trading if needed

    • @nilesh168
      @nilesh168 2 года назад +1

      @@CodeTradingCafe yes this exactly i am trying. Another thing i was trying to change xaxis from index to timestamp. so far have not succeeded. Created two functions 1) to find candle id (max df len -30*i) 2) pass that candle id to plot

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад +1

      @@nilesh168 you can get everything done in one function I think using exactly the same algo as this video. Good luck be patient.

  • @kudzovu
    @kudzovu 2 года назад +1

    Im backtest with m5 high profit but run livetrade demo losing

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад

      Hi which strategy are you using?

    • @kudzovu
      @kudzovu 2 года назад

      @@CodeTradingCafe im triangle and istar, isengulfing on your video. But i dont now why. I don't understand why it entered some orders unlike backtest so it lost while backtest won

    • @CodeTradingCafe
      @CodeTradingCafe  2 года назад

      @@kudzovu there must be a bug somewhere

  • @LeandroOliveira-m2b
    @LeandroOliveira-m2b 3 месяца назад +1

    brazil eu

  • @eff.muhammad
    @eff.muhammad 2 года назад +1

    worth one subscribe from me

  • @top10top54
    @top10top54 2 года назад +1

    do you have discord group?

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

    Mr dude Give me the code, i wanna make bot using this