Big problem: why my entire template was reset accidentally?

Big Problem, Why My entire chart templates were totally reset from my parameter set to the default setting such as StyleTick, Parameter value accidentally?
Last time I involve in AB in order to just write AFL script for my testing a little bit and close it correctly without odd configuration setting.
The below show that everything was reset to the default values accidentally.

However, the below is my actual configuration.

What is the problem for me in such a case?

Thank you.

The important thing , I installed Meta4(MT4) program at the time while opening Amibroker I am not sure whether it is related to this issue or not.

I am really concerned about this problem , no sooner or later if the problem occurs again then I will suffer to have to set them over and over again unconditionally.
Please kindly clarify what root cause to raise this bug as well as how to fix it.

@technqvi "big problem" IMHO seems a bit an overstatement. :smile:

Since it happened once, I would rather call it a small annoyance.

Unfortunately, I do not know the reason, and if you are not able to reproduce it regularly, I think it will be difficult to understand why it happened.

Anyway, there is something you can do to minimize the risk: after you have experimented, as much as you like, with the available parameters when you are finally visually satisfied with your choices, hard-code them in your formula as the "default" values of the various "Param" functions calls.

In that way, even if you change them later (accidentally or on purpose), you can always use the Parameter Dialog "Reset All" button to restore them to the your "best" settings.
(Do it on your own formulas, not on the original ones that come with the installation).

In addition to that, you can always save the entire template and restore it later.

1 Like

You can mark your AFL /Template as “Read Only” and your AFL will not be modified.


Yesterday, I fall back to set both parameter value, color again my to all template as my need.
and close AB and shut down laptop respectively.

Today I came back to the default value in every template again. I suspect that I may set some configurations mostly likely it may be AFL /Template as “Read Only” mistakenly.

Something in preference may be incorrect.


Is it possible for me to reinstall program ?

Yesterday, I fall back to set both parameter value, color again to all template as my need.
and close AB and shut down laptop respectively.

Today, It came back to the default value in every template again. I suspect that I may set some configurations in preference menu , probably it may be AFL /Template as “Read Only” setting mistakenly.
I don't know which menu to set AFL /Template as “Read Only.

@technqvi I don't know what is the reason of your problem, but as suggested above, hard-coding your custom values as Parameters' defaults is the only 100% save solution - working in all circumstances. There are two things that crossed my mind:

  1. Maybe you are opening new charts using File --> New —> New Default Chart instead of New Blank Chart or New Blank Pane ?

A quote from:

Chart parameters are keyed by Chart ID so two different charts may have same names of parameters, yet parameters are independent if those charts have different ChartID.

If Chart ID is the same for both charts – then it is essentially the very same chart. It means that all the hand-drawn studies and parameters are common for both charts (changes in one chart pane will affect the other) and all the drag&drop operations or formula changes affect both charts – that is because as a result of dragging and dropping indicators the underlying code is being modified (new sections are added). Such relationship between chart panes will happen when we open another chart window that uses the same chart template as the previous window (e.g. using File->New->Default Chart) or save chart template and load it from the other window.

… or you have used Insert Linked option from the Charts window (which creates a new chart pane directly linked to some other formula)?

See if the Parameters are saved and retrieved properly (after AB restart) in a New Blank Chart with some simple indicators like Price + MA().

By the way, layouts can even hold individual parameter values for different symbols:

  1. There is a chance, that your antivirus prevents some of your files from being saved/updated etc. You should exclude AB folder from AV scans.


Once you have all your AFL parameters set make the AFL a READ-ONLY file.

Find the AFL you don't want the settings to change - RIGHT CLICK on the [AFL] select [Properties] than click the [Read Only] checkbox than hit [Apply]

The [Read Only] setting is part of the Operating System NOT an Amibroker setting.



Skate, I agree that in general it might be useful in some circumstances, but as I understand in this case, the problem is that the current state of Parameters is not kept and they are reset to default each time AB is restarted. Marking AFL Read Only might not help, because AFL files don't store current (not default) Parameters' values. They are kept in one of those files (probably broker.params):

If @technqvi hard-codes (changes) the default Parameters according to his needs and saves such template (it all can be done in a few minutes) and after that decides to additionally change AFL's parameters to Read Only (which probably should be done only in some special cases) - that's another story :wink:



Accidentally changing an AFL code whilst learning is a very common & confusing issue for beginners and as @technqvi is on that journey it was a suggestion to overcome a newbie issue.

A combination of making your AFL template 'Read Only' and then saving your AFL as an .apx file has saved me on many occasions.

Articulating an issue clearly is difficult for some that generates a variety of solutions - my suggestion was a simple one, whereas your solutions are always on the money and extremely appreciated.


1 Like

My problem was fixed by excluding AB path from Antivirus (window defender).

1 Like