Save drawing tools to external file

I would like to have a save/restore feature that will save all the drawing tools that have been drawn on the chart for the symbol into an external file.

Every weekend I do a quote cleanup of my database to get rid of price spikes and intraday quotes etc. Then I would use the Import ascii "$OVERWRITE 1" command to rewrite the symbol file in the database. For example, I overwrite the clean quotes to a new MSFT file in the M directory.

The problem is that I lose all the study tools like trend lines in the chart. I know that all of the drawing tool information is in the MSFT file. It takes a long time to redo them every time I clean the database.

Any suggestions?

A feature like this would also be useful when you want to transfer the drawn trendlines from your desktop Amibroker to the laptop.

This is WRONG practice that you came up for no reason.

You don't need to "cleanup" anything and you don't need to use $OVERWRITE 1.

If you run ASCII import NORMALLY, without any $OVERWRITE it will anyway re-import the data and replace existing records with ones that you import and it will NOT wipe any drawings.

So just don't delete anything and import normally.

To transfer to other laptop, just copy entire database directory, plus formulas plus broker.newcharts file.

It is all explained in the KB:

Ok, thanks Tomasz, I will try that.

Tomasz, I'm so sorry for the confusion. I revisited my code and it wasn't $OVERWRITE 1, it was $TICKMODE 1.

I clean up the quotes, then replace the quotes back into the database. I find this is the best way to import the new set of quotes cleanly.

But as I said, the drawing tools are gone in the symbol file. All I'm doing is replacing the quotes and $TICKMODE 1 is also removing the drawing tools. All I ask is that the drawing tools are left in the database file after I use $TICKMODE 1. In the documentation it only says that the quotes are deleted and replaced, not the trendlines etc.

This may sound stupid to you, but this is the way I do things, and it worked beautifully. I've been using Amibroker and supporting you for the last 20 years. All I ask is why is $TICKMODE 1 also removing the trendlines.

Thanks.

Drawing tools are NOT influenced by importing quotes. (as long as you don't exceed 2GB per symbol as this is file length limit)

I clean up the quotes, then replace the quotes back into the database.

I don't know what "clean up" you mean. I don't know what you are doing. Are you deleting files??? And why? What is the purpose of that?

You should not do any "cleanup". Just import what you want import and DO NOTHING else. Don't use any "cleanup".

Anything that you import overwrites existing data. There is no point in "removing" anything or "cleaning" anything.

Tomasz,

Sorry for starting this thread. You can delete it if you want. The problem with me was that I was only transfering the symbol files (0-9, A-Z, '_') of the database from my desktop computer that had the drawn trendlines on the chart to the laptop database. The quotes were transferred nicely, but because both computers had different Chart ID's, the trendlines were not drawn on the laptop. But when I transferred the whole database, plus the broker.newcharts file, the chart id's were the same, and the trendlines moved too.

Thanks again.

Yes this is explained here: