Login Page - Create Account

Support Board


Date/Time: Mon, 25 Nov 2024 20:34:17 +0000



Idea/Suggestion: symbol default timeframe

View Count: 1205

[2014-03-10 15:35:29]
joshtrader - Posts: 488
When using a volume/tick/range chart, a change of symbol does not work nicely since the volume/range will vary greatly between products. A 50,000 volume chart of SPY looks very different from a 50,000 volume chart of ES futures, for example.

So, one idea would be to have several fields for each symbol that specify a default timeframe. It could be called "Preferred Timeframe 1" (and 2, 3, etc.) for example. It could be in minutes, range, volume, or anything else. Then have the chart reference either a normal timeframe (such as 0-5-0 time, 1500V, 8r, or anything else) or the symbol's Preferred Timeframe 2, for example.

I'm sure you have a lot on your plate, but perhaps there is enough interest to consider this at some point.
[2014-03-11 12:51:01]
joshtrader - Posts: 488
Actually I guess it's possible to do this with ACSIL. I don't have some of my own code samples in front of me at the moment but I can set the bar period using code, and all I need to do is write into the code an array of symbols and preferred bar periods and change the period based on the symbol when it's changed for the chart.
[2014-03-11 17:02:14]
vegasfoster - Posts: 444
I could very well be wrong, but I think the problem you will have is if you try to change to another time frame it would revert back to the preset time frame, e.g. change to symbol and time period changes, try to change to a different time period, chart refreshes and runs the code again and goes back to the original time period.

I have similar ideas that I can't execute for this reason, if you or anyone else knows how to address this, I would appreciate any ideas. Thanks.
Date Time Of Last Edit: 2014-03-11 17:05:02
[2014-03-12 00:57:27]
joshtrader - Posts: 488
vegasfoster, I think the most straightforward way around this is a study option to disable the auto-switching. I've coded some custom menu items in SC that are displayed with a right-click, and you can select/deselect an item that sets a flag which suspends the auto-switching. I think this would work. In fact, you could have menu items as such:

- Custom TF 1
- Custom TF 2
- Custom TF 3
- Disable TF

and select whichever you like. My idea was to have a longer term volume chart (for ES, maybe 80K), medium term (5K), and short term (800K), and to select whichever you like. I already use these but when switching instruments it obviously throws things off. If I'm feeling adventurous tonight I may trip to whip something up and will send to you if you are interested.

I already have custom timeframes on a menu but there would be a lot if you wanted it for a variety of instruments. Having a list for each instrument would be a much quicker way to do it without having to switch manually.
Date Time Of Last Edit: 2014-03-12 01:03:33
[2014-03-12 03:23:14]
joshtrader - Posts: 488
OK so I coded this roughly, and it works.

My question for SC engineering is the following. My code enclosed in an "if (sc.Index == 0)" block sets the timeframe using sc.VolumePerBar = XYZ. However, when I change the symbol, the symbol changes and it seems the new bars for the new symbol are created, and then all studies are run. This greatly slows down the loading for two reasons: one is that if I am using a very small timeframe chart (like a 500V) and switch to a symbol like SPY which has millions of volume per day, the chart is slow to load, as it is trying to load 500V bars, even though my intention is to immediately switch to a much larger timeframe. And second, even after the new data is loaded, you can see the chart refresh again because of the new timeframe change which occurs on the first bar calculation of the study.

So in short--is there a way to give a new symbol a timeframe more quickly? As in, have the study calculate before anything else happens? I somehow doubt it, but just asking.
[2014-03-12 04:02:51]
ejtrader - Posts: 688
Josh - How about including an additional condition to validate the existing timeframe?

Pseudo code:
if(sc.Index ==0 && not required timeframe ) settimeframe?

Date Time Of Last Edit: 2014-03-12 04:33:38
[2014-03-12 05:04:58]
joshtrader - Posts: 488
ejtrader, thanks--I am already doing this. When I change symbols, it will have to change the timeframe anyway--but after the initial change, it will never try to change it again for any reason unless I change symbols again.

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

Login

Login Page - Create Account