Support Board
Date/Time: Sat, 23 Nov 2024 14:11:42 +0000
sc.TicksPerBar and reversion to default chart settings....
View Count: 1648
[2013-07-07 00:56:18] |
maxpi - Posts: 181 |
I have chart A doing some calculations the results of which are displayed on Chart B. Chart B starts off as a "number of trades per bar" type of chart. The script running on Chart B uses the command "sc.TicksPerBar" to modify it's own bar interval at times. It works fine in replay with the exception that when I stop the replay Chart B reverts to a 1 minute setting. I never use any minute settings at all, it seems to be reverting to the default settings for a chart.
|
[2013-07-07 03:42:26] |
Sierra Chart Engineering - Posts: 104368 |
The only reason, other than your own code, this would happen is that the chart is being referenced by another chart. Refer to this help topic: http://www.sierrachart.com/index.php?l=doc/helpdetails18.html 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-08 23:04:47
|
[2013-07-07 04:51:37] |
maxpi - Posts: 181 |
That doesn't seem to apply. I looked for the "RefBy: #" and it's not there. I just have one study running on Chart B that gets info from Chart A via "sc.GetStudyArrayFromChartUsingID". Chart A has just one study running on it that doesn't refer to any other chart. I put the following code in the study on Chart B: if(sc.Index == 0) sc.TicksPerBar = 100; Now when I hit the stop button on the replay window the chart stays as a tick chart. This is a good work-around for me. |
[2013-07-07 18:28:44] |
maxpi - Posts: 181 |
The reversion to minute bars doesn't occur if I let a replay finish on it's own. It occurs when I hit the "Stop" button...
|
[2013-07-08 00:34:05] |
maxpi - Posts: 181 |
I wrote more of the software, am running backtests in the Accurate Trading System Back Test Mode for the two charts and I can see the chart interval changing to 1min and then to n ticks and back to 1min. I'm never telling it to do anything but change the bar interval of the tick chart, never telling it to change to minute bars. I see the same effect when running the Standard Replay.
|
[2013-07-08 04:52:17] |
maxpi - Posts: 181 |
OK, sorry to bother, I had an underflow condition in one of the scripts... accessing sc.Low and sc.High with negative index values.. I'm all better now...
|
To post a message in this thread, you need to log in with your Sierra Chart account: