NexusFi: Find Your Edge


Home Menu

 





Feasibility to create alerts in TWS (IB) Charts using APIs


Discussion in Traders Hideout

Updated
    1. trending_up 2,584 views
    2. thumb_up 3 thanks given
    3. group 3 followers
    1. forum 15 posts
    2. attach_file 0 attachments




 
Search this Thread

Feasibility to create alerts in TWS (IB) Charts using APIs

  #1 (permalink)
 kadm 
Sydney, Australia
 
Experience: Advanced
Platform: IB TWS
Trading: Futures
Posts: 15 since Oct 2021
Thanks Given: 13
Thanks Received: 6

Hi Fellow Traders - I want to create Alert in TWS Charts (Interactive Brokers) at a price point as defined in an Excel Sheet using APIs. Eg. Get an alert created in TWS Charts for ES at price point of 3980 mentioned in Excel Sheet. This way I would be able to create alerts in an automated fashion rather than manually putting the alerts. I do not have any knowledge on Python OR API's but I am happy to go through learning curve to achieve this end objective. But before I take this journey, I want to seek guidance from you if it is technically feasible for creating alerts within charts using APIs. Thanks heaps.

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Futures True Range Report
The Elite Circle
Are there any eval firms that allow you to sink to your …
Traders Hideout
NexusFi Journal Challenge - April 2024
Feedback and Announcements
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
39 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
The Program
18 thanks
GFIs1 1 DAX trade per day journal
18 thanks
  #2 (permalink)
 ZB23 
Atlanta Metro Area
 
Experience: Intermediate
Platform: Rithmic API
Broker: Ironbeam
Trading: Futures: CL spreads, IR outright.
Frequency: Never
Duration: Never
Posts: 144 since Feb 2017
Thanks Given: 60
Thanks Received: 193

With knowledge of one of the major programming languages, this is just not feasible. Ditch Excel, and pick a language to learn. I would recommend Python.

I say this, as someone, who was in your shoes, back in June 2021. My progression was as follows:

1. Learn Python. I started learning Python one year before I even thought about trading using IBAPI.

2. Learn IB's Python API. IB's documentation is meaningless unless you have a deep understanding of Python.

I started off by reading Michael Scarpino's book on the topic. I found it to be a bit dense. Nevertheless, I gave the Python section an initial read. And didn't return to the book.

After that, found two excellent courses on Udemy offered by Mayank Rasu. You need to get both courses (the beginner and advanced). Further, wait for a Udemy sale before purchasing.

Those two steps should be sufficient for now, and should keep you busy for approximately 4 to 9 months.

Reply With Quote
  #3 (permalink)
 kadm 
Sydney, Australia
 
Experience: Advanced
Platform: IB TWS
Trading: Futures
Posts: 15 since Oct 2021
Thanks Given: 13
Thanks Received: 6


Thanks for sharing your journey and thoughts as well as guiding on the path to be followed. My initial objective was to use Python to create the alerts in charts, but as it is technically not feasible, I am unsure what benefits would be there for me to learn Python language. Setting some objectives or achievement target from learning of Python would be useful. If you don't mind, can I ask you where all and functionalities you use from accessing IB's API using Python? This will broaden my thoughts and help. Thanks again.

Started this thread Reply With Quote
  #4 (permalink)
OccamsRazorTrader
Fort Myers Florida/USA
 
Posts: 70 since May 2020
Thanks Given: 43
Thanks Received: 66


kadm View Post
Hi Fellow Traders - I want to create Alert in TWS Charts (Interactive Brokers) at a price point as defined in an Excel Sheet using APIs. Eg. Get an alert created in TWS Charts for ES at price point of 3980 mentioned in Excel Sheet. This way I would be able to create alerts in an automated fashion rather than manually putting the alerts. I do not have any knowledge on Python OR API's but I am happy to go through learning curve to achieve this end objective. But before I take this journey, I want to seek guidance from you if it is technically feasible for creating alerts within charts using APIs. Thanks heaps.

Manually creating alerts on TWS is incredibly clunky ... That being said- I hired a programmer to write an API for me- he wasn't a finance guy- so learning terms was a hurdle-but in the end- it worked- the system wasn't overly complicated, but the coding of the API was pretty intense.

I think an API for alerts could be just as complicated I'm afraid ...

Reply With Quote
  #5 (permalink)
 kadm 
Sydney, Australia
 
Experience: Advanced
Platform: IB TWS
Trading: Futures
Posts: 15 since Oct 2021
Thanks Given: 13
Thanks Received: 6

Thanks for sharing your thoughts. As also mentioned by "BA 21" chart alerting would not be feasible in IB TWS, so will not pursue this further. On your mention of getting API written - if you don't mind can you please explain the functionality for which you had got the API programmed? I am trying to set some objective for me so that I can pursue learning of Python language. Thanks.

Started this thread Reply With Quote
  #6 (permalink)
OccamsRazorTrader
Fort Myers Florida/USA
 
Posts: 70 since May 2020
Thanks Given: 43
Thanks Received: 66


kadm View Post
Thanks for sharing your thoughts. As also mentioned by "BA 21" chart alerting would not be feasible in IB TWS, so will not pursue this further. On your mention of getting API written - if you don't mind can you please explain the functionality for which you had got the API programmed? I am trying to set some objective for me so that I can pursue learning of Python language. Thanks.

Sure, my API- actually analyzed data and automatically placed buy and sell stop orders above and below a level that was computed based on that past data. It was written in C# and functionality was good but I abandoned the strategy, the strategy may have actually worked but I abandoned it a few years ago as I went in a different direction. My programmer was very competent and has gone on to work for Google, but as I said it was quite a challenge getting him to understand what I wanted and then getting it coded to do exactly what I wanted ...

Reply With Quote
Thanked by:
  #7 (permalink)
 ZB23 
Atlanta Metro Area
 
Experience: Intermediate
Platform: Rithmic API
Broker: Ironbeam
Trading: Futures: CL spreads, IR outright.
Frequency: Never
Duration: Never
Posts: 144 since Feb 2017
Thanks Given: 60
Thanks Received: 193


kadm View Post
Thanks for sharing your journey and thoughts as well as guiding on the path to be followed. My initial objective was to use Python to create the alerts in charts, but as it is technically not feasible, I am unsure what benefits would be there for me to learn Python language. Setting some objectives or achievement target from learning of Python would be useful. If you don't mind, can I ask you where all and functionalities you use from accessing IB's API using Python? This will broaden my thoughts and help. Thanks again.

Most of the functionality I use is outside of IB's API. As far as signal generation, I use Python's Pandas library to process price data. For technical indicators, I use Python's TALib.

The functionality I use from IB API is to retrieve data and to enter and exit trades. Since I trade different futures contracts against each other, I find it better to use IB API to leg into and out of trades instead of legging manually.

I only use TWS as a conduit, because due to it clunky architecture, I have to open TWS and have it running to enable my Python client to place trades.

In my opinion, and despite its clunky architecture, I find that IB API offers me the greatest amount of flexibility when it comes to creating and executing trading strategies. For example, I find that Python tools (ADF and Johansen tests) to determine whether price action is ranging or trending to be far superior than traditional technical analysis tools such as ADX.

Again, IB API has a notoriously steep learning curve. Whenever I am pulled away from trading for a couple of months (I still have a 9-to-5, and am subject to layoffs), I find myself needing a refresher.

In my opinion, I think you should invest the time to learn Python and IB API. At first, I was reluctant to learn the two. But there aren't any other platforms that offers the flexibility I want to pairs trade (pairs, butterflies, and double butterflies) futures.

PS: Another option is to get familiar with Matplotlib and create alerts on a Python chart vs plotting them on TWS' charts.

Reply With Quote
  #8 (permalink)
 kadm 
Sydney, Australia
 
Experience: Advanced
Platform: IB TWS
Trading: Futures
Posts: 15 since Oct 2021
Thanks Given: 13
Thanks Received: 6

Thanks "BA 21" for the detailed explanation. I have heard of some of the terms used for the first time, presumably because of lack of knowledge of Python. I would plan to get into it slowly as I am also in similar boat of working 9 to 5 and then I use the balance hours to do some trading which leaves very small window. But if I need to do things better, I would need to become smarter. Thanks again.

Started this thread Reply With Quote
  #9 (permalink)
 ZB23 
Atlanta Metro Area
 
Experience: Intermediate
Platform: Rithmic API
Broker: Ironbeam
Trading: Futures: CL spreads, IR outright.
Frequency: Never
Duration: Never
Posts: 144 since Feb 2017
Thanks Given: 60
Thanks Received: 193


kadm View Post
Thanks "BA 21" for the detailed explanation. I have heard of some of the terms used for the first time, presumably because of lack of knowledge of Python. I would plan to get into it slowly as I am also in similar boat of working 9 to 5 and then I use the balance hours to do some trading which leaves very small window. But if I need to do things better, I would need to become smarter. Thanks again.

A 9-to-5 can be an impediment. Last August, I took a year off from work to develop my skills. Over the past year, I enrolled in a three month data science boot camp, because data science tools can help with trading. After the data science boot camp, I enrolled in a six month algo trading course. Both courses were Python-intensive; hence, I also got an opportunity to sharpen my Python skills.

Now, it time to start looking for a job.

I have learned a lot in the past year. Sometimes, you have take several steps back to proceed forward.

Reply With Quote
Thanked by:
  #10 (permalink)
OccamsRazorTrader
Fort Myers Florida/USA
 
Posts: 70 since May 2020
Thanks Given: 43
Thanks Received: 66



BA 21 View Post
With knowledge of one of the major programming languages, this is just not feasible. Ditch Excel, and pick a language to learn. I would recommend Python.

I say this, as someone, who was in your shoes, back in June 2021. My progression was as follows:

1. Learn Python. I started learning Python one year before I even thought about trading using IBAPI.

2. Learn IB's Python API. IB's documentation is meaningless unless you have a deep understanding of Python.

I started off by reading Michael Scarpino's book on the topic. I found it to be a bit dense. Nevertheless, I gave the Python section an initial read. And didn't return to the book.

After that, found two excellent courses on Udemy offered by Mayank Rasu. You need to get both courses (the beginner and advanced). Further, wait for a Udemy sale before purchasing.

Those two steps should be sufficient for now, and should keep you busy for approximately 4 to 9 months.

Is this the book where you got started ............
Algorithmic Trading with Interactive Brokers (Python and C++) Kindle Edition
by Matthew Scarpino ?

Reply With Quote




Last Updated on August 8, 2022


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts