Login Page - Create Account

Support Board


Date/Time: Mon, 06 May 2024 14:09:38 +0000



Post From: Idea/Suggestion: symbol default timeframe

[2014-03-12 03:23:14]
joshtrader - Posts: 439
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.