Exporting ToS data to Excel using the RTD Function.

craigjjmorrison

New member
I track my portfolio in Excel with the RTD Function, however, ETFs do not seem to be recognized by the function. Any suggestions? I apologize if this question is outside the scope of this forum. I searched and found references to Excel but the search feature sent me to google for ETFs which I had already tried. I'd rather not fiddle with TOS's API if avoidable.
 
I have been utilizing the RTD (Real Time Data) function to import data into Excel.

No issues then using the values until I started with financials (10-yr T-Notes, 30 Yr Bonds, etc.) I do not have any issues importing the values into excel.
Here is an example of the function I would be using in Excel =RTD("tos.rtd",,"LAST", "/ZN:XCBT"). The function works and it pulls in the "Last" price for the 10-Yr T-Note. However, where I am struggling is the number format it's providing. For example, 122'075. Within Excel it behaves like text but NONE of the Excel functions to convert text to number or values works. I am always left with the following: #VALUE!. I realize this is as much an Excel related question as it is TOS. But has anybody experienced this previously and did you discover an approach to convert values from the following format 122'075 to 122.075?

Important Note: I can pull other data that is related to CBOT, Wheat, Corn, etc. and the formats are fine. This is only related to Financials.

Thanks for any advice you can provide.

in the previous post, i hard coded in the decimal character, as a single quote

this version lets the user type it in, in A4
type in a single quote (apostrophe)
, then the desired character

same, method as before
in excel,
do a CONTROL ~ (control tilde) . this shows formulas.
copy this code
paste it in excel at A1
do a CONTROL ~ , to restore normal view, values


Code:
        =RTD("tos.rtd",,"LAST", "/ZN:XCBT")
=RTD("tos.rtd",,"LAST", "/ZN:XCBT")        price as text,  RTD( )
=LEN(A2)        length data text
'        point    2 - hyphens. 1st for text, 2nd is desired char
=SEARCH(A4,A2,1)        decimal location
=A3-A5        right char len
        
=LEFT(A2,A5-1)        left digits
=MID(A2,A5+1,A6)        right digits
.        decimal point
        
=VALUE(A8&A10&A9)        price converted to number
1        some number
=A12*A13        number x price
        
        
original formula       
=SEARCH("'",A2,1)       
=SEARCH("'",A2,1)


what it should look like
g7NRtZv.jpg
 
Last edited:
Hello

I created a custom column for the only reason to get the value in Excel. There I added the formula; =RTD("tos.rtd", , "CUSTOM12", "/ES:XCME")

It works only if a watchlist on TOS is open which contains the symbol (in this case /ES) and the custom column. Is there a way to get it work without the need to have a watchlist open? Actually the formula refers to the custom column and the ticker symbol. So why it needs to have a watchlist open?

When I switch from the Market Watch / Watchlist tab back to the Monitor tab, the excel cell won't update it anymore.
 
Last edited:
Why is it so difficult to pull minute OHLC from TOS to excel? I am by no means 1/10 as smart as the majority of coders on here however it seems very doable. Is it really that extensive to the point i have to teach myself python and pull data from a different platform that allows 1min info to be exported? Please go easy with explanation! I am green to code and script, a slow learner but extremely persistent. Thank you very much for reading and or responding!
 

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
466 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top