Welcome to the Traders Laboratory Forums.
Coding Forum Collaborate, receive help, or discuss coding related issues.

Reply
Old 07-12-2009, 12:07 PM   #1

Join Date: Mar 2009
Location: Manchester
Posts: 23
Ignore this user

Thanks: 8
Thanked 1 Time in 1 Post

A True Composite Symbol for Multicharts.

Hi there

I'm a real coding novice and wondered if any of you experts (or non-experts, i'm not choosey!) out there could help me.

I want to be able to create a custom symbol in order to chart the spread differential between two (or ideally 3 or more) symbols in Multicharts.

I would want to be able to weight the consistuent symbols, so for example have symbol 1 as 1.00, symbol 2 as -0.50 and symbol 3 as -0.50. I would want the function to chart the differential between those symbols as one symbol (and not as an indicator). This would then allow me to utilise all of the indicators and functionality in MC to analyse this true composite symbol.

I know i can do this myself, through merging symbol data in excel and using ASCII format to bring it in to MC, but this is messy and timeconsuming. Ideally the composite symbol would be able to import the data from whatever dataprovider i am using and picking the data up from the selected symbols via quotemanager.

Someone has created a composite symbol (CompoSymbol) indicator on the MC forum and this can chart the differential between two symbols, but it does this as an indicator and so means you cannot have other indicators/analysis based on it.

I was wondering whether,
1. Is this actually possible in MC?
2. Has anyone has already had the need for this and so already done the coding?
3. If so, would they be kind enough to share it?

Looking forward to see if anyone can help or advise.
Regards
Syn
synonym is offline  
Reply With Quote
Old 07-12-2009, 12:52 PM   #2

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,779
Ignore this user

Thanks: 2,084
Thanked 1,477 Times in 912 Posts

Re: A True Composite Symbol for Multicharts.

Quote:
Originally Posted by synonym »
...
Someone has created a composite symbol (CompoSymbol) indicator on the MC forum and this can chart the differential between two symbols, but it does this as an indicator and so means you cannot have other indicators/analysis based on it...

Syn



Andrew already given you the solution, but I don't think you understood the process.


Let me try again here, with step-by-step instruction:


Step One:

create a function named spread_d1d2 with the following code:

Code:
spread_d1d2 = c data1 - c data2;

Step Two:

In your chart (with the 2 data series), apply any indicator you want to use for your analysis.

In the "Format Study" window, enter spread_d1d2 as the Price.

I have attached the moving average study as illustration.


HTH


Attached Thumbnails
A True Composite Symbol for Multicharts.-format_study.gif  

Last edited by Tams; 07-12-2009 at 12:57 PM.
Tams is offline  
Reply With Quote
The Following User Says Thank You to Tams For This Useful Post:
synonym (07-13-2009)
Old 07-13-2009, 04:27 AM   #3

BlowFish's Avatar

Join Date: Mar 2007
Location: In Da House
Posts: 3,292
Ignore this user

Thanks: 129
Thanked 1,054 Times in 702 Posts

Re: A True Composite Symbol for Multicharts.

I wonder what the practical limit is of MC? In neoticker (which I no longer use) you could build your own indexes from the constituent components as the DAX dosent have a $TICK maybe I'll have a go at making one and seeing if MC can handle it.

Another thought does data2 .. data30 .. dataNN generate indicator updates on ticks and is there a limit on NN?
BlowFish is offline  
Reply With Quote
Old 07-13-2009, 05:08 PM   #4

Join Date: Mar 2009
Location: Manchester
Posts: 23
Ignore this user

Thanks: 8
Thanked 1 Time in 1 Post

Re: A True Composite Symbol for Multicharts.

Quote:
Originally Posted by Tams »
Andrew already given you the solution, but I don't think you understood the process.


Let me try again here, with step-by-step instruction:
Hi Tams,
that's fantastic. You're right Andrew did reply, but being a complete novice at coding i didn't realise the potential of what he was saying.

I really hope what you've mentioned works as i'd like it to. That'd be great! Don't take that as though i'm doubting you by the way. I'm just happy that you've probably solved my problem in such a simple way. I'll try it and let you know how i get on.

I assume that if i wanted to include more than two symbols in the spread, or make an equity spread where there is a partial ratio between the symbols, e.g. cdata1 - 0.70cdata2 - 0.30cdata2, i would simply include this in the code for the function. Am i right? I'm guessing i might be right in principle, but wrong in code!

Thanks again for your helpful reply.
Syn

Last edited by synonym; 07-13-2009 at 05:35 PM.
synonym is offline  
Reply With Quote
Old 07-13-2009, 05:14 PM   #5

Join Date: Mar 2009
Location: Manchester
Posts: 23
Ignore this user

Thanks: 8
Thanked 1 Time in 1 Post

Re: A True Composite Symbol for Multicharts.

Quote:
Originally Posted by BlowFish »
I wonder what the practical limit is of MC? In neoticker (which I no longer use) you could build your own indexes from the constituent components as the DAX dosent have a $TICK maybe I'll have a go at making one and seeing if MC can handle it.

Another thought does data2 .. data30 .. dataNN generate indicator updates on ticks and is there a limit on NN?
It'd be interesting to know how you get on if you do try it. It's a really useful function, as not all data providers have the groupings/sectors, etc that you might want to analyse.

I can't see why dataNN would not update on ticks, if you are charting on ticks, but then again, i am far from the best qualified person to answer that question.

Syn
synonym is offline  
Reply With Quote
Old 07-13-2009, 05:59 PM   #6

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,779
Ignore this user

Thanks: 2,084
Thanked 1,477 Times in 912 Posts

Re: A True Composite Symbol for Multicharts.

Quote:
Originally Posted by synonym »
...
I assume that if i wanted to include more than two symbols in the spread, or make an equity spread where there is a partial ratio between the symbols, e.g. cdata1 - 0.70cdata2 - 0.30cdata2, i would simply include this in the code for the function. Am i right? I'm guessing i might be right in principle, but wrong in code!

Thanks again for your helpful reply.
Syn


YUP... you've got it.

It is as simple as that !!!


close data1 - 0.70 * close data2 - 0.30 * close data3


note: * is the multiplication sign.





p.s. use brackets to group items together for easier identification:

close data1 - ( 0.70 * close data2 ) - ( 0.30 * close data3)


.

Last edited by Tams; 07-13-2009 at 06:11 PM.
Tams is offline  
Reply With Quote
The Following User Says Thank You to Tams For This Useful Post:
synonym (07-16-2009)
Old 07-14-2009, 07:05 AM   #7

BlowFish's Avatar

Join Date: Mar 2007
Location: In Da House
Posts: 3,292
Ignore this user

Thanks: 129
Thanked 1,054 Times in 702 Posts

Re: A True Composite Symbol for Multicharts.

Tams do you happen to know if a new print on data2 will generate an indicator update and do you happen to know how you check which data stream generated the update if it does?
BlowFish is offline  
Reply With Quote
Old 07-14-2009, 08:40 AM   #8

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,779
Ignore this user

Thanks: 2,084
Thanked 1,477 Times in 912 Posts

Re: A True Composite Symbol for Multicharts.

Quote:
Originally Posted by BlowFish »
Tams do you happen to know if a new print on data2 will generate an indicator update and do you happen to know how you check which data stream generated the update if it does?

MultiCharts technical support had posted an explanation at their site. (I will try to look for the post.)
Basically any new tick will generate a marker that something has changed, and MultiCharts will update all the dependent calculations and plot the chart accordingly.
Tams is offline  
Reply With Quote
The Following User Says Thank You to Tams For This Useful Post:
kh_model (08-12-2009)

Reply

Thread Tools
Display Modes Help Others By Rating This Thread
Help Others By Rating This Thread:


Similar Threads
Thread Thread Starter Forum Replies Last Post
Average True Range (ATR) brownsfan019 Technical Analysis 21 01-16-2012 02:31 PM
Symbol for Esm in IB cowcool E-mini Futures Trading Laboratory 5 04-17-2009 02:50 PM
SPY Daily Composite gassah Market Profile 36 04-26-2008 09:41 PM
Symbol Settings ImXotep Brokers and Data Feeds 1 05-04-2007 06:05 PM
@ES.D symbol in ASCII format ImXotep Stock Trading Laboratory 0 04-09-2007 03:36 PM

All times are GMT -4. The time now is 09:53 AM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.