CRYPTO Live Trading Bot with Python [Stoch, RSI, MACD]

Поделиться
HTML-код
  • Опубликовано: 3 май 2024
  • In this video we are building a Python cryptobot using the Binance API.
    We will apply technical indicators such as the Stochastic Slow, RSI and MACD and implement a Target profit and Stop Loss mechanism.
    We will trade Cardano (ADA) but feel free to pick other currencies (BTC, ETH, ...)
    Please subscribe if you find this content valuable!
    Get the Notebook/Source code by becoming a Tier-2 Channel member:
    / algovibes
    This video is a prerequisite and contains explanations:
    • Highly Profitable Stoc...
    Check out my other videos on constructing crypto bots in this playlist - I also covered setting up the Binance API and handling connection timeouts or any other type of error:
    • Cryptocurrency Bots / ...
    If you want to support me you can register for Binance with this link, but don't feel forced to:
    www.binance.com/en/register?r...
    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:42 Introduction / Strategy recap / Disclaimer
    01:42 - 02:26 Libraries
    02:26 - 03:30 Pulling price data from Binance
    03:30 - 05:44 Calculate technical indicators (Stoch,RSI,MACD)
    05:44 - 12:15 Trigger/Buying Logic/ Lags "trade off"
    12:15 - 15:34 Actual strategy: Buying condition
    15:34 - 19:36 Actual strategy: Selling condition
    19:36 - 21:09 Whole strategy / activating the Bot
    21:09 - 24:03 Example Trades
    #Python #Tradingbot #Crypto #Binance

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

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

    So happy to have found these videos. I'm getting up early every morning to follow along and code before work. Thank you so much.

    • @Algovibes
      @Algovibes  17 дней назад

      Awesome mate, thanks for your comment. Happy to read!

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

    Glad I found this gem of a channel, keep up the good work man.

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

      Thank you very much for your kind words :-)

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

    The best easy way to understand video to explain the bot! Thanks for this video and waiting for some new crypto related videos!

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

      Thank you very much for watching and your comment :-)

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

    Amazingly interesting, checked pretty much all of these videos thank you !

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

      Thanks for your support mate, you wouldn't believe how much this is helping me!

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

    You are an incredible teacher, your knowledge of python is impeccable :)

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

      Thanks for your kind words my friend ❤️

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

    Great video of going straight to live without any backtesting.

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

      What? :D I am literally referencing to the backtest video in the first 20 seconds of the video.

  • @flydr2
    @flydr2 Год назад +4

    Thanks you! I have learned more with your videos than any other in the pas year... These videos are incredibly useful to me (I guess to others also)... Many thanks

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

      Very happy to read. Thanks a ton Marc for your positive attitude!

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

    Thanks for this great article. Everything is well explained.

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

      Thanks for your feedback mate.

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

      @@Algovibes Do you have any github link where your codes are available?

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

    Great Teacher ! Kind regards and thousands respect !!!

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

    More great content for me to use 😁
    Thank you!

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

      Thank you buddy :-) Appreciate your comment!

  • @mistahgrill5135
    @mistahgrill5135 2 года назад +9

    In case you need to stop the warning messages regarding the df.append deprecation, replace the commented line below, with the bottom 2 lines:
    #dfx = dfx.append(mask, ignore_index=True)
    dfxn = pd.DataFrame([mask])
    dfx = pd.concat([dfx, dfxn])

  • @techsavage813
    @techsavage813 2 года назад +6

    ive been waiting for this

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

      Hope I met your expectations then! Thanks for waiting :-)

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

    You deserve more subs. Good content! keep it up

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

      Thank you :-) I am working on it! People like you help me with comments like that for sure! Thanks again.

  • @dennbauer
    @dennbauer 2 года назад +13

    The best video you have ever posted! Super cool content and very well explained. Thanks for sharing your knowledge!
    Would love to see some strategy on decision making with regards to which pair to trade, e g. based on volatility and it liquidity.
    Thanks again!

    • @Algovibes
      @Algovibes  2 года назад +3

      Thank YOU! :-)

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

      @@Algovibes Hi Can you share your business email as I have to discuss few projects?

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

    Thank you for this brilliant video on RUclips. I am very very interested in this topic, although I am a complete noob👍👍👍

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

    great stuff.. love it.. just some recommendation… you should place the stop loss and take profit directly on the exchange… (if binance supports this) you also save fees because you use limit orders instead of market orders…

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

      Thanks buddy! Nice suggestion. Was actually using limit orders in one of my newer videos. I follow different approaches in the vids in general so feel free to explore the cryptobot playlist a bit.
      Here is the vid I am talking about:
      ruclips.net/video/mDNIAkEZChg/видео.html

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

    Learn Python they said.. I understand why now, so smooth. Very informative video, thanks 🐍 // JS dev

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

      Thanks for watching buddy.

  • @hayatokimura6404
    @hayatokimura6404 2 года назад +11

    Would love to see implementations of other strategy, price action strat perhap. You did great, thank you

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

    You're a real master in Python coding... great content. I would like you to teach a beginenr, like me, how to test a Python script bot on a tradingview account (will be a trial one...)

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

      Thanks mate. Master I wouldn't say but I got some years of experience on my back. Thanks for the suggestion!

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

    Many thanks again... Wonderful info

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

    Thanks for the video, it is really helpful! However, I am wondering the following: you add the columns 'trigger' and 'buy' on which the model eventually decides to make a buy order, but not for sell orders. They are only focussed on minimizing the loss. Do you happen to have python code for a function like decide but then for sell orders instead?

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

    Wow! Fantastic video. Thank you Algovibes.
    One question; how could you apply Heikin Ashi into the df before calculating %K, %D, rsi?

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

      Thanks a lot Tag. Didn't test that yet, so can't tell you ad hoc, sorry!

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

    Thank you for the video! Could you please make a video about how to run bots in the cloud 24/7?

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

      Hi buddy, thanks for watching! Did you already check out my Python in the cloud playlist?
      In case you haven't:
      ruclips.net/p/PL9ATnizYJ7f9ZGSx-7siizxqh4VtRZblk

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

    Wow nice man! How did you get your python programming skills? Great video ! Subbing now

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

      Hi buddy. Thanks a lot for subscribing :-)
      Have talked about that here:
      ruclips.net/video/qCZiENV83rE/видео.html

  • @MrRobfoster2000
    @MrRobfoster2000 2 года назад +3

    Great video mate! One question - in other trading bot tutorials I have watched regarding RSI, the buying signal is always when the RSI goes below a certain level. In this video, you wait until the RSI goes above 50 to trigger a buy. Is there a reason for that? Another tutorial I did which I used for a while would buy when RSI is "oversold" when it gets below 30. Is it that you're waiting for a signal that RSI is rising before issuing a buy signal? Grateful if you can explain as this part is confusing me a bit. Thanks again for the great video!

  • @techsavage813
    @techsavage813 2 года назад +17

    I love your crypto contents

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

      most people who does crypto probably do it via algorithm

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

      Thanks a lot @tech savage. I also love to play around with it. Disadvantage of these videos is I am getting a LOT of spam / scam comments (only on this video more than 20 comments in the first hours - a number of real comments I would dream of :D)
      @Cooking fun: Some surely do but I doubt most people do.

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

      @@Algovibes yeah those are annoying as hell. Your videos are informative and nice to follow along. Are you interested in Blockchain development too?

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

      @@techsavage813 Didn't have any exposure to it yet.

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

    Just subscribe. Thanks for this.

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

      Awesome, thank you very much! :-)

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

    Thank you for another great tutorial. Is it possible to set coin symbol as the frame index in a data frame? Kindly advise. Thank you again

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

      Thanks for watching :-)
      Yes it is possible:
      Define a new column containing the symbol:
      df['symbol'] = 'ADAUSDT'
      Reset the index:
      df = df.reset_index()
      Set the index:
      df = df.set_index('symbol')
      Hope this is what you are looking for!

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

      @@Algovibes Thank you so much for your prompt respond. Yes, that's exactly what I was looking for!

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

    Hey, Algo! Thanks for this brilliant video and your detailed explanation.
    One quick question! I have been testing your code for the last three days, and every time I place my order, I get the same API error message -1102 (TimeOut). This seems to be related to a mandatory parameter empty null or malformed. Do you have any advice on how I could fix this issue?

    • @Algovibes
      @Algovibes  2 года назад +3

      First of all thanks a lot for your kind words. Secondly you should rather work with a data stream as shown in e.g. this video:
      ruclips.net/video/nQkaJ207xYI/видео.html
      Also this one is showing some approaches to avoid time outs:
      ruclips.net/video/g04GeHe-dJw/видео.html

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

      Maybe your client was disconnected. Try connecting to client server before buy/sell order.

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

    excellent RUclips channel, congratulations, I ask you a question, where could I include the balance variable in testing mode, to know if it gives me profits or losses, the script

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

      Thank you mate :-)
      What do you exactly mean with balance variable?

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

      @@Algovibes the balance we have in our account, to see if it is working, another question, what is the best sales strategy in crypto? stop loss? Can I raise the stop loss when the coin goes up?

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

    Hi, thanks for the video ! I have a question, why not put a StopLoss and a TakeProfit instead of tick the price ? Thanks

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

      Also possible :D See these videos as room for all kinds of improvements and amendments.

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

    I wonder if the reason you got 67 rows initially when you first ran “applytechnicals(df)” is because you had updated the database just 100-67=33 minutes ago. I got the same problem so I decided to go with looking back for the entire length of the database, although I could reset my crontab for minute-updates between certain hours (especially when I run applytechnicals). But I’m not sure such a length would affect the outcome or not?

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

    great video, really pulled a lot of questions together for me. One question I have is, how to pull getminutedata for a list of symbols? I imagine this is a For loop within the getminutedata function, but I keep getting errors. What is the best way to pull minutedata for a list of symbols instead of doing one symbol at a time?

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

      Hi man, thanks a lot.
      For minute data this will be helpful for you:
      ruclips.net/video/HB1CLz0Z1NY/видео.html
      If you want to pull stream data for multiple symbols, check this out:
      ruclips.net/video/8p240qonj0E/видео.html
      Happy for a quick feedback on the comment section of these videos.

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

    Nice, very useful. I have been sent here by you from another video. Don't you think that the price taken in real time should be filtered in some way? I mean, many startegies point to take position when certain conditions are fulfilled and also when the candle is closed. So theoretically we are interested only in "real" close price of each candle. In above example we can get entry signals too fast. What do you think? Maybe your approach is more proper? :)
    PS sorry for my language, hope its understandable

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

      Hi man, thanks a lot.
      Depends on what you want to trade. You can surely also take the closed candle when this is your defined strategy.

  • @b.k.1768
    @b.k.1768 2 года назад +1

    @Algovibes Where do you share your source codes ? Great material! Tnx for sharing.

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

      Thanks a lot mate,
      for the written source code you could consider becoming a channel member. I would be happy to welcome you:
      ruclips.net/channel/UC87aeHqMrlR6ED0w2SVi5nwjoin

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

    Hey man, I like your content! While studying the behaviour of your code I stumbled upon a small mistake. When checking the stochastic whether it has hit oversold in the last n timeframe, you did not take into consideration that it should not trigger when it also has hit overbought in the meantime. Do you have a fix for that? Other than that, great work! Keep it up!
    Cheers!

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

      Hi mate, can you give me a timestamp? Happy to check that!

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

      @@Algovibes Hey! Thanks for answering! Sure, its 8:36 , the function gettrigger.

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

      @Algovibes first of all I must thank you a lot for these wonderful series, requesting to please guide us on this question. I also feels the same.. Thanks in advance

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

    +1 sub, thanks for good content.

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

      Thanks a lot man. That's truly a big support for me!

  • @tomroels3773
    @tomroels3773 2 года назад +3

    Hi, I have a quick question. I am very new to this and want to understand how it works. I also saw your other video on this algorithm. In your selling conditions I understand why you implement the STOP-LOSS condition to limit your losses for a bad trade. However I don't understand why you limit the profit as well. In the other video we saw that using the same TA we can also get a selling trigger and signal. Shouldn't you sell when this occurs instead of already selling when a certain profit percentage was reached. Thanks for the help!

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

      Hi and thanks a lot for the comment! Sure, you can also take the signals which are generated by the indicators. That's another approach. As said: There are many many things which you can change.
      You can basically just take the logic as presented in the video to rebuild it.
      But I'll take it as a suggestion to show how you would do it with technicals in future videos.

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

    Top Videos. Sehr lehrreich.
    Mich würde es interessieren ob du den Bot weiterhin am laufen hast und falls dies der Fall ist, wie viele deine Trades im Profit geschlossen wurden und wie viele im Verlust.
    Mach weiter so. Freu mich auf weiteren Content.

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

      Dankeschön :-) Ich glaube die Strategie hat relativ schlecht performed.

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

    very cool video ! id like to see this but 2x longs instead of buys and 1x shorts instead of sells ...what do u think ?

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

      Thank you mate. Well one need to try that out. I have no experience with that, so I don't have a qualified opinion on that.

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

    Sehr cooles Video. Danke. Könnte man auch direkt mit der Buyorder nicht eine Sellorder erstellen? Bei so schmalen Prozenten ist das ja manchmal in einer Kerze abgehandelt, oder macht das keinen Sinn?

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

      Danke dir :-) Wo würdest du den Vorteil darin sehen?

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

      @@Algovibes wenn die Preise im 5m TF nur nach jeder Kerze geprüft werden, kann sich ja in den 5 Minuten schon der TP eingestellt haben, wenns dumm läuft gehts nach 4 Minuten schon wieder runter und landet dann im SL obwohl es für den TP innerhalb der Kerze gereicht hätte. Hoffe ich hab mich verständlich ausgedrückt, kann auch sein ich mache hier einen Denkfehler wegen den "Preisprüfungen"

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

    I believe the reason for the loss here is because the selling order type is MARKET and not LIMIT. If you place LIMIT orders you guarantee a price of buyprice * 1.005. In case of a MARKET order you are hostage to time differences between placing an order and it matching the order book. I believe this is what happened here.

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

      You made a very good point by I doubt that in this specific case this is not the reason for the loss.

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

    Love your videos, thank you for sharing. I tried this method with a little modifications and it works great. Just one thing I don't quite understand, when you explained "lags", you said it means how many time stamp it goes back. Can you explain more please? Thank you.

    • @Algovibes
      @Algovibes  2 года назад +3

      Thanks a lot for your kind words! :-)
      1 lag -> 1 timestep before
      So example: You pull data for daily data. When you lag the data by 1 tilmestep you get the previous day data. When you pull data for 5 minute data you will get the previous 5 minute data.
      Does this make sense to you?

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

    this is VERY nice, thank you for this, i learned a lot!

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

      Awesome, thank you very much for your feedback.

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

    What about if i want to go short on my trades with this strategy? Because in the backtest video you included a selling signal. I want to add a selling signal for this strategy. Thanks again for the video.

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

      I covered Long only here.

  • @ai.lamify
    @ai.lamify Год назад +1

    Cool

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

    You should print only when Target changes :)

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

      True! Would be way better.

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

    Great video and very nicely explained. I implemented your logic to derive the stats (on 1 min timeframe) and it shows perfectly. But for the latest 15-20 min, it shows all values as NaN. I am not able to figure out why? Any help, please.

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

      Thanks mate. Probably because there is not enough data. Can you double check?

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

      @@Algovibes My mistake, since I am using Coinbase API, I need to sort the incoming price based on date and time. Thanks

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

    thank you for the video sir! I have a few questions if you don't mind :) Suppose I am trading at 15minute timeframe,
    1. should I set "inst = Signals(df, 15)" to 15?
    2. should I set "getminutedata(pair, '1m')" to 15 also?
    thanks again!

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

      Hi man, welcome! Thanks for watching.
      You are always going 15 rows back. So when you are taking 15m data you are ging 15 * 15min back. Makes sense?

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

      @@Algovibes thank you sir! one more question if you don’t mind 🙂 for 15m timeframe, getminutedata() should always be at 1m parameter then Signals() will have lags of 15?

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

    Hallo! this is amazing Alter! but i do not understand completely what that "legs" are working. This parameter seems to be very important. I am testing it but orders are not getting triggered as fast as i would like. Danke!

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

      Thanks Alter :D it's just time steps which you are going back. I explained it in more detail here:
      ruclips.net/video/r8pU-8l1KPU/видео.html

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

    hello how are you ... query create a robot with the purchase variables like this in the video and the stop loss, and configure it for a currency that grew 70% and did not win anything, lost, what could be the variable that I have What to modify to make the operations positive? Thank you

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

      Most probably the lookback period. It's unfortunately pretty vague.

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

    Hi, i like your strategy. I'm wondering have u tested this bot over 100 trades? I'd like to see the win rate and gain on account for any time frame. Thankyou

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

      Thank you :-)
      No I haven't but I wanted to cover Backtesting on Cryptos in the future as well.

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

    💛👏🏼

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

    What is the bame of that editor your programming in?

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

      I am using Jupyter Notebook in this as I think its the best for tutorials. Privately I am using Spyder.

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

    Thanks for the video. I have a different strategy myself, and I want to do it as a bot, but I use different indicators. I'm using a SMİ Ergodic indicator. How do I add this indicator to code?

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

      Welcome! Well pretty similar to what I did with the other indicators. Calculate it as a column and add it to the conditions.

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

      @@Algovibes Thank you

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

    What is the expected win rate and expected gain/loss ratio in this strategy?

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

      Did you check the linked video? I have gone over that there. Let me know if that is what you were looking for!

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

    Nice Video! I‘m very Interested in Programming and investing (doing some pyhton in university-beginner)!
    My Question: I‘m currently trading with kraken and want to know, if its possible with kraken instead of binance?
    Greetings from Austria

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

      Hi man,
      Python in university can be painful, we share the same faith :D
      As far as I know Kraken has a python API - so basically: yes.
      I am planning on covering another API than binance, but I can't promise it will be Kraken.

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

    hey! is it possible to make strategy with two moving averages where we buy when they cross and when they cross later again sell current position and buy puts at the same time and again when they cross sell puts and buy another order? awesome videos btw

    • @maxweliau
      @maxweliau 2 года назад +3

      Yes just change the logic of the buy and sell signals. Instead of using k and d, use maX = df.close.rolling(n).mean(), whereby n is the number of periods of your ma, then define the buy as ma1[i] >ma2[i] as the buy

    • @jakubfancovic52
      @jakubfancovic52 2 года назад +3

      @@maxweliau thanks man but I was rather asking on the problem that if its possible to buy asset when it goes up, then sell opened position when its neccessary and at the same time buy PUTs when the asset is starting to go down... so the bot can trade not just uptrend, but both.

    • @maxweliau
      @maxweliau 2 года назад +3

      @@jakubfancovic52 yes. All u need to do is set the "mode" to open-long, close-long, open-short, and close-short and compare strings based on your needs

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

      First of all thanks both. Jakub for your kind words and Maxwell sharing your thoughts!
      It is possible for sure but I didn't have an exposure to trade Binance Options yet but might cover that in the future.
      Ad hoc I would probably follow a similar approach to Maxwell or as an alternative work with a 2x2 boolean matrix (starting with four 0s) and then just define the logic you described e.g.:
      Simple if condition if they cross and place a buying order and set a 1 in the boolean matrix. If this value is True AND cross is happening again -> Selling AND buying condition of the put and set next boolean to True.... and so on.

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

      @@Algovibes for my own bot, i just set strings and compare strings to execute long and ahort orders on binance futures (currently banned in singapore, integrsting to okex) :/

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

    Awesome work and awesome channel, congratulations! I take it that if you are so kind to share these strategies and code is because they can't make people rich executing them with serious money, is that right? :p

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

      Thank you mate. You are right. These scripts are just play arounds with different approaches.

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

    Hello sir, you know how we can get sell limit and buy limit data from binance for orderbook? Thank for your help.

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

      Covered buy limit orders e.g. here:
      ruclips.net/video/mDNIAkEZChg/видео.html

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

    Always good, how to sell by signal to?

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

      Thanks man, can you elaborate?

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

      @@Algovibes cos u, now i can do it, thanks

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

    Hi!! Nice video ,Can you make the bot hold the cryto for future selling without getting a loss?

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

      Thank you buddy. In that case just cancel the selling condition.

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

      @@Algovibes i mean, autosell if it have favorable condition and if don't, to just hold the crypto.

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

      You can just remove the "df.Close[-1]

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

    Great video as always! I have been trying to find out how to get live data for multiple pairs to apply certain strategies to multiple cryptocurrencies at once. Do you know which documentation explains how to do that? Or perhaps a tutorial on that? :)

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

      Hi mate, thanks a lot!
      I am not quite sure if there is an API call for multiple streams. I would probably just run several simultaneously. I already thought about a bot including more than one pair in the future.

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

      All u need to do it have an array of tickers amd quantities, and input them in a for loop within the while True loop

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

      @@maxweliau yes great idea! This is how i have solved to problem until now. However, depending on how many tickers you want to stream it wont be very efficient. But i guess depending on the strategy it can be good enough :)

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

    Sorry for stupid question but i need help. What's mean the lags? It's the time frame? Can you clarify about in more detail? Thanks for your time.

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

      No worries man. There is a prerequisite for this video. I usually link the necessary videos in the description:
      ruclips.net/video/r8pU-8l1KPU/видео.html

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

      Thanks again

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

    Hi, how to change timezone in function getminutedata? 'Europe/Berlin' maybe?

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

      Hi, should be working with adding +1 to UTC. I think Germany should be +2 but not 100% sure.

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

      @@Algovibes Thank you!

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

      @@Algovibes no change but this did it: "frame.index = pd.to_datetime(frame.index + 7.2e+6, unit='ms')"

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

    Hi, how do you get trading volume from the tick data from binance?

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

      Either via the get_historical_kline as one of the columns (not 100% which but its in the API docs) or via the livestream.

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

    I don't know how to use Jupiter notebook.... Can you teach the same thing in pycharm

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

      I have covered using an IDE here:
      ruclips.net/video/nQkaJ207xYI/видео.html

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

    How do you handle all the fees? I did a lot of research, made different bots with different taking profit strategies.. but in low timeframes (1m, 5m) I didnt found any way to achieve profits when recognizing the taker fees for entry and close...
    Is any bot of your videos still live and generating profits?

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

      I think low timeframes are in fact pretty random - but I might be wrong with that. And yes: The fees are quite challenging to beat within these low timeframes.
      As stated many times: The objective of these videos is the process from trading idea to code implementation.
      I am running a bot on one day where I think a particular bot would make sense.
      Are they generating profits? Yes (and sometimes no). Are they generating alpha? Rather not.

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

    Hey, was ich hier vermisse ist leichtes debugging. Ich nutze Tradingview und würde lieber in Pine alle Indikatoren nutzen und diese bei einem Trigger per Webhooks an meinen PC senden. Dann Validierungen vornehmen und den Trade machen.
    Hast du ne Idee, wie man die Parameter aus nem Webhook effizient an einen PC liefern kann?

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

      Hallo :-) Inwiefern vermisst du Debugging?
      Habe leider keine Erfahrung mit Pine. Du könntest mit etwas Zeiteinsatz den Kram selbst bauen. Ich hab das schon gecovert vor ein paar Monaten. Du müsstest allerdings anpassen, dass die Signale realtime geliefert werden (also anhand realtime-Kurse und nicht dem Vortags-Close).
      Ich plane dazu aber noch was zu releasen.
      Playlist:
      ruclips.net/p/PL9ATnizYJ7f9sW_mdY3071dS8mMwBGu2S
      (Stock recommendation I - III)

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

    Hi love the video, but my kdj is not getting the correct values? Can you help.
    Sry to brother and thanks

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

      No worries man, but can you elaborate?

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

      @@Algovibes the valeu of k os diferent from the One on the chart and the fluctuations are also diferent

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

      @@Algovibes d and j are also diferent since those are calculated from K

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

      @@Algovibes thanks

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

    I may have missed this but where do you execute or run the script ?

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

      Locally on your machine manually, with a task scheduler cronjob or on a virtual machine. I have covered all three in the cryptobot playlist . Be kindly invited to check that out!

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

      @@Algovibes thanks will watch them.

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

    Is there a place where we can view your notebooks?

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

      I am appending them as a pastebin link in the video description once a certain level of engagement is reached.

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

    I didn't understand the 'lags' concept. Have you explained it in any other video?

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

      Yeah, was going more into details here:
      ruclips.net/video/r8pU-8l1KPU/видео.html
      Thanks for watching :-)

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

    Can u make a trading bot that makes the order will always be the first in buy order list, and also the same in sell order list? I dont know coding.

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

      Could you elaborate on the strategy? Maybe with an example?

  • @SimpleGuy-ne5dq
    @SimpleGuy-ne5dq Год назад +1

    👍

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

    Does this work with other exchange API like FTX, Gemini ?

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

      With the proper adjustments I see no reasons why it shouldn't. You just need a price stream and a possibility to execute orders.

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

    Hi mate, how could I change the quantiy? Instead of buying tokens, I want to use investment, I’d say 10 USDT.

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

      Hi man, I have covered using quantities in these two videos:
      ruclips.net/video/FlL1X17sw8o/видео.html
      and
      ruclips.net/video/mDNIAkEZChg/видео.html
      Let me know if that's solving your problem!

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

      @@Algovibes Danke shön! I’ll check them and let you know!! Tchüss

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

    How would you calculate maximum quantity from balance for an order? I have a method for that but it seems that for certain coins different decimals apply, so it return LOT_SIZE errors? Is there a way to buy/sell orders with only your USDT balance like you can do in the app? I presume if nothing you can do it directly with binance api calls and not trough python-binance lib. Thank you

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

      Hi buddy, what if you just provide your capital, pull the most recent price and calculate the quantity? Isn't that solving your problem?

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

      Hi, i did it the same way, and while testing the bot a few Times it occasinaly gives back error insuficient funds... IV bene thinking to make direct API calls since on binance api when creating orders you can provide quantity OR usdt amount, and that is not the case with Python binance library. What do you think about this?

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

      And as well, you would have to calculate on fees, so IV been testing with few of them and multiplying with 0.995 seems to work the best. Do you have any ideas what would be the best fee calculating way?

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

      Thank you, i Will set up the calculations Like you explained and test 🙂

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

      @Nguyễn Phú Trọng Instead of rounding, you should truncate based on lot size decimals.

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

    Hi sorry, I have a problem using ta library, because the ta.momentum command doesn't seem be present... maybe I wrong something installing ta library with pip install.. do you have any clue?

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

      Did you do pip install ta or pip install ta-lib? Please use ta.

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

      Yes, you need to install ta instead of ta-lib.

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

      Yes I did... but It continue to not give me any real command momentum... any other advice? in case thanks in advance.

  • @crypto-tube2236
    @crypto-tube2236 2 года назад +2

    Have a lot of 🤖bots🤖 for buying NFT.
    Ask me if it's intresting for you.

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

    How to get, the close one or two bar ago and volumen ?

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

      Can you define "bar ago"? You mean the values in the previous row or did I got you wrong?

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

      Hello, thanks for your answer, yes, exactly in the previous row, I have a strategy that needs to capture the close of the previous bars and analyze that information.

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

    What's the platform your coding on?

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

    Hello Anglovibes,
    can i get the source code so as to edit it to suit my strategy?
    please

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

      Hi Michael,
      I am publishing code based on engagement. This video is near to the engagement goal but not yet there. I have published code e.g. in this one here:
      ruclips.net/video/rc_Y6rdBqXM/видео.html

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

    Hello sir can you make a tutorial bot to buy and sell a newly listed coin in binance

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

      Pretty interesting idea. Not quite sure about the API call for that tho. But I have noted your suggestion. Thanks a lot!

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

    Is this for spot trading or binance futures?

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

      In this one I was using Spot. But could be used for Futures as well. At least I see no point against it.

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

      @@Algovibes thanks so much.

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

    i got error message
    -Cannot find reference 'momentum' in '__init__.py'-,
    im using pycharm, can you tell me why i got that error message?

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

      Are you working with the ta library? Not ta-lib but ta?

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

    Hello sir, I was wondering if you could show us an example on how to implement the bybit futures API into this kind of bot and how to make the orders? Would be very appreciated :) Very very great content.

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

      Hi man, thanks a lot for your kind words. Not quite sure if I will do exactly that in the upcoming weeks/months but I got covering another exchange on my list.

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

    Hi
    I have next to 0 programming skills, just done some basic stuff, but trying to follow you here.
    When executing "inst.decide()" i get the following error: "AttributeError: 'Signals' object has no attribute 'decide'"
    I executed inst = Signals(df, 5) but still i get this error. I tried giving it an attribute but that doesnt help, obviously..
    Can someone help me?

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

      Hi man,
      well ad hoc I would guess that you didn't define the decide method within the Signals class.

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

      ​@@Algovibes I resolved the issue, i had defined it but the structure of my code was wrong. Not correctly indented lol. Thanks tho :)
      Also i tried running your code in PyCharm but i ran into a whole bunch of other issues doing that, so back to Jupyter now haha.

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

      @@Algovibes Ser, been trying to fix this issue for a day now, can't figure it out. I call the strategy and it starts running, however when buying conditions are met i always receive the same error: BinanceAPIException: APIError(code=-2010): Account has insufficient balance for requested action.
      Which is very weird, because i run another program (your high risk altcoin strategy) and it works there. Any idea why this happens on one script and not the other?

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

    hey i deployed the same bot but to Kucoin platform and the code exceeded API request rate :( any fix for that?

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

      You probably need a live stream (via Websocket) of the data. Shouldn't run into that issue then.

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

      @@Algovibes yes im trying it rn! will let u know if the bot works or not

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

    Hello can i give strategy and show to code it?? Im new into coding I don't understand clearly

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

      Could you elaborate?

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

    Can you please help on fixing the below error
    ConnectionError: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))

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

      Can you just instantiate the client again?

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

      @@Algovibes Thanks for your reply. It's fixed. The cause of teh error is by defult the windows OS has enabled for the option to sleep in 30 mins. So the uninteractive screen for 30 mins will go on sleep mode. Thus the connection with binance will interrupted.
      SO I disble the screen saver and sleep options.

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

    Wouldn't it be better if u make it so that it only prints out only when there is an order?

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

      Sure. Also possible!

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

    hi.
    you are amazing.
    could you please write a code for kucoin with websocket and RSI STOCH and MACD?
    i could not implement kucoin websocket to dataframe.
    i am very new in python
    thanks bro

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

    Is there any free host available where we can run this 24*7 ?

    • @Algovibes
      @Algovibes  2 года назад +3

      I am using GCP which is not free but this bot will run on the simplest form of a Virtual machine. I have some tutorials on how to set up GCP and let a Python script run on it. Be invited to check it out:
      ruclips.net/p/PL9ATnizYJ7f9ZGSx-7siizxqh4VtRZblk

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

    I was testing this using the BNBBTC pair, all the conditions are met for the buy to initiate but it doesn't actually trigger. There's no errors or anything. The trigger is always 0

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

      How many lags did you use? That's critical for the strategy. And yes, it can happen that there are 0 signals. If you want you can exclude the first trigger but that wouldn't be the strategy.

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

      @@Algovibes I tried 3, 5 and 35 (with test orders). Perhaps I'm being impatient, maybe it needs more than a couple of hours sometimes

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

    How to add sell option to this bot for forex trading.
    How can contact you ?

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

      Can you elaborate?

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

      @@Algovibes i upgrade your code.i find it.now it work perfectly. Thanks. Keep it up this video series

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

      @@sasithaishara3690 awesome. Thanks a lot for your kind words man

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

    Getting an error that says TA not defined. Do you have any solution on that please?

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

      you need to make sure you have imported ta

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

      @@Algovibes Thank you. But how do we import TA?

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

    Thanks for sharing, but where to get the code?

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

      I am publishing dependent on the engagement. This one has a pretty high one but not high enough. Probably in 1-2 months.

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

    Hey, can u copy pro trader his number one strategy which he claims to have 80% win rate and code it??

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

      I love testing other RUclipsr's strategies and I feel like people also enjoying this. Could you pass me a link? Thanks a lot in advance!

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

    Do you lose sometimes from your algo

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

      Of course! There is no magic formula and there are no consistent profits.