How to fix (Null) formula reference error

Help experts,

Today when I open AB, the charts and indicators are not showing with the message displayed below in the pane

ERROR: The formula file (null) referenced by this chart cannot be found

I did close AB and saved all before I exited. I put my PC on hybernation couple of times and when I open AB again the above happened.
The overall layout seems to be still there. My formulas are still in the folders. However some other files may have been corrupted. Would you please explain

  1. what went wrong?
  2. what should I do to avoid the problem in the future
  3. how do i fix the problem

Thank you very much,

Do NOT put PC into hibernation. Hibernation has issues on Windows especially when you mix it up with certain 3rd party antiviruses that mess up with file system drivers. Depending on hard drive speed and other factors data may become corrupted because not all data are written to physical media before power goes down. Use sleep or shutdown instead.

Typically either your layout file(s) are corrupted and/or broker.newcharts is corrupted.

This may happen if
a) you experienced a crash or other abrupt termination (data were not saved properly)
b) you moved AmiBroker from different machine but folder structure and/or names are different

You may try loading some other layout from “Layouts” window to see if the chart loads.

If not, then if you have a backup copy - then please restore:

  • the entire “Formulas” sub-folder
  • broker.newcharts file
  • layouts (AWL files stored in “Layouts” subfolder of your database folder).

Alternatively - just display a new price chart from the “Charts” window (double-click on Price (all in one) and close the chart panes that show the error message).

See also:

1 Like

Dear Tomasz,
Thank you for your advises. Now i know hybernation is problematic.
Thank you,