Building a Trading Robot in Python | Pt. 1

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

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

  • @dillondriskill6403
    @dillondriskill6403 3 года назад +7

    such a good channel. probably the only person in the world who A) has the patience and skills to make this amazing library, B)cares enough to make it GOOD and C) makes very clear videos basically walking you through the process without some weird outdated libraries or some weird workflow that no real person uses

  • @allankanaiya3775
    @allankanaiya3775 4 года назад +59

    You're literally more informative than the entire TD API documents put together. Thank you :)

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

      Glad it was helpful!

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

      Documentation means easier adoption... I don't know why there's so little out there

    • @sl66ggehrubt
      @sl66ggehrubt 4 года назад +3

      I was banging my head for 68 hours with their incredibly cryptic documentation, hitting up the server with hundreds of rejected connection requests. Their example is in javascript with a custom encoder algo, their millisecond conversion didn't become clear to me from javascript, asynchronous server is hard, one value is passed as integer while another number is string, half the login dict is encoded, the other half is just sent as string. Why oh why tda.
      Found these videos and got it all working in an hour.

  • @zhaofour9833
    @zhaofour9833 3 года назад +7

    I really appreciate your videos, Sir!!! I am a Fortran and Python player, and I have my own strategy to trade crypto, but still don't know how to connect to the real signal. You really helped me a lot, like how to connect Binance, how to sell and buy. I started making a bit of money now. Thanks so much !!!

  • @allisonfabian7798
    @allisonfabian7798 3 года назад +60

    This video says it all , Even the best trades and the most profitable trading strategies won't be effective if you don't have strict money management rules in place to protect your winning trades, cut your losses and grow your account that is while I highly recommend Mr Romero pieto who indeed trades on my behalf making me earn more profits every week.

    • @beckymilton2029
      @beckymilton2029 3 года назад +1

      I admire his trade simplicity alot and his ability to utilise your investment and ensure it's profitable at the end.

    • @red-xe2xw
      @red-xe2xw 3 года назад +2

      Mr Romero pieto has helped me greatly I can now earn and also learn how to improve my knowledge in trading.

    • @markhai6700
      @markhai6700 3 года назад

      Great content sir.

    • @kelvinwood492
      @kelvinwood492 3 года назад +1

      His trade execution quality and profiting is well structured with great financial features.

    • @clarkraw2196
      @clarkraw2196 3 года назад

      Becky Milton how can I get hold of Mr Romero pieto and his trading service's ?

  • @markpetrov7439
    @markpetrov7439 4 года назад +4

    You don't know how much I have looked for a video like this! Thanks!

  • @subinlee4249
    @subinlee4249 4 года назад +5

    Greatest guide ever. Thank you in South Korea

    • @SigmaCoding
      @SigmaCoding  4 года назад

      Glad to hear my videos are reaching overseas :)

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

    Just want to say thank you for what you did here. This series of videos actually helped me to get some experience in python and trading so I was able to acquire a wonderful job right at the beginning of Covid lockdowns after I got made redundant at work . I was basically watching this series ongoing and writing my own bot together with you.
    Great, high quality guides, thanks again

  • @ezequielvega2943
    @ezequielvega2943 4 года назад +7

    By far You are the Best in this topic! Thanks Alex

    • @SigmaCoding
      @SigmaCoding  4 года назад +1

      You're very welcome!

    • @QUANT_Trader88
      @QUANT_Trader88 4 года назад

      @@SigmaCoding could you build a trading bot for me on tradingview

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

    I discovered this channel today and it's got all the topic I look for 😃

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

    been looking for a series like this!!! Great video!

  • @yifenghou986
    @yifenghou986 3 года назад +4

    This RUclipsr is soooo cute! It feels like he is confident and not confident at the same time. e.g. Look at this wonderful photo of me, which is horrible at the same time. I am like wat??? Haha. But I like the content. Thanks for posting. Gonna follow through the rest of the videos.

  • @0xlaptopsticker29
    @0xlaptopsticker29 4 года назад +1

    Very excited about the coming videos

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

    Thanks for your great work and focus on TDA. I have been waiting for years for someone to figure this out and explain it to me. TDA hid their API for years and didn't maintain. Now that it is a fully exposes REST API we can do things with it. Thank you for these tutorials.

  • @monkyspnk777
    @monkyspnk777 3 года назад +11

    33 people voted down as they wanted to make money but had no clue how complicated it is

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

    Thanks for all the info. I will definitely give it a try.

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

    What an awesome guy i asked alex about technical indicators now we have one awesome

  • @darrenlau2000ify
    @darrenlau2000ify 4 года назад +15

    Interactive brokers would be a gift from the gods to people globally :D

    • @richlysakowski1415
      @richlysakowski1415 4 года назад +3

      I disagree. There's already a lot of Interactive Brokers auto-trading robot code examples, books, and tutorials in Python. We needed someone to focus exclusively on TDAmeritrade API.

    • @splashhdashh8299
      @splashhdashh8299 4 года назад +1

      @@richlysakowski1415 link some if u can pls

    • @clear5136
      @clear5136 4 года назад

      @@richlysakowski1415 Link some

  • @Danielchall25
    @Danielchall25 4 года назад +1

    Your videos are always a joy.

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

    awesome introduction video.

  • @mmmmmmmm969
    @mmmmmmmm969 4 года назад +3

    Keep going sir keep going I love your content ☺️☺️

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

    Wow, thanks m8. Excellent work!

  • @stephendoroff7949
    @stephendoroff7949 3 года назад +4

    I truly appreciate all that you are doing, especially the focus you have on documentation and the importance of it! I'm a beginner Python developer and you're helping me develop my skills as well as my best practices. I have a question regarding the streaming which I am working with now. I'm trying to pull data from the message sent and manipulate the data before I write it to a data repository. Ideally what I want to see in the console is my manipulated data and not the standard data from the endpoint. Also, at some point I'll add False so that I don't print to the console which I've tested and it works.

  • @rajendrakumar1195
    @rajendrakumar1195 3 года назад

    Fabulous work in trade bot.. make also videos on binance api

  • @IAfoke
    @IAfoke 4 года назад +11

    I've looked everywhere and I haven't found much better help than your videos. You are a legend! Let's just say that I knew the options contract trades I wanted to place and had them in a '.csv' file, would it be possible to have the API access that data and make trades based off of the names in a list of contracts?

    • @SigmaCoding
      @SigmaCoding  4 года назад

      Glad I could help! Also, yes you could it just requires reading the Excel file and setting up the trade using the framework provided.

    • @aaronbfx01
      @aaronbfx01 3 года назад

      @@SigmaCoding I need your help

  • @alejandeodekiev8592
    @alejandeodekiev8592 3 года назад

    thanks for content!! saludos from Argentina!

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

    awesome dude ya bot a new sub and like, keep up the work...
    i haven't come to the deep part of the course yet (but is it paper trading or actual real money trading?)

  • @morrisonslue
    @morrisonslue 4 года назад +4

    I will love you forever if you do this for IB as well - no Ameritrade in Canada!

    • @ToXaNe1
      @ToXaNe1 3 года назад +1

      bruh, he literally has the api for IB in his video on github did you even watch it

  • @okayed5017
    @okayed5017 3 месяца назад +1

    Okay first things first get good at trading. How do i do that? 😀

  • @quilot100
    @quilot100 4 года назад

    Great work!
    Keep up the good work!

  • @passsacaglia
    @passsacaglia 4 года назад +1

    Omg haha this sounds like the voice of KvonComedy! Nice video!

    • @SigmaCoding
      @SigmaCoding  4 года назад +1

      that's a first, I had to look him up and see who he was :)

    • @DanArizona
      @DanArizona 4 года назад

      @@SigmaCoding yah, i had to look him up too. i see/hear no resemblance. i think his comment was just a back-handed way to spam that channel. Love your videos! Thanks!!

    • @passsacaglia
      @passsacaglia 3 года назад

      @@DanArizona Hey guys absolutely not! I have nothing to do with that dude. Just remember him from mtv-cribs and found his channel and been watching a lot of videos. I think Sigma's voice is kind of similar in the tone somehow, I'm a music+language guy so I tend to be very nerdy with these things. Nice video series tho Iv learned a lot :) Cheers!

  • @benya7
    @benya7 4 года назад +7

    this is great! Question, approximately how many videos will this series have? Thank you blessing

    • @SigmaCoding
      @SigmaCoding  4 года назад +6

      At this point, I'm imagining close to fifteen. It might be overkill, but I go into more detail than less. Also, the last few videos might be revisiting the objects again and adding more functionality.

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

      @@SigmaCoding Fifteen videos is awesome, is this available in a repo where we can help you debug, test and maintain it?

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

    Oh amazing. I hope this series is using the Interactive Broker api.

    • @colinmaharaj
      @colinmaharaj 4 года назад

      I intend to use market data with interactive brokers and trade in litespeed.

  • @georgihaydukov6267
    @georgihaydukov6267 3 года назад

    Just wanted to ask if this series will cover forex trading.
    Thanks and keep up the good work

  • @monkeydtheorist979
    @monkeydtheorist979 4 года назад

    Dude! you're frickin' amazing

  • @leanjason4
    @leanjason4 4 года назад +1

    Thanks for the series! I see you are using paper trades in the code, from what I see from td they don't have paper trading enabled for APIs. What type of td account are you using? I was going to create a fresh td açcount for this app and want to make sure I get it right.

    • @SigmaCoding
      @SigmaCoding  4 года назад

      It's not a real Paper Account, the best I can do is mimic the "order submission" but obviously certain things will be missed. Unfortunately that's the best we can do with the TD API at the moment.

  • @rolandonwa2369
    @rolandonwa2369 5 дней назад

    Can I deploy the bot on cloud to run 24hrs

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

    Is there a way to modify it to make it work with VTmarkets? I'll like to test my own with that

  • @TheClickatsh
    @TheClickatsh 4 года назад +1

    Great works!

  • @csgonoob3955
    @csgonoob3955 3 года назад +1

    wassup, can i use this code or like will this toturial series will work for any trading platform

    • @SigmaCoding
      @SigmaCoding  3 года назад

      The goal right now is to have it work with TD Ameritrade.

    • @csgonoob3955
      @csgonoob3955 3 года назад

      @@SigmaCoding oh ok so this robot doesn't actually work

  • @ninjo9895
    @ninjo9895 4 года назад

    would we be able to edit some of the code to use a different broker or would that be too hard??

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

    great content

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

    Is this for trading view?

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

    New to Python. I am a .net Stack developer. Is there any good videos which shows me what i need to install to get my environment up? Which IDE is preferred and why? I noticed your using JupyterLab correct? Is that just to manage Splinter automation? Love the videos just when i see you mention a new extention i run off and watch what thats about. I am currently using VSCode for development of Python btw.

  • @clivestephenson2793
    @clivestephenson2793 4 года назад +3

    New to python so I am confused about why no SQL database. Is pandas a permanent form of data storage?
    Regards Clive

    • @FabledNarrative
      @FabledNarrative 4 года назад

      Pandas is a module in Python (a bunch of code to execute code).
      Ex: "random" is a library in python to do the following action...
      # The 'random' module
      import random
      # Randomly choose an integer number between 0 and 10.
      x = random.randint(0, 10)
      # Show 'x'.
      print(x)
      # x = 5
      Pandas is a module that helps parse and organize dataset files.

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

    can you make price action trading bot, no price lagging indicators?

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

    can we build auto trade bot for olymptrade?

  • @DanArizona
    @DanArizona 4 года назад

    Thanks for your videos. They are great! Are you hearing/seeing anything about how the Schwab merger will change the APIs?

  • @classenalex
    @classenalex 3 года назад

    Hey you said its for TDAmeritrade an not for Interactive Broker but can you make such a video?

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

    Does it work for metatrader?

  • @raghuramelancheran9979
    @raghuramelancheran9979 3 года назад

    Thanks a lot for this tutorial bro

  • @MARC311O
    @MARC311O 3 года назад

    How can I buy bot code like that?

  • @kiranshastri9496
    @kiranshastri9496 3 года назад

    I built 1 and 2 (2019). no issues TD websockets on python

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

    I hope this doesn't come off hostile but.... without a full audit of this API how do we know that our information is safe?

  • @WhatsNextFam
    @WhatsNextFam 9 месяцев назад

    Can I make this to fit my Robinhood account?

  • @cmuhammad
    @cmuhammad 3 года назад

    Can this be used for forex?

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

    Didn't understand were the bot operates exactly.

  • @mohamedzitouni2203
    @mohamedzitouni2203 4 года назад

    can this course help to build a robot for trading cryptocurrency? or just stocks?

    • @xaviaraxel8356
      @xaviaraxel8356 3 года назад +1

      Bitcoin is defying all laws of nature and TA in this new era with many speculations and many predictions gone wrong, it's outrightly wrong to just sit back hodl and wait maybe incur some losses along the line, that's a wrong mindset for an investor because as an investor finding ways to always increase and stack up more coins thereby making prof!ts should be the way of life, even experienced traders are in a doubt to take long or short position. People who invested in Bitcoins at the beginning or even in 2013 or 2015, when Bitcoin was crashing, have now become millionaires. I have been more skillful than lucky. Thanks mainly to the good time, my initial investment was multiplied by 5 In two months. After getting in touch with Robert Wilson, an exp:ert in cryptography, who showed me how to use her program to make transactions and got 14 bitcoin in 2 moths with him. if you are looking for a way to increase your portfolio or investment. Robert's TєIєɠramm; + 4 4 7 8 2 8 4 5 0 7 6 8, WhætšÅpp (+ 4 4 7 8 2 8 4 5 0 7 6 8)

  • @rjaishree8297
    @rjaishree8297 3 года назад

    Preqisite of the course?

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

    Hey. I recently discovered a lot of your videos on Python and trading because I am a student. I really enjoy it when a presentation goes into such detail and explains everything with codes. I also came across another such interesting video by QuantInsti - "Python Trading Bot | Build, Backtest, and Go Live with Algorithmic Trading using Python". Quite curious to try this. Thank you!

  • @JoshuaWillis89
    @JoshuaWillis89 3 года назад

    Content actually starts at 11:11

  • @danielfutterweit4182
    @danielfutterweit4182 4 года назад +1

    Regarding ROBOT mimicking trader’s operations, I do not completely agree. It is different if you have zero commission or not, if you are under PDT rule, etc. I see robots scalping for cents making hundreds of trades. This can be seen in ask-bid/ladder, also you can see thousands of transactions per minute when in the level II there are orders for 100, 400 shares at a time and the prices go up and down suddenly. So, robot strategy can be different than humans one and more adequate to resources. On the other hand, most professional robots in datacenters.
    Unfortunately Ameritrade API is fragile (I got these responses this week: {'error': 'The endpoint doesnt exist.'} with the same request that thousands of times return the requested information, {'error': 'An unexpected server error occurred.'}, and also, I received an HTML (not a dict) response). Also, I am now testing asyncio “Get Quotes” (market is closed now) and response times go from 2.5 to 10 seconds for a batch of requests.
    Actually, I think that on a margin account, no PDT rule, zero commissions, tens of trades per day, lasting few minutes with a goal of low profit and high rate of trade wins might work.

    • @richlysakowski1415
      @richlysakowski1415 4 года назад +1

      TDA is not for High-Frequency Trading and scalping. It is fragile, and not robust enough. A few tens of trades per day will work, but not 100s or 1000s. There are throttles on the TDA servers. It is not totally free of commissions and exchange fees for retail traders (non-professionals), so scalping is not really going to work.

  • @keagansng5611
    @keagansng5611 4 года назад +1

    omg please do IBKR! so informative and detailed! thanks man! HMU if you wanna collaborate!

  • @Mike-cp1tj
    @Mike-cp1tj 4 года назад

    yes! code-along memorial day, coffee and breakfast sandwich in hand, I'm ready

    • @SigmaCoding
      @SigmaCoding  4 года назад

      The best way to spend a morning. :)

  • @MikiTheMighty
    @MikiTheMighty 4 года назад

    Do I need a TD account to go through this tutorial?

    • @xaviaraxel8356
      @xaviaraxel8356 3 года назад

      Bitcoin is defying all laws of nature and TA in this new era with many speculations and many predictions gone wrong, it's outrightly wrong to just sit back hodl and wait maybe incur some losses along the line, that's a wrong mindset for an investor because as an investor finding ways to always increase and stack up more coins thereby making prof!ts should be the way of life, even experienced traders are in a doubt to take long or short position. People who invested in Bitcoins at the beginning or even in 2013 or 2015, when Bitcoin was crashing, have now become millionaires. I have been more skillful than lucky. Thanks mainly to the good time, my initial investment was multiplied by 5 In two months. After getting in touch with Robert Wilson, an exp:ert in cryptography, who showed me how to use her program to make transactions and got 14 bitcoin in 2 moths with him. if you are looking for a way to increase your portfolio or investment. Robert's TєIєɠramm; + 4 4 7 8 2 8 4 5 0 7 6 8, WhætšÅpp (+ 4 4 7 8 2 8 4 5 0 7 6 8)

  • @rayj1232
    @rayj1232 4 года назад

    You’re awesome! Subbed

  • @dinabro5739
    @dinabro5739 4 года назад

    Fun explanation

  • @dakshprajapati1580
    @dakshprajapati1580 4 года назад

    Can I use Yahoo api?
    Please answer

    • @William_sJazzLoft
      @William_sJazzLoft 4 года назад

      The short answer is no. Yahoo! was compelled to take it down.

  • @pedroivopaulodaconceicao5288
    @pedroivopaulodaconceicao5288 4 года назад

    Thank you very much. I love you

  • @chrisparker9672
    @chrisparker9672 3 года назад

    @10:40 "Sedate"

  • @dominickmuniz
    @dominickmuniz 4 года назад +1

    Thank you!

  • @bassfx914
    @bassfx914 4 года назад

    The new all mighty VP (No Nonsense Forex) of forex has a doppelganger only for building trading bots. I've got my algorithm written out, been forward testing for months. Know some Python code, let go it!. (Was not looking forward to learning C#.)

  • @semhar1396
    @semhar1396 3 года назад

    Thanks alot

  • @efe3547
    @efe3547 4 года назад

    Is it really making money ?

    • @byronlovelace8379
      @byronlovelace8379 3 года назад +1

      No. Otherwise he wouldn't have given away the code.

    • @beansinnoodles3615
      @beansinnoodles3615 3 года назад

      @@byronlovelace8379 I tried it and bam in the span of 4 months my 100 dollars turned into 5.4 thousand dollars every day I get around 20$ profit

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

      @@beansinnoodles3615 Are you trading forex or stocks?

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

    But...can you build a Python Robot by trading, Tim?? Er..Alex.

    • @SigmaCoding
      @SigmaCoding  4 года назад +1

      I wonder who this could be.

  • @gunpoopoom2072
    @gunpoopoom2072 4 года назад

    thank you

  • @colestecyk9957
    @colestecyk9957 4 года назад

    Yaasssss

  • @PISTA-CODM
    @PISTA-CODM Год назад

    The strategies I trade is based of off candle stick and market formations and some basic calculations. No indicators apart from moving averages that serve as take profit targets. Some markets like Nas100, S&P and Dow I don't even need any MA, just plain charts and basic calculations. I don't have much time to trade cause I have other things I do to put bread on the table. But I've tested my strategies and it works fucking well. But I want to code a robot that will execute for me. How THE FUCK do I do it? I have a degree in computer science and I know how to code. But never coded something like this.

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

    This Video and ALL of the CONTENTS ARE OUT OF DATE AND CAN NOT WORK CORRECTLY.

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

    30 minutes only talking talking talking.....

  • @thirumaransinnahiah1049
    @thirumaransinnahiah1049 8 месяцев назад

    WHAT DO U KNOW ABT WHAT U ARE TALKING ITS ALL FAKE

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

    Can you take up a project to build my Stratergy as a bot? how do i contact you?