Simple way to refresh my chart pane after changing the afl code for a plot

Is there a simple way to get the chart to refresh after I have changed the afl code that plots the chart? For example, say I create a simple afl file that just plots a candlestick shart.

	PlotOHLC( O, H, L, C, "Price Action", colorBlack, styleCandle );

I use insert and plot the chart. I then decide I want to set a min value and a max value and edit the afl file and save it. No changes are made to the chart. The way I have been "refreshing" is to delete the indicator on the pane, then insert again and I get my new chart. I was just wondering if I am wasting my time deleting and inserting again (two steps), or if there is a simple way to refresh (one step) that I am missing?

@Narcissus, you should start the editing from your chart:


Then, when you are in the editor and done with the modifications, you can press the "Apply" button to see the changes in the active chart:


Please, read also the @Tomasz answer in this past thread.

1 Like

Thank you @beppe for your help and comment.

I have taken the time to read @Tomasz's answer in the past thread, explaining why Apply Indicator should be used instead of save. Thanks for the link.

I must be still missing something because when I start editing from the chart (in the manner you have described), it opens up a new afl file. For example, if my system was called "My System", a new afl file called "My System 1" is opened. I make the changes here, hit apply and yes the changes are made to the chart. But my original code is left unchanged. Is there a way to get the changes to apply to the original code "My System" as well?

I suspect my understanding of charts may not be good, and perhaps when I insert a chart to a pane, it inserts a copy of that chart (the afl file). When I change the copy of the chart by editing directly from the chart, perhaps it changes the copy, but not the original.

It is all in the manual.

For example here

Q. What is the difference between Insert and Insert Linked option in chart menu?

A. Insert command internally creates a copy of the original formula file and places such copy into hidden drag-drop folder so original formula will not be affected by subsequent editing or overlaying other indicators onto it. Double clicking on formula name in the chart tree is equivalent with choosing Insert command from the menu. On the other hand Insert Linked command does not create any copy of the formula. Instead it creates new chart pane that directly links to original formula. This way subsequent editing and/or overlaying other indicators will modify the original

So if you double click AFL from Charts window or use option "Insert" of context menu then you create a copy of the original AFL of Charts window. If you do not want to create copy you have to use "Insert linked".

Such numbered files are copies of original AFL file being part of Drag&drop folder.

1 Like

@fxshrat Thank you, this is crystal clear and combined with @beppe's comments have helped me both solve my immediate problem, and given me an understanding why I was causing myself this problem. I thank you both for your time.

Thanks for this explanation of Insert vs Insert Linked. Much appreciated.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.