| Coding Forum Collaborate, receive help, or discuss coding related issues. |
![]() | | Tweet | |
| | #1 | ||
![]() | A True Composite Symbol for Multicharts. 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 | ||
| |
|
| | #2 | ||
![]() | Re: A True Composite Symbol for Multicharts. Quote:
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 Last edited by Tams; 07-12-2009 at 12:57 PM. | ||
| |
|
| The Following User Says Thank You to Tams For This Useful Post: | ||
synonym (07-13-2009) | ||
| | #3 | ||
![]() | Re: A True Composite Symbol for Multicharts. Another thought does data2 .. data30 .. dataNN generate indicator updates on ticks and is there a limit on NN? | ||
| |
|
| | #4 | ||
![]() | Re: A True Composite Symbol for Multicharts. Quote:
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. | ||
| |
|
| | #5 | ||
![]() | Re: A True Composite Symbol for Multicharts. Quote:
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 | ||
| |
|
| | #6 | ||
![]() | Re: A True Composite Symbol for Multicharts. Quote:
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. | ||
| |
|
| The Following User Says Thank You to Tams For This Useful Post: | ||
synonym (07-16-2009) | ||
| | #7 | ||
![]() | Re: A True Composite Symbol for Multicharts. | ||
| |
|
| | #8 | ||
![]() | Re: A True Composite Symbol for Multicharts. Quote:
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. | ||
| |
|
| The Following User Says Thank You to Tams For This Useful Post: | ||
kh_model (08-12-2009) | ||
![]() |
| Thread Tools | |
| Display Modes | 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 |