Login Page - Create Account

Support Board


Date/Time: Fri, 29 Mar 2024 12:17:29 +0000



[User Discussion] - Creating OHLC chart of a custom index

View Count: 4745

[2013-07-20 20:39:05]
gabby alindogan - Posts: 49
Hi I am a new user of SC and was wondering if SC will enable me to create a custom index composed of about 3-5 spot fx pairs and present it in an OHLC chart.Most other systems can only draw a single line vs. an OHLC format. I've seen the documentation in your site about creating precise spread charts but that only covered 2 tickers and have a choice of diff and ratio . As you can see from my formula there are weightings involved.

Thanks in advance.



ex. ((eur/usd*2)+(eur/jpy*4)+(1/gbp/eur))/3
[2013-07-20 23:21:22]
Sawtooth - Posts: 3952
You can do this with the Spreadsheet Study study. The same-named spreadsheet study is added to each chart by entering/selecting the same name in the Spreadsheet Name field. On the main chart, chart #1 in the attached example, the spreadsheet study is checked to Display as Main Price Graph. You can hide the spreadsheet study on the other charts.

Put the attached files in your Sierra Chart \Data folder. Then go to File >> Open Chartbook >> EUR Index.cht

If you want bars instead of candlesticks, change the Draw Styles of SG7 and SG11 to Left Hash, and the Draw Styles of SG8 and SG12 to Right Hash.

If you need to invert the price of a symbol, simply add the 1 Divided by Price study to the specific chart. The inverted values will automatically populate and be used by the spreadsheet. Chart #3 has this study added as an example.





Date Time Of Last Edit: 2013-07-20 23:29:14
attachmentEUR Index.cht - Attached On 2013-07-20 23:18:47 UTC - Size: 93.46 KB - 564 views
attachmentEUR index.scwbf - Attached On 2013-07-20 23:19:14 UTC - Size: 246.26 KB - 536 views
[2013-07-21 02:30:50]
gabby alindogan - Posts: 49
Hi tomgilb. I just downloaded SC and at this point don't know what to do with the two links you gave me. Thanks for the help and I hope to be up to speed with Sc soon.
[2013-07-21 05:05:13]
Sawtooth - Posts: 3952
Hi Gabby, with both files in the \Data folder, you should be able to open the chartbook and see the spreadsheet that also opens. Where are you stuck?
[2013-07-21 11:42:07]
gabby alindogan - Posts: 49
I got them both there & when i opencharts 2 blank windows pop up which i presume are the charts,sheet combo. The window title is eurjpy not found. It might be a symbol issue since my data is from tdameritrade+sc historical. I am trying eur.gbp eur/gbp eurgbp and it is not showing up. Tda has 2 commish plans and it distinguishes them by symbols eur/usd vs. Eur/usd# to further complicate matters. I am sure it will just take trying out diff things to get it displayed. Maybe start w stox or change out my data to interative brokrs for now.

Thanks.
[2013-07-21 13:08:02]
Sawtooth - Posts: 3952
You need to change the symbol on each chart to one your broker uses, or use the data feed I used: SC Forex Data (FXCM) on the Global Settings >> Data/Trade Service Settings window.


[2013-07-22 16:56:46]
gabby alindogan - Posts: 49
well, I changed my data from TD to SCForex fxcm and am getting spot fx quotes. I am trying to open the links above w no success. i went file>open chartbook>EUR index.cht and then the title EUR index shows up on the top part of tab.All I see within the container of the tab is a grayish screen .
[2013-07-22 17:19:17]
Sierra Chart Engineering - Posts: 104368
Do you see any chart Windows listed on the CW menu?

In response to the first post, look at using the Sum Charts From List study :
http://www.sierrachart.com/index.php?l=doc/doc_TechnicalStudiesReference.html#s228

To invert the prices for a Forex pair, use this study:
http://www.sierrachart.com/index.php?l=doc/doc_TechnicalStudiesReference.html#s77

You will need to use the study on the GBPEUR chart.

To work with studies, refer to this page:
https://www.sierrachart.com/index.php?l=doc/doc_ChartStudies.html#AddingStudiestoaChart
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2013-07-22 17:19:46
[2013-07-22 18:00:11]
gabby alindogan - Posts: 49
Thanks for your reply. In the EUR Index tab, I clicked on the CW button and it said no child windows. Looks like I am going to have to start from scratch and learn SC charting from ground up instead of taking something from tom and other experienced users and trying to cut and paste it something and hope it works.Steep learning curve but prob worth it in the long run since my knowlege will be on firmer footing. Thanks again.
[2013-07-22 18:13:19]
Sierra Chart Engineering - Posts: 104368
There really should be charts in the Chartbook that was attached.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2013-07-22 18:36:27]
gabby alindogan - Posts: 49
Hi.

One thing that just occured to me assuming of course that I can get the index calculated is the timing issue of this "sum charts from list study".

Given a 1 hour intraday chart, if this study takes the hi,lo,op and cl of the 3 symbols to create a synthetic o/h/l/c bar is there a way to just get the raw SINGLE value of

((eur/usd*2)+(eur/jpy*4)+(1/gbp/eur))/3

and then create an OHLC bar off of it vs. processing the op/h/l/c separately SINCE the hi of ticker 1 may have occured at 10:05am and ticker 2 might be 10:55am.


[2013-07-22 18:41:10]
Sierra Chart Engineering - Posts: 104368
We understand what you mean, and there is no support for this with that particular study.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2013-07-22 18:41:21
[2013-07-22 18:46:53]
gabby alindogan - Posts: 49
If I take that study and apply it to a 1 min chart, it would be accurate enough. Is there any study that takes that 1 min ohlc chart and aggregate it into longer time frame i.e. 1 hour>>daily?

Is there a way to use a spreadsheet study, calculate the values there , store it is a persistent variable then pull that variable into a ohlc chart?
[2013-07-22 19:07:41]
Sawtooth - Posts: 3952
Take a look at the Study Overlay-OHLC study.

http://www.sierrachart.com/index.php?l=doc/doc_TechnicalStudiesReference.html#s149
[2013-07-22 20:14:39]
gabby alindogan - Posts: 49
Hi sierra engineers. Would tomgilb 's suggestion solve the issue I am stuck with?

i.e create chart1 with a "sum charts from list " study to calculate

((eur/usd)+(eur/jpy*.01)+(1/gbp/eur))/3 on 1 min data, then use "study overlay-ohlc " on a separate chart to aggregate 1 min raw data onto a longer timeframe OHLC chart?

tomgilb-regardless of Sc's answer I sincerely appreciate the help you've given me past days!
[2013-07-22 20:48:38]
Sawtooth - Posts: 3952
Gabby, try this:

1) Chart #1:
a) EURUSD 1 minute
b) Add Sum Charts From List study
- Set the Divisor to 3
- Put this in the List of Chart Numbers (comma separated): 1,2*0.01,3

2) Chart #2:
a) EURJPY 1 minute

3) Chart #3:
a) GBPEUR 1 minute
b) Add the 1 Divided by Price study

4) Chart #4:
a) Use any symbol, 60 minutes
b) Add the Study Overlay-OHLC study
- Set the Chart Region to 1
- Check 'Display as Main Price Graph'
- Set the 'Chart,Study,Subgraph Reference' to Chart#1, Sum Charts From List, Last(SG4)

Chart #4 will show the composite EUR index. The formula used is in the Sum Charts From List study on chart #1.

-Tom
Date Time Of Last Edit: 2013-07-24 13:19:56
[2013-07-24 04:29:11]
gabby alindogan - Posts: 49
Thanks for the help tomgilb.One thing i forgot to ask was the limit of chart objects in Sc. If i wanted to create 10 indices and each index has 10 components. Will i be allowed to have that many charts open? Using method above, a 10 component index would need 11 total charts opento chart the synthetic ticker. In the above scenario, it would need 10 *11=110 charts open. Can i group them in separate groups i.e. chartobjects?
[2013-07-24 14:51:23]
Sawtooth - Posts: 3952
There is no limit (that I know of) to the number of charts in a chartbook.

You can add multiple instances of the Sum Charts From List study to a chart so you wouldn't need 110 charts to create 10 indices. You would need 30 charts max: ten 60 min charts and a max of two 1 min charts for each of the 10 symbols to accommodate the need for the 1 Divided by Price study.

You can label each instance of the Sum Charts From List study using the Short Name field, but you'll need to keep a list of their order in the Studies to Graph list because the Short Name isn't visible when choosing from another study.



[2013-07-24 15:56:32]
gabby alindogan - Posts: 49
Hi Tomgilb. I don't quite understand the multiple instances solution so kindly clarify. Even if I create multiple instances of "sum charts from list" study, wouldn't each instance need their own chart list? If you are trying to create 1 synthetic index composed of 6 tickers and I insert 3 instances of "sum charts" in Chart 1 and assign instance 1 to sum chart 1 & 2 / instance 2 to charts 3 & 4 and instance 3 to sum charts 5 & 6. Woudn't you still need 6 charts open? Thanks.

[2013-07-24 16:39:00]
Sawtooth - Posts: 3952
Yes to both questions, but you only need one instance of the Sum Charts From List study for each synthetic index.

Each instance of the Sum Charts From List study would need its own chart list/formula, and each list/formula can include all charts used for a synthetic index.

You would need a 1 min chart open for each symbol/chart used in any list/formula (they could be minimized), and each of these charts can be referenced in more than one list/formula.
[2013-07-24 16:58:32]
gabby alindogan - Posts: 49
got it. so 10 indices with 10 components per would need about 100 1 min chart, 10 higher order charts for plotting the OHLC bar and all the 100 can be minimized. I just hope i don't bump into chart limits.

Maybe if I organize the workspace so that 1 synthetic index is in 1 chartspace so each chartspace would have 11 charts. New issue is if I go into autotrading mode, can the code cycle through the each of the 10 chartspaces and look for triggers. ie. If MA(10) of usdeur>10 then buy then go to the next chartspace... oh well cross the bridge when I come to it. Thanks.
[2013-07-24 17:09:01]
Sawtooth - Posts: 3952
I'm not sure why you need 100 1min charts since you can reference the same chart more than once.
Date Time Of Last Edit: 2013-07-24 17:38:51
[2013-07-24 19:17:53]
gabby alindogan - Posts: 49
Now I understand the confusion. If I create an index for retail composed of 10 stox, then that index will contain 10 retail stox. Index#2 might be oil so it needs a separate distinct list of stocks, etc. What I think you are saying is that if a stock is needed for index 1 and index 4, then it can be referenced twice by two separate "sum charts "study. Thanks. Now it makes sense.


[2013-07-24 19:48:37]
Sawtooth - Posts: 3952
OK, I understand. So you need 99 charts :)
[2013-08-01 13:02:27]
gabby alindogan - Posts: 49
Hi. I am creating the synthetic indices using the steps outlined by tomgilb. I have about 20 open 1m charts to capture tick data w/ lots more to go as I build up more indices. I am also exporting study results onto Excel thru "spreadsheet study". The issue is the slowness of my PC since I think excel gets recalculated every time any one of the 20 opens gets a price update. Is there a way to tell SC to refresh Excel data every x seconds instead of real-time? Thanks.

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account