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])
@@Algovibes I get this error after running the code for a period of time: Connection Error: [Errno 10054] An existing connection was forcibly closed by the remote host.
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!
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.
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
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...)
No worries man. There is a prerequisite for this video. I usually link the necessary videos in the description: ua-cam.com/video/r8pU-8l1KPU/v-deo.html
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…
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: ua-cam.com/video/mDNIAkEZChg/v-deo.html
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!
Hi buddy, thanks for watching! Did you already check out my Python in the cloud playlist? In case you haven't: ua-cam.com/play/PL9ATnizYJ7f9ZGSx-7siizxqh4VtRZblk.html
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?
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.
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 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"
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.
Thanks a lot mate, for the written source code you could consider becoming a channel member. I would be happy to welcome you: ua-cam.com/channels/87aeHqMrlR6ED0w2SVi5nw.htmljoin
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
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
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?
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: ua-cam.com/video/nQkaJ207xYI/v-deo.html Also this one is showing some approaches to avoid time outs: ua-cam.com/video/g04GeHe-dJw/v-deo.html
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!
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
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.
Hi man, I have covered using quantities in these two videos: ua-cam.com/video/FlL1X17sw8o/v-deo.html and ua-cam.com/video/mDNIAkEZChg/v-deo.html Let me know if that's solving your problem!
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.
excellent UA-cam 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 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?
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?
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 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?
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
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!
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
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
@@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.
@@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
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.
@@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) :/
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: ua-cam.com/video/rc_Y6rdBqXM/v-deo.html
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?
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.
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 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
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: ua-cam.com/play/PL9ATnizYJ7f9ZGSx-7siizxqh4VtRZblk.html
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?
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!
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 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.
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 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.
@@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?
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.
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?
Hi man, thanks a lot. For minute data this will be helpful for you: ua-cam.com/video/HB1CLz0Z1NY/v-deo.html If you want to pull stream data for multiple symbols, check this out: ua-cam.com/video/8p240qonj0E/v-deo.html Happy for a quick feedback on the comment section of these videos.
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
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?
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?
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?
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.
When i run this code, after a while, probably when a trade is triggered, this error comes up: "BinanceAPIException: APIError(code=-1117): Invalid side." Does anyone know what that means and how to fix it?
@@Algovibes There are only long positions included in this script. Is it possible to add short positions to the same script with the opposite triggers? So the bot would either trade long or short if the respective triggers get activated, but not both at the same time
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.
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?
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!
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.
That's not really a program but rather a programming language. It is Python and it is using the Python Binance API by using a python library which enables you to interact with the API. Does this make sense to you?
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?
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: ua-cam.com/play/PL9ATnizYJ7f9sW_mdY3071dS8mMwBGu2S.html (Stock recommendation I - III)
how to change time fram, i try to change 5 min, but ValueError: Length mismatch: Expected axis has 0 elements, new values have 6 elements plz help? (sorry about my english)
@@Algovibes plz make a video or copy line of cord as a comment, that wahere we need to change the corde to change the time frame? thank lot i'm with very poor cording and English knowlage
@@Algovibes thanks for ur clue, but i couldn't correct my self plz can u paste the corrected line of cord or make a short video , plz, plz, thank u lot
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
lol :D As I said many times. I don't claim to have any secrets. I am a finance guy working in the Data Science field and I love to program stuff in my spare time.
@@Algovibes I mean that you are doing great stuff and not a lot of people knows about you. Our small community can learn and earn money together with you. That’s very cool in my opinion.
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
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.
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? :)
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 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 :)
I’m getting a lot the ( insufficient balance ) error in the selling method and i realized that the api can’t just sell how much is left you have to fully specify , but the problem is that you lose a small amount in the transaction. Has anyone found any good solution for this one. Great video BTW :P
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])
thanks buddy, you are a life saver
Thank you very much you are a hero also
You are an incredible teacher, your knowledge of python is impeccable :)
Thank you mate for your appreciative words.
@@Algovibes I get this error after running the code for a period of time:
Connection Error: [Errno 10054] An existing connection was forcibly closed by the remote host.
Hi Good Sir.. can I run this on binance? Thanks
Glad I found this gem of a channel, keep up the good work man.
Thank you very much for your kind words :-)
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.
Awesome mate, thanks for your comment. Happy to read!
ive been waiting for this
Hope I met your expectations then! Thanks for waiting :-)
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!
Thank YOU! :-)
@@Algovibes Hi Can you share your business email as I have to discuss few projects?
I love your crypto contents
most people who does crypto probably do it via algorithm
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.
@@Algovibes yeah those are annoying as hell. Your videos are informative and nice to follow along. Are you interested in Blockchain development too?
@@techsavage813 Didn't have any exposure to it yet.
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
Very happy to read. Thanks a ton Marc for your positive attitude!
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...)
Thanks mate. Master I wouldn't say but I got some years of experience on my back. Thanks for the suggestion!
Would love to see implementations of other strategy, price action strat perhap. You did great, thank you
Thanks buddy :-)
The best easy way to understand video to explain the bot! Thanks for this video and waiting for some new crypto related videos!
Thank you very much for watching and your comment :-)
You deserve more subs. Good content! keep it up
Thank you :-) I am working on it! People like you help me with comments like that for sure! Thanks again.
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.
No worries man. There is a prerequisite for this video. I usually link the necessary videos in the description:
ua-cam.com/video/r8pU-8l1KPU/v-deo.html
Thanks again
Amazingly interesting, checked pretty much all of these videos thank you !
Thanks for your support mate, you wouldn't believe how much this is helping me!
Great video of going straight to live without any backtesting.
What? :D I am literally referencing to the backtest video in the first 20 seconds of the video.
Learn Python they said.. I understand why now, so smooth. Very informative video, thanks 🐍 // JS dev
Thanks for watching buddy.
Wow nice man! How did you get your python programming skills? Great video ! Subbing now
Hi buddy. Thanks a lot for subscribing :-)
Have talked about that here:
ua-cam.com/video/qCZiENV83rE/v-deo.html
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…
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:
ua-cam.com/video/mDNIAkEZChg/v-deo.html
Thank you for this brilliant video on UA-cam. I am very very interested in this topic, although I am a complete noob👍👍👍
Spasibo :-)
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!
Agree
Thank you for the video! Could you please make a video about how to run bots in the cloud 24/7?
Hi buddy, thanks for watching! Did you already check out my Python in the cloud playlist?
In case you haven't:
ua-cam.com/play/PL9ATnizYJ7f9ZGSx-7siizxqh4VtRZblk.html
What's the platform your coding on?
Jupyter Notebook :-)
Great Teacher ! Kind regards and thousands respect !!!
Thank you mate :-)
Have a lot of 🤖bots🤖 for buying NFT.
Ask me if it's intresting for you.
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?
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.
You made a very good point by I doubt that in this specific case this is not the reason for the loss.
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?
Danke dir :-) Wo würdest du den Vorteil darin sehen?
@@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"
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.
Dankeschön :-) Ich glaube die Strategie hat relativ schlecht performed.
I didn't understand the 'lags' concept. Have you explained it in any other video?
Yeah, was going more into details here:
ua-cam.com/video/r8pU-8l1KPU/v-deo.html
Thanks for watching :-)
@Algovibes Where do you share your source codes ? Great material! Tnx for sharing.
Thanks a lot mate,
for the written source code you could consider becoming a channel member. I would be happy to welcome you:
ua-cam.com/channels/87aeHqMrlR6ED0w2SVi5nw.htmljoin
What is the expected win rate and expected gain/loss ratio in this strategy?
Did you check the linked video? I have gone over that there. Let me know if that is what you were looking for!
Hi, how to change timezone in function getminutedata? 'Europe/Berlin' maybe?
Hi, should be working with adding +1 to UTC. I think Germany should be +2 but not 100% sure.
@@Algovibes Thank you!
@@Algovibes no change but this did it: "frame.index = pd.to_datetime(frame.index + 7.2e+6, unit='ms')"
Many thanks again... Wonderful info
Thanks a lot Marc!
Hello sir, you know how we can get sell limit and buy limit data from binance for orderbook? Thank for your help.
Covered buy limit orders e.g. here:
ua-cam.com/video/mDNIAkEZChg/v-deo.html
Wow! Fantastic video. Thank you Algovibes.
One question; how could you apply Heikin Ashi into the df before calculating %K, %D, rsi?
Thanks a lot Tag. Didn't test that yet, so can't tell you ad hoc, sorry!
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
Most probably the lookback period. It's unfortunately pretty vague.
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
Thank you :-)
No I haven't but I wanted to cover Backtesting on Cryptos in the future as well.
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?
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:
ua-cam.com/video/nQkaJ207xYI/v-deo.html
Also this one is showing some approaches to avoid time outs:
ua-cam.com/video/g04GeHe-dJw/v-deo.html
Maybe your client was disconnected. Try connecting to client server before buy/sell order.
I don't know how to use Jupiter notebook.... Can you teach the same thing in pycharm
I have covered using an IDE here:
ua-cam.com/video/nQkaJ207xYI/v-deo.html
I may have missed this but where do you execute or run the script ?
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!
@@Algovibes thanks will watch them.
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
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.
Hi mate, how could I change the quantiy? Instead of buying tokens, I want to use investment, I’d say 10 USDT.
Hi man, I have covered using quantities in these two videos:
ua-cam.com/video/FlL1X17sw8o/v-deo.html
and
ua-cam.com/video/mDNIAkEZChg/v-deo.html
Let me know if that's solving your problem!
@@Algovibes Danke shön! I’ll check them and let you know!! Tchüss
Thanks for this great article. Everything is well explained.
Thanks for your feedback mate.
@@Algovibes Do you have any github link where your codes are available?
Hi, thanks for the video ! I have a question, why not put a StopLoss and a TakeProfit instead of tick the price ? Thanks
Also possible :D See these videos as room for all kinds of improvements and amendments.
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.
I covered Long only here.
Is there a place where we can view your notebooks?
I am appending them as a pastebin link in the video description once a certain level of engagement is reached.
habe alles gechekt und finde den Fehler nicht :-( "TypeError: Signals() takes no arguments". was übersehe ich ? Danke
😒__init__. :-D
Check Mal die Antwort auf deinen anderen Kommentar. Sollte das problem lösen.
excellent UA-cam 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
Thank you mate :-)
What do you exactly mean with balance variable?
@@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?
very cool video ! id like to see this but 2x longs instead of buys and 1x shorts instead of sells ...what do u think ?
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.
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?
Did you do pip install ta or pip install ta-lib? Please use ta.
Yes, you need to install ta instead of ta-lib.
Yes I did... but It continue to not give me any real command momentum... any other advice? in case thanks in advance.
What is the bame of that editor your programming in?
I am using Jupyter Notebook in this as I think its the best for tutorials. Privately I am using Spyder.
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!
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?
@@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?
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
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.
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!
Thanks Alter :D it's just time steps which you are going back. I explained it in more detail here:
ua-cam.com/video/r8pU-8l1KPU/v-deo.html
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
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
@@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.
@@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
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.
@@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) :/
Hello Anglovibes,
can i get the source code so as to edit it to suit my strategy?
please
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:
ua-cam.com/video/rc_Y6rdBqXM/v-deo.html
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?
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.
Hi, how do you get trading volume from the tick data from binance?
Either via the get_historical_kline as one of the columns (not 100% which but its in the API docs) or via the livestream.
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!
Hi mate, can you give me a timestamp? Happy to check that!
@@Algovibes Hey! Thanks for answering! Sure, its 8:36 , the function gettrigger.
@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
Is there any free host available where we can run this 24*7 ?
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:
ua-cam.com/play/PL9ATnizYJ7f9ZGSx-7siizxqh4VtRZblk.html
"AttributeError: 'DataFrame' object has no attribute 'Buy'"
How can i fix this? Please help me brothers and sisters.
frame = frame.iloc[:, :7]
frame.columns = ['Time', 'Open', 'High', 'Low', 'Close', 'Volume', 'Buy'];
this fixed it.
Thank you so much for sharing the solution. Really appreciate the attitude helping out others!
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?
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
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!
@@Algovibes Thank you so much for your prompt respond. Yes, that's exactly what I was looking for!
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))
Can you just instantiate the client again?
@@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.
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?
Hi man,
well ad hoc I would guess that you didn't define the decide method within the Signals class.
@@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.
@@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?
Hi!! Nice video ,Can you make the bot hold the cryto for future selling without getting a loss?
Thank you buddy. In that case just cancel the selling condition.
@@Algovibes i mean, autosell if it have favorable condition and if don't, to just hold the crypto.
You can just remove the "df.Close[-1]
Getting an error that says TA not defined. Do you have any solution on that please?
you need to make sure you have imported ta
@@Algovibes Thank you. But how do we import TA?
More great content for me to use 😁
Thank you!
Thank you buddy :-) Appreciate your comment!
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.
Thanks mate. Probably because there is not enough data. Can you double check?
@@Algovibes My mistake, since I am using Coinbase API, I need to sort the incoming price based on date and time. Thanks
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?
Hi man, thanks a lot.
For minute data this will be helpful for you:
ua-cam.com/video/HB1CLz0Z1NY/v-deo.html
If you want to pull stream data for multiple symbols, check this out:
ua-cam.com/video/8p240qonj0E/v-deo.html
Happy for a quick feedback on the comment section of these videos.
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
Hi buddy, what if you just provide your capital, pull the most recent price and calculate the quantity? Isn't that solving your problem?
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?
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?
Thank you, i Will set up the calculations Like you explained and test 🙂
@Nguyễn Phú Trọng Instead of rounding, you should truncate based on lot size decimals.
Hello can i give strategy and show to code it?? Im new into coding I don't understand clearly
Could you elaborate?
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.
Could you elaborate on the strategy? Maybe with an example?
Is this for spot trading or binance futures?
In this one I was using Spot. But could be used for Futures as well. At least I see no point against it.
@@Algovibes thanks so much.
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?
Welcome! Well pretty similar to what I did with the other indicators. Calculate it as a column and add it to the conditions.
@@Algovibes Thank you
hey i deployed the same bot but to Kucoin platform and the code exceeded API request rate :( any fix for that?
You probably need a live stream (via Websocket) of the data. Shouldn't run into that issue then.
@@Algovibes yes im trying it rn! will let u know if the bot works or not
高質量的視頻內容!我還有一個問題:有人給我轉了点usdt,我有恢復短語。(pride)-(pole)-(obtain)-(together)-(second)-(when)-(future)-(mask)-(review)-(nature)-(potato)-(bulb) 我怎麼把它們變現呢?
You should print only when Target changes :)
True! Would be way better.
How to get, the close one or two bar ago and volumen ?
Can you define "bar ago"? You mean the values in the previous row or did I got you wrong?
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.
i got error message
-Cannot find reference 'momentum' in '__init__.py'-,
im using pycharm, can you tell me why i got that error message?
Are you working with the ta library? Not ta-lib but ta?
When i run this code, after a while, probably when a trade is triggered, this error comes up: "BinanceAPIException: APIError(code=-1117): Invalid side." Does anyone know what that means and how to fix it?
Ok, I think i fixed it. I typed side='buy' instead of "side='BUY'
awesome. Less work for me 😛
@@Algovibes There are only long positions included in this script. Is it possible to add short positions to the same script with the opposite triggers? So the bot would either trade long or short if the respective triggers get activated, but not both at the same time
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.
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?
Does this work with other exchange API like FTX, Gemini ?
With the proper adjustments I see no reasons why it shouldn't. You just need a price stream and a possibility to execute orders.
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!
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.
How can I do this and in which program is this?
That's not really a program but rather a programming language. It is Python and it is using the Python Binance API by using a python library which enables you to interact with the API. Does this make sense to you?
@@Algovibes Lol, that’s pretty difficult to understand, but at least something)
Wouldn't it be better if u make it so that it only prints out only when there is an order?
Sure. Also possible!
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?
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:
ua-cam.com/play/PL9ATnizYJ7f9sW_mdY3071dS8mMwBGu2S.html
(Stock recommendation I - III)
How to add sell option to this bot for forex trading.
How can contact you ?
Can you elaborate?
@@Algovibes i upgrade your code.i find it.now it work perfectly. Thanks. Keep it up this video series
@@sasithaishara3690 awesome. Thanks a lot for your kind words man
Hello sir can you make a tutorial bot to buy and sell a newly listed coin in binance
Pretty interesting idea. Not quite sure about the API call for that tho. But I have noted your suggestion. Thanks a lot!
Thanks for sharing, but where to get the code?
I am publishing dependent on the engagement. This one has a pretty high one but not high enough. Probably in 1-2 months.
Hey, can u copy pro trader his number one strategy which he claims to have 80% win rate and code it??
I love testing other UA-camr's strategies and I feel like people also enjoying this. Could you pass me a link? Thanks a lot in advance!
how to change time fram, i try to change 5 min, but ValueError: Length mismatch: Expected axis has 0 elements, new values have 6 elements plz help? (sorry about my english)
No worries! You have to amend the interval parameter.
@@Algovibes plz make a video or copy line of cord as a comment, that wahere we need to change the corde to change the time frame? thank lot i'm with very poor cording and English knowlage
@@Algovibes thanks for ur clue, but i couldn't correct my self plz can u paste the corrected line of cord or make a short video , plz, plz, thank u lot
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
thanks buddy
Do you lose sometimes from your algo
Of course! There is no magic formula and there are no consistent profits.
Guys, let's keep this guy our secret. lesspeople know this = this scheme works better.
lol :D As I said many times. I don't claim to have any secrets. I am a finance guy working in the Data Science field and I love to program stuff in my spare time.
@@Algovibes I mean that you are doing great stuff and not a lot of people knows about you. Our small community can learn and earn money together with you. That’s very cool in my opinion.
@@erichdarke8979 Thanks for your kind words! ❤
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
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.
@@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
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? :)
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.
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
@@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 :)
You are an incredible teacher, your knowledge of python is impeccable :)
Thanks for your kind words my friend ❤️
this is VERY nice, thank you for this, i learned a lot!
Awesome, thank you very much for your feedback.
I’m getting a lot the ( insufficient balance ) error in the selling method and i realized that the api can’t just sell how much is left you have to fully specify , but the problem is that you lose a small amount in the transaction. Has anyone found any good solution for this one. Great video BTW :P
That is happening when you don't set the commission asset to BNB. You are paying lower fees when doing that so I am just assuming that here.