Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free

Genuine reviews from real traders, not fake reviews from stealth vendors

Quality education from leading professional traders

We are a friendly, helpful, and positive community

We do not tolerate rude behavior, trolling, or vendors advertising in posts

We are here to help, just let us know what you need

You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

Does anyone know if there is a way to create a formula similar to a Ratio Chart that would combine two or more symbols but allow each symbol to have a different "weighting" for each? Ratio charts are usually fixed at a 1 to 1 ratio.

For example if I plan on buying 10 lots of January CL and 5 lots of February CL is there a way to chart this weighting so that the two symbols are merged into one ratio chart where the relative sizing of each symbol is taken into account where the January CL is stronger than the February CL?

Any help is greatly appreciated.

Can you help answer these questions from other members on NexusFi?

I do not know which platform you are on, but in Investor/RT you would do this by setting up a custom instrument with the multiplier you need. https://www.linnsoft.com/custom-instruments

The platform that gives the most freedom in constructing your own spreads, not limited to just 2 parts, is TradingView, where you'd simply type in "CL1!*10 - CL2!*5" as your symbol. This functionality, however, requires Pro+ subscription.

Mathematically you could get a weighted spread plot by either multiplying or dividing the closing price by the number contracts (multiplication would give the larger contract size more weight). You would then subtract the larger one from the smaller one. i.e.
(close*10_contracts) - (close*5_contracts)
or (close/5_contract) - (close/10_contracts)

Thank you all so much for your help. Greatly appreciated! Btw, I'm using Sierra Chart custom symbol feature that creates custom symbols with formulas. Also using Interactive Brokers for data since they have historical midpoint data which is necessary for charting accurate spreads. They're the only place I know of to get historical midpoint data.

Two additional questions.

1. Can I also use this formula for more than two instruments? For example would (close*10_contracts) - (close*5_contracts) - (close*2_contracts) work as well for a 3 legged plot of three weighted instruments?

2. Rather than creating a spread/difference, if I would like to instead combine/merge two symbols into one weighted symbol that takes into account the weighting of each, would I just simply use a + sign instead of a - sign?

Not familiar with Sierra Chart and not sure if I understand #1. You could end up with a zero or negative value, if you keep subtracting. For instance, if you have 10 - 6 - 5 the result is less than zero. While this is common (take momentum for instance "close - close[30]"), it may not work for your purpose.

For #2. Sounds like you want a weighted average. i.e.
((close*10_contracts) + (close*5_contracts) + (close*2_contracts)) / 3
This would merge all the values into one average giving more weight to the larger orders.

Thank you so much Afriend247, once again much appreciated! I realize now that the weighted average you mentioned is actually what I was looking for instead of a weighted spread value. My intention was to create a plot that combined multiple instruments into one plot that takes into account the relative values of each by weighting each of them, so it should be averaged, not subtracted. I don't know why I didn't realize this earlier...