Save the database

Hello,
How to force/access to Save the database from plugin. I have notice that it is not possible when changed are made only on last bar. It is possible also when I plot e.g. a line or change the position of that line.
Best regards for TJ :slight_smile:

Data that are present in RAM and are marked as "dirty" (modified) are saved automatically when closing the program or changing the database and you don't need to do anything. AmiBroker will ask about saving data when it is exited/closed. Plugin can make symbol as dirty by sending WM_USER_STREAMING_UPDATE with appropriate content of WPARAM and LPARAM. There are several threads on this forum that explain how to do that (with code) there are code examples in the ADK as well. Use search.

Thx. I used
RecentInfo.Status = RecentInfoStatus.BarsReady;
and
SendMessage(hMainWnd, WmUserStreamingUpdateMsg, new IntPtr(ptr->name), recentInfoPtr);

It looks like it's working :slight_smile: