Chart Objects Not Preserved in Layout

Q:  I opened a 5-minute chart, added some lines, changed time frames to a 30-minute chart,  added lines to the 30-min chart and then saved as a layout.   On opening the layout the 30-min chart shows the lines, but when changing time frames to the 5-min chart, the lines are missing.  What happened?

A:  The issue is whether lines were saved BEFORE or AFTER the chart was saved as a layout.   When you added lines to the 5-minute chart, you were working with solo charts, and they save their objects in the Study folder using the chart symbol and time frame as the file name.   For the sake of discussion we will call this file  AA.

When you saved the layout, the program set a LAYOUT flag which changes the object filenames to add a ‘_’ prefix character.  That way layout files do not compete with or overwrite the files used by solo charts.  For the sake of discussion we will call this file BB.

When you open the layout, it loads the layout file and that shows the 30-min chart and how it was last dressed.  When you change to the 5-min file, it looks for its BB file and not its AA file.  The BB file does not exist and that is why the lines you added are missing.  The 5-min chart lines were saved in the AA file, because they were saved before a layout was started.

The way to avoid this issue is to save or open a layout so the Layout flag is set, and then add your studies and lines.  The objects will be saved in the BB files which have the ‘_’ prefix.  Also save the layout after making changes to any charts.   

The objects saved in solo chart mode might still be recoverable for use in a layout in this manner.

Look at the Study folder which holds the objects.  There you will find two types of files, the  AA  names referred to in this discussion are the non-layout files for solo charts.  The BB names referred to in the discussion have a prefix of ‘_’  ahead of the symbol and time frame.  The red arrows point to two examples.  

Names without ‘_’ prefix were saved before you entered layout mode.   You could possibly recover your solo chart objects for use in a layout by appending the ‘_’ to the name by using Windows Explorer and selecting Rename on the pop-up menu.

Paul Coghlan, of Coghlan Capital, recorded a 5-minute video which describes the process and has given permission for his video to be included in this blog article.  Thank you Paul.

Click this link to watch Paul’s video:   Recover Objects