Landing charts, different intervals but the same indicator values, why?

Hello, can someone help me. When I link two charts of the same company but with different intervals, e.g. daily and weekly, I cannot set indicators with different parameters. As in the daily chart I will set MA 50 and on the weekly MA 10, it also changes to MA 50 on the weekly chart.

best regards

Yeah, you know, when I decided a few months ago to start using Amibroker as my real-time trading platform, I encountered the same thing. I'm sure it's answered in the documentation in some 1 or 2 sentence passage on the correct steps to take, but I didn't do that. So here's how I resolved it:

When I create a new chart, I start with a blank chart. Then, I bring up the main formula (could include a lot of other AFL #incude files) in the formula editor. Then, I apply the formula (with the Apply toolbar button) to the chart. Also, at the top of my main formula, I have this line:

#pragma enable_static_decl "myprefx{chartid}"

With this, I know that no other chart will use the static variables that all of my main and sub formula files are referencing UNLESS I explicitly access them by their mangled name (i.e. the static variables are actually GLOBAL SCOPE to ALL of the charts you have up, but those other charts see the static variable name that the #pragma "mangles" the simple name to. ONLY the originating chart sees the simple static name to be used as a reference (obviously) while the others see the full, true name (what I call the mangled name).

I'm happy. I don't have the problem you're experiencing that I also experienced and I don't care if there's another way. I have more important things to do...like make money from real-time trading.

On a side note, one thing which should impress you about Amibroker the more you work with it after coming from other charting packages is this:

For what AFL is (a dynamic scripting language), it is SUPER FAST. Tomasz has optimized the heck out of everything that is in its trading library as well as the assembly code it generates. That's what you get when you have a super smart person working on the same software since 1995 and not having other developers dilute his efforts.

As noted already, you need to start with BLANK CHART so parameters are independent.
Please read this KB article that explains when and how parameters can be independent and when they are shared:

1 Like

Thanks for answers and hints SteveH and Tomasz. That's how I found this article, which Tomek is writing about and it works. The indicators have different values on the weekly and daily charts. Can it now be done to draw on two charts at the same time, but the indicators had different values? eg when I move the "crosshair" over the daily chart, it should also move at the same time over the combined weekly chart and the same with drawing fibo or other lines. Is it also covered in this article? My English is poor and maybe I did not understand something and the Google translator sometimes translates differently than it is written.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.