Support Board
Date/Time: Sat, 23 Nov 2024 20:05:30 +0000
Post From: ACSIL - how to delete (ACSIL) user drawings when time frame is changed?
[2013-07-21 14:47:34] |
User11748 - Posts: 14 |
Hi, I am coding a study which draws (with ACSIL) many "tools" declared as user drawings. It works fine, except for the following issue. When I change the timeframe of the chart (for instance from 10m to 30m), the "old" drawings (10m) stay on the chart, and the "new" drawings (30m) are added to them. So there are 2 sets of drawings on the chart, whereas I would expect "old" drawings to be deleted. When I change again the timeframe (for instance to 60m), a third set of drawings appears. Then, if I come back to the initial timeframe (10m), it does not look the same at the beginning, since all previously drawn drawings appear together. I have already implemented "if (sc.LastCallToFunction) { ... }" to delete the drawings when the study is removed from the chart, and it works fine. However, it seems that sc.LastCallToFunction is not "called" when the user changes the timeframe. So how to programmatically delete the "old" (ACSIL) user drawings when the timeframe is changed, before "new" (ACSIL) user drawings are drawn by the study? Thanks in advance for your help! :) Nicolas Date Time Of Last Edit: 2013-07-22 08:11:29
|