GRID TRADING STRATEGY implemented in Python [basically must watch]

Поділитися
Вставка
  • Опубліковано 19 лип 2024
  • In this video series we are coding an Intraday Grid Trading Strategy with Python and test it.
    Hit like, leave a comment and subscribe for the follow up video where we are taking a look at Backtesting the last months, performance evaluation and much more interesting stuff.
    Get the Notebook/Source code by becoming a Tier-3 Channel member:
    / @algovibes
    Crypto price pull function explained:
    • Introduction To Automa...
    Picture source:
    support.bingx.com/hc/article_...
    Disclaimer: This video is not an investment advice and is for educational and entertainment purposes only! Cryptocurrency and automated trading is bearing a high amount of risk which might result in a total loss of your invested capital.
    00:00 - 01:15 Grid Trading explained / Disclaimer
    01:15 - 02:28 Pulling Intraday price data / resampling
    02:28 - 05:56 Get Levels / data manipulations
    05:56 - 09:47 Logic for only ONE level
    09:47 - 16:14 Logic for two levels
    16:14 - 17:19 INTERday transactions / Up Next!
    #python #trading #grid #strategy

КОМЕНТАРІ • 55

  • @refaamoe
    @refaamoe Рік тому +4

    First 😍

  • @ertbalalbert1312
    @ertbalalbert1312 Рік тому +2

    This is great. Thx.
    I would be interested in fine tuning this around how to structure the grid:
    e.g. are round numbers more relevant (liquidity clusters due to options).
    Dynamic grid sizes, based on volatility (e.g. diverence vs. means, ATRs, Bollingers, Box approaches)

  • @jeffcapesNL
    @jeffcapesNL Рік тому +4

    Nice! I use grid bots often, you should consider implementing the trend or neutral if it goes sideways. That's the difficultly, it should cancel certain orders if the trend changed. But for now keep up the good work! Grusse!

    • @Algovibes
      @Algovibes  Рік тому

      Thanks a lot for sharing your thoughts!

  • @markgamache6377
    @markgamache6377 Рік тому +7

    It’s essentially a mean reversion. Typically those have a high win rate and infrequent large losses when the market moves against you. Will be interested in your stop-loss when you add that.

    • @Algovibes
      @Algovibes  Рік тому

      Agreed. Thanks for watching and sharing your thoughts!

    • @bryan-9742
      @bryan-9742 Рік тому

      awesome insight. I agree!

  • @muggzzzzz
    @muggzzzzz Рік тому +3

    Once upon a time I managed to increase my initial deposit by 5 times in one month using grid trading strategy, I didn't care about any trading signals, I could start trading in any time. But it has one downside - long one-sided price movement. If the price continuing to drop or to raise for too long, you will eventually lose your deposit, which was my case.

    • @Algovibes
      @Algovibes  Рік тому +1

      Yessir. That's the big downside! Agreed.

  • @epicmonckey25001
    @epicmonckey25001 Рік тому

    Hey @Algovibes something I'm finding interesting is that pandas will be deprecating the whole pd.to_datetime function with something else, I'm wondering if in a future video you could code something using the new syntax they recommend. Thanks, helpful as always : )

  • @jitkadyan
    @jitkadyan Рік тому +1

    Very informative video and coding knowledge sharing sir , pls expand levels up to third buy or sell levels. also its implementation in the live market condition. Also very thankful to you for providing core content to us.

    • @Algovibes
      @Algovibes  Рік тому

      Thanks a lot for your comment man. I will see what I can do!

  • @chefrocka2867
    @chefrocka2867 Рік тому +1

    Top...wieder was gelernt... man geht nie so dumm schlafen wie man morgens aufgestanden ist 😀 grüße aus stuggi

    • @Algovibes
      @Algovibes  Рік тому

      Sehr gute Einstellung! :-) Danke dir

  • @gusalexanian5454
    @gusalexanian5454 Рік тому

    Thank you for sharing, great video. For some reason the data frames only pull in Jupyter Notebooks and not in VS Code? Is there a reason for this/ is there a way to get the data to output in VS Code? Appreciate your help in advance

  • @arunavadatta7734
    @arunavadatta7734 Рік тому

    @Algovibes can you make a tutorial about trailing stoploss based GUI trading system using tkinter and binance api ??????

  • @shirdarec6802
    @shirdarec6802 Рік тому +1

    Hey man! I appreciate all the content you are putting out, I recently became a tier 2 member to learn more, could you please put out a new link to the discord in the members group?

    • @Algovibes
      @Algovibes  Рік тому

      Hi mate, thanks a lot for your comment, your kind words and becoming an Algovibes channel member. I just set up a new link.

    • @shirdarec6802
      @shirdarec6802 Рік тому

      @@Algovibes Thanks for the welcome:D Coudl you also send me the source code through email, I already sent you a request.

    • @shirdarec6802
      @shirdarec6802 Рік тому

      I am still waiting for this one, I appreciate it if I can get it asap

  • @ÜmitKirenci
    @ÜmitKirenci Рік тому +1

    Thanks!

    • @Algovibes
      @Algovibes  Рік тому

      Thank you for your support Ümit

  • @Kopchani
    @Kopchani Рік тому +1

    thank you king

    • @Algovibes
      @Algovibes  Рік тому

      Thanks for watching Boss 👨🏽‍💼

  • @bdcash
    @bdcash Рік тому +2

    I get a deprecation warning on the slided DF function. Alternative seems to work
    def sliced_df(date):
    return df[df.index.date == pd.Timestamp(date).date()]

  • @gusalexanian5454
    @gusalexanian5454 Рік тому +1

    Thanks for sharing. How would you add a stop loss level to this strategy?

    • @Algovibes
      @Algovibes  Рік тому

      Welcome man! Covered that somewhere in another Video. Please watch the whole Python for Finance and cryptobot playlist and if you still need anything very happy to support in finding what you are looking for!

  • @Ninja_bit
    @Ninja_bit Рік тому +1

    Finally 🌹

    • @Algovibes
      @Algovibes  Рік тому

      Yes :-) Thanks a lot for watching man!

  • @georgeorfanidis3856
    @georgeorfanidis3856 5 місяців тому +1

    Hi, in this example the shape of the price movement is a typical parabola with positive 'a'! Am wondering how could smd handle a negative 'a' in terms of cash management! Difficult to backtest grid strategies

    • @Algovibes
      @Algovibes  4 місяці тому

      Interesting one, indeed! Thanks for watching mate

  • @polkobra5455
    @polkobra5455 Рік тому +1

    Hey Algo quick q do you know if Binance changed anything with their API keys? I get the exception code -2015 saying I don't have permission to get my account balance. My API key and secret are correct.

    • @Algovibes
      @Algovibes  Рік тому

      I had to newly tick boxes again. Just double check the API management on the site and check if everything is set up properly.

  • @andrewmachief8637
    @andrewmachief8637 Рік тому +1

    Of all your algorithms you’ve created, are any worth actually using a live account on?

    • @Algovibes
      @Algovibes  Рік тому +1

      That's the extremely valuable thing about my content: I give you the tools to exactly test that - for free. So what are you waiting for?

    • @blazzz13
      @blazzz13 Рік тому +1

      Andrew Machief Man's shown you how to catch the fish but you just want the fish🤦‍♂

    • @andrewmachief8637
      @andrewmachief8637 Рік тому

      Just looking for the best fishing spot 😂, created some of them on quant connect and put them on a paper acc but just takes a while to see solid results moving forward from a backtest

  • @mayankjain24in
    @mayankjain24in 10 місяців тому +1

    too good

    • @Algovibes
      @Algovibes  9 місяців тому

      Thanks mate! Appreciate you leaving a comment

  • @izchak333
    @izchak333 Рік тому +1

    can you make this strategy with like 5 grid BUT dynamic grid that make BIGER spread on higher ATR ta and biger deal also .. in that way it be good in volatility market to
    i tery to do this my self but not success :)
    it will make this strategy perfect
    becoz its good till volatility came and it came always ..
    ha and dynamic grid that follow the price if we have funds ...

    • @Algovibes
      @Algovibes  Рік тому +1

      Very interesting idea! Thanks a lot for the suggestion.

    • @izchak333
      @izchak333 Рік тому

      I follow on you ..
      Triarbitraz its also some thing that i do
      And intresing me how you can do it ?

  • @mayankjain24in
    @mayankjain24in 10 місяців тому

    I think converting data frame to dictionary and then looping over it will take very less time instead of iterrows.

    • @Algovibes
      @Algovibes  9 місяців тому

      Did you test it? What was the performance improvement? Would be surprising to me

  • @whereiam3804
    @whereiam3804 11 місяців тому +1

    i want grid bot can u make for me ?

    • @Algovibes
      @Algovibes  10 місяців тому

      Depends on your budget :-)

  • @breezefor5966
    @breezefor5966 Рік тому +1

    Good Morning um 18:30 Uhr? xD

    • @Algovibes
      @Algovibes  Рік тому +1

      Maybe I am in the carribean 🤫

  • @sukdeb5315
    @sukdeb5315 Рік тому +1

    It is now night in India
    Not morning 😄

  • @mrpoopybutthole666
    @mrpoopybutthole666 Рік тому +1

    Hey, first, I'd like to thank you for the great content! Also I have a question, how do I get the full orderbook at binance? the default api has a 5000 orders limit, and for btc it is a ~ 500$ price range, which is very small. It should be possible to get a full orderbook, right? Other trading apps somehow is able to do that. Maybe it's possible to filter somehow the low-amount orders, what do you think?

    • @Algovibes
      @Algovibes  Рік тому

      Dat name 😁 Welcome buddy.