I experimented a bit with modifying charts without first having a thorough understanding of Amibroker's charting philosophy.
As a result of these activities, I made various modifications to the Price formulas.
I used drag and drop operations to insert modified price charts into the chart.
As a result, I now have a formula in the default chart in a file called _Price_imported_imported_imported_imported.afl located in the Custom folder, which annoys me a bit. The default chart created with this file also contains layers I created that contain some useful information. Among others on one of them there are special markers inserted in the places (days) in which I made transactions of buying and selling my securities, which is useful in the back-testing of the operation of my trading system.
These changes took me a long time. I thought I'd modify the way I modify and create charts by gathering all the important formulas plotting price and used indicators in one folder and using the Insert Linked mode to add chart elements.
Therefore, I have the following questions:
Is it possible to rename the _Price_imported_imported_imported_imported.afl formula to a shorter one and place it in a different folder while keeping the current ChartID and linking it to the default chart?
I wanted to create a new chart using the formula used in the default chart. I copied the price formula above to a fixed folder.
Although the chart is created exactly the same and with the names of the created layers, the content of these layers is empty.
Is there a method to add layer content to a created chart from default chart layers?
Do I need to create a new Default Chart and remove all indicators and save as a new template to have a basic chart with layered content?
Thank you snoopy.pa30 for your help. Your answer is actually in point 2.
Sorry for the unclear wording of my questions.
Really, what I mean is to create a new default chart that would contain the data placed on the layers of the old chart and be created with a formula containing the same code that is placed in the old formula.
The default chart would be created with the Insert Linked operation, not the Insert operation.
This would give the possibility of changing the formula code in the future and the possibility of, for example, attaching other indicators to the default chart without having to copy this formula to an increasingly long name and actually duplicating files in the Custom folder.
In another thread on this forum Tomasz explained that he blocked the ChartID and link to the formula so as not to create a mess in the files. At least that's how I understood it.
Therefore, in point 1, I am asking if, by way of exception, it would be possible to change the link to the formula used in the default chart using some procedure, to change (shorten) the name and to change the folder in which the formula is placed.
The point is to keep the layers containing data associated with the default chart and leave them intact, because their creation was very laborious.
However, if this is not possible, I ask in point 2 how to associate the contents of the layers of the old default chart with the new default chart.
I have tried to create a new default chart using a formula with a different name and in a different folder but containing the same code as the old formula.
This formula is associated with the new default chart using the Insert Linked mode, which is very important.
The problem is that the created layers of the new default chart are empty, because of course there was no operation of copying the contents of the old default chart to the new one.
Only the indicators that are placed in the formula code have been copied.
In this case, the content of the layers from the old default chart is copied to the new one intact.
The geometric position of the elements drawn on the layers will match in the new default plot because their geometric dimensions are the same.
Perhaps Tomasz, as the most competent person, would comment on this matter.
Thanks for your help and best regards