Support Board
Date/Time: Sat, 04 Jan 2025 06:57:51 +0000
Post From: Re: Help using sc.DaysToLoadInChart
[2015-02-01 18:53:34] |
Trade Nice - Posts: 75 |
I have programmed using ACSIL so that, for example, if the program recognizes that the chart has been changed to a 5min Bar Period, the program sets sc.DaysToLoadInChart = 100, or if the program recognizes that the chart has been set to a 15min Bar Period, the program sets sc.DaysToLoadInChart = 200. I use sc.SecondsPerBar to check the Bar Period. It does work, but not as I had hoped. The problem as far as I can figure out is that changing the Bar Period causes a Reload, but the new sc.DaysToLoadInChart value (that I set in the code prior to sc.Index == 0) is after the Reload has started, and so does not affect that Reload ( it uses the Days to Load set at the time the Bar Period was changed). However, after the Reload caused by changing the Bar Period has completed, SC does recognize that the sc.DaysToLoadInChart had been changed and so SC then automatically starts another Reload which then utilizes the new sc.DaysToLoadInChart value. Is there a way to force SC to just do one Reload that uses the new sc.DaysToLoadInChart value? Perhaps a command after I set the new sc.DaysToLoadInChart that terminates that Reload and starts another Reload which would then have the correct Bar Period and sc.DaysToLoadInChart value? |