How to set chartid for AmiBroker analysis window

How to set chartid for AmiBroker analysis window?

I am using 2 AFLs in their corresponding scanners. There are some common parameters and variables in these two AFLs. When I open second scanner and assign 2nd AFL to it, by default Amibroker takes the values from first AFL for the variables/parameters which are common. I don't want it to happen that way. How do I ensure that the default values are automatically picked up based on assigned AFL.

Thanks in advance.

Unlike Charts, all Analysis windows have ChartID equal to Zero so you cannot set it yet.
To use Params, read the above post (or topic) and understand the relationship of parameterised variables or use a unique naming convention for each one.

Superb Travick! Thanks You so much for quick reply and giving clear understanding.

Another query is kind of related...we are using variables starttime and endtime to define in what timewindow buy/sell should be generated. These variable names are same in all AFLs. Whenever, we use these different AFLs and set them in different charts (not analysis) , we found that it still use starttime and endtime from other chart (afl). How do we restrict that?

Additional info - In some AFLs, instead of having variable we have starttime and endtime as parameters instead of being variables. When such AFLs are used in combination with above case could that become cause for such errors? I am probably overwhelmed with all AFL things right now. So excuse me if I am making any basic mistakes.

You have to make sure that the ChartID is unique to each chart. If you have loaded the same template in different chart window, then you may have duplicated by the use of same template.

Chart properties > Axes & Grid > Chart ID this is an easy way to check.
If you are not sure, then create each Chart afresh, by using File > New chart & New Panes and ensure that you don't duplicate Chart IDs.

1 Like

Once again THANK YOU Travick! I am good with this information. I will let you know if this doesn't resolve.

See Knowledge Base