How to automatically update .afl software on remote computers

We are a group of traders who want all new .afl software releases (we write our own code) updated automatically in real-time on our respective computers, i.e., all of us need to run the same code all the time.

I had such a system going many years ago and still remember remote users who got the "New Update Installed" popup window asking me how I updated their code remotely. However, this time around I am hitting a brick wall. I have been at it for a few weeks... If you have implemented such a system, I would appreciate some hints on how you have done this.

This is where we are at:

  1. Each of us has six open Charts with Indicators, trading dashboard, and other trading tools.
  2. At first install we create six new Charts and Apply all formulas directly from a shared Dropbox folder, i.e., each trader has their own Dropbox folder on their computer.
  3. I use full paths in #Include_once statements that point to the Dropbox Formula/Include folder.
  4. All formulas have a #pragma nocache at the top of the code (before the #Includes). I am aware this slows down execution a bit, but this has not been a problem.

The way I remember it is that when I upgraded a .afl program in the dropbox Amibroker would automatically reload the file and the plots would change immediately.

Right now I can't make this happen. The only way the formula refreshes is when we open the formula in the Editor and re-Apply it.

Does anyone have any suggestions on how to make this work?


Herman, I don't know what is the reason for this behaviour. I have just checked, that in my case, when I change/edit (using an external text editor) the file which is included, it is momentarily reflected in the file with the #include command, without the need to re-Apply the code (even if there is no #pragma nocache in the code) ... but both files are stored on the same SSD drive...

Thank you very much for checking that out!

Our problem is reported by several other traders.

You gave me the idea that this problem may only occur when we have 6 Charts
open, all with the same formula. Perhaps when one refreshes the other might
be saving or loading the old one - just guessing of course!

I will verify whether this problem occurs when I have a formula only open
in one Chart.


BTW, I am using 6.28.0.

I checked, it definitely does not work for me. When I Apply a formula to a
Charts and use the AB editor to edit the formula in one Chart, and Apply
it, it updates the other Chart immediately.

However, when I edit the file in the dropbox with notepad and, for example,
change the formula number in the title to 7, the formula does NOT update.

What is even weirder is that after I use Notepad to edit/save the formula
in the Dropbox, and I then open the formula with the AB Editor from the
Chart it shows me the modified formula!

This means the formula loaded into the AB Editor directly from the Chart is
not the one that is displayed. How is that possible?

The capture below shows that when I open the formula from the chart it
shows the modified formula while the Chart still shows the old formula.
At this stage when I click Apply in the AB Editor the Chart will update and
show me Formula 7. I tried this several times it always works the same way.
I tried multiple Chart and that makes no difference.

It seems that the formula in Amirboker is indeed updated when I change it
in the Dropbox but that the "display" has its own copy of the formula and
that that one is not refreshed (Refresh All doesn't do it).

I wonder why it worked for you Milosz, and not for me...


Herman, I've prepared a similar example to yours, and as you can see, when I modify the included file (using Notepad), the other file (with #include_once command) is updated at once - even with #pragma nocache commented out. But on the other hand, when I do the same with the file which is not included (the one which was applied to the chart), it needs re-Applying the code for the changes to take effect.


I've noticed, that you use #pragma nocache in the file which is included. I think this command (if necessary) should be used only in the file which includes external AFL codes.

By the way, do you apply your codes (as I do) to Blank new Charts - not linked in any way with other charts?



You can also study this thread:

On a side note, I wonder why your username changes? When I was replying to your first post you were Beaver and now you are SpinTrader ...Who am I talking to? :wink: Maybe there are two competing Hermans? One - existing in the real world and another one conquering the virtual reality? :smile::grey_question::grey_question:

1 Like

Milosz, you may have solved it!

This would be a rational explanation; in the old days, I must have been
using #Includes for all code in the formula. That would be easy to change :grin:

Reading the Help again it indeed doesn't say it refreshes code outside of
the #includes, i.e., #Pragma nocache reload applies *ONLY *to the #included
files. I quote:

1 Like

It worked Milosz, thanks so very much for your help.

Great thinking!


1 Like

Herman, I'm glad it worked for you :+1:

With regards to my previous post and it's side notes. According to your profiles' stats SpinTrader was last seen 3 days ago and Beaver 15 hours ago. So I understand that you reply by email. If that is the case, you haven't read all the content of my posts, because only the first version of the post is emailed to you, not the next - extended / changed versions. Many users change their posts after submitting - adding new information, examples etc. I do it a lot. In this way you are missing a lot from the posts :wink: For example I've seen many times how @Tomasz replies. Sometimes the initial reply (which you receive by email) consists of only 2-3 sentences and after a couple of minutes (or later) it might be 10-15 sentences which (we all agree) are definitely worth reading... Besides there are also other useful features of the forum (for example the possibility of editing your posts, giving likes, marking solved problems etc.) not accessible via email.

Yes, I know it was already discussed in this thread:

... and you explained the reasons for using email, but I'm still of the opinion that (at least in case of this forum) this approach is worth rethinking :wink:

Best regards

1 Like

Thank you, I went to the forum and I received all posts in my email that
were there. For searches and initial posts, I usually go to the forum, but
follow up is often easier by email.

WRT applying the code, yes I apply it to blank Charts initially, I have no
linked Charts.

Have a super day,