how can I reference VWAP from /ES Futures to SPX

Solution
You can't. You should be able to, and you can with other symbols, but not SPX. Probably not with any other index either.

Basically, SPX is not a tradable instrument. It may have tradable derivatives, but as an index, its just a mathematical calculation which is updated periodically. SPX has zero volume of its own. Therefore, if you enable the volume subgraph, and pull up a chart with SPX, you will be met with an error informing you that volume has been hidden.

jHMDygU.png


Further more, if you apply a script to SPX which includes the Volume() function, it will cause the script to fail. It does not matter if the volume function is a reference to a different symbol's volume, like Volume("/ES"), it will still fail. Below I've...
You can't. You should be able to, and you can with other symbols, but not SPX. Probably not with any other index either.

Basically, SPX is not a tradable instrument. It may have tradable derivatives, but as an index, its just a mathematical calculation which is updated periodically. SPX has zero volume of its own. Therefore, if you enable the volume subgraph, and pull up a chart with SPX, you will be met with an error informing you that volume has been hidden.

jHMDygU.png


Further more, if you apply a script to SPX which includes the Volume() function, it will cause the script to fail. It does not matter if the volume function is a reference to a different symbol's volume, like Volume("/ES"), it will still fail. Below I've written a simple label to display /ES's volume from another symbol. With SPX, It doesn't come up as even 0 or NaN, it just throws an error.

6xwEQZR.png


I don't understand the reasoning behind this myself, perhaps its a bug in TOS/ThinkScript...

Open Interest will fail too, if I remember correctly.

This is the culprit behind those complex options-to-chart scripts not working with SPX options.

On a side note, there are some chart providers that pretend SPX has volume by displaying the total volume of all S&P500 components, or something like that, but its fakery as far as I know.
 
Solution
You can't. You should be able to, and you can with other symbols, but not SPX. Probably not with any other index either.

Basically, SPX is not a tradable instrument. It may have tradable derivatives, but as an index, its just a mathematical calculation which is updated periodically. SPX has zero volume of its own. Therefore, if you enable the volume subgraph, and pull up a chart with SPX, you will be met with an error informing you that volume has been hidden.

jHMDygU.png


Further more, if you apply a script to SPX which includes the Volume() function, it will cause the script to fail. It does not matter if the volume function is a reference to a different symbol's volume, like Volume("/ES"), it will still fail. Below I've written a simple label to display /ES's volume from another symbol. With SPX, It doesn't come up as even 0 or NaN, it just throws an error.

6xwEQZR.png


I don't understand the reasoning behind this myself, perhaps its a bug in TOS/ThinkScript...

Open Interest will fail too, if I remember correctly.

This is the culprit behind those complex options-to-chart scripts not working with SPX options.

On a side note, there are some chart providers that pretend SPX has volume by displaying the total volume of all S&P500 components, or something like that, but its fakery as far as I know.
Actually, that's not quite correct. You actually can get volume for a different symbol, and the value is returned correctly. But you can't plot the data. You can display it in a chart bubble though. It really feels like a bug that needs to be reported.
 

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
383 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