Hi Tomasz,
Thanks for your reply. To clarify the behaviour I think that is odd - at the start of the video you can see several tickers such as ORD.au, GDM.au and CGR.au in tabs.
These three tickers were charts I was looking at the last time I used Amibroker and they loaded up again in tabs when I re-opened Amibroker. So far, so good. However, when I click on those tabs again, as soon as I click the "ORD.au" tab the chart changes to "OPT.au" without me making any other inputs. Similarly, GDM.au changes to GCV and CGR.au changes to CGGR.
I have attached the chart formula - apologies for not doing that earlier.
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();
_SECTION_BEGIN("Volume At Price");
PlotVAPOverlay( Param("Lines", 300, 100, 1000, 1 ), Param("Width", 5, 1, 100, 1 ), ParamColor("Color", colorCycle ), ParamToggle("Side", "Left|Right" ) | 4*ParamToggle("Z-order", "On top|Behind", 1 ) );
_SECTION_END();
_SECTION_BEGIN("MA");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1, 10 );
Plot( MA( P, Periods ), "", ParamColor( "Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();
_SECTION_BEGIN("MA1");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1, 10 );
Plot( MA( P, Periods ), "", ParamColor( "Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();
_SECTION_BEGIN("MA2");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1, 10 );
Plot( MA( P, Periods ), "", ParamColor( "Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();
_SECTION_BEGIN("MA3");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1, 10 );
Plot( MA( P, Periods ), "", ParamColor( "Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();
_SECTION_BEGIN("ADR");
// adapted to AFL by beppe, https://forum.amibroker.com/t/qullamaggie-adr-formula-for-ab/35933/3
// modified by RioL for userdefined parameters, to be able to use the style "hidden" => current ADR will only be shown in the top of the chart and not the line itself
//////////////////////////////////////////////////////////
// TC 2000 - code - From: https://qullamaggie.com/faq/
// It s the average daily range in % over the past 20 sessions.
// 100*((H0/L0+H1/L1+H2/L2+H3/L3+H4/L4+H5/L5+H6/L6+H7/L7+H8/L8+H9/L9+H10/L10+
// H11/L11+H12/L12+H13/L13+H14/L14+H15/L15+H16/L16+H17/L17+H18/L18+H19/L19)/20 -1)
Periods = Param("Periods", 20, 2, 300, 1, 10 );
ADR = 100 * ( MA( High / Low, Periods ) - 1 );
/*
coloring adr(20) based on MA
*/
titleColor = colorDefault;
// load the $SPX close array
refSymbol = ParamStr("Reference Symbol - MA trend","$SPX");
SPX_C = Foreign(refSymbol,"C");
ma10 = MA(SPX_C,10);
ma20 = MA(SPX_C,20);
ma10Up = ma10 > Ref(ma10,-1);
ma20Up = ma20 > Ref(ma20,-1);
if (SelectedValue(ma10) > SelectedValue(ma20) AND SelectedValue(ma10up) AND SelectedValue(ma20up)) {
titleColor = colorGreen;
} else {
titleColor = colorred;
}
//remove plotting adr on chart but show it on chart title
//Plot( ADR, StrFormat("ADR(%g)", Periods), titleColor, styleNoDraw||styleNoRescale);
_SECTION_END();
_SECTION_BEGIN("ATR");
// adapted to AFL by beppe, https://forum.amibroker.com/t/qullamaggie-adr-formula-for-ab/35933/3
// modified by RioL for userdefined parameters, to be able to use the style "hidden" => current ADR will only be shown in the top of the chart and not the line itself
//////////////////////////////////////////////////////////
Periods = Param("Periods", 20, 2, 300, 1, 10 );
Adr1 = MA( High - Ref(Close, -1), Periods ) ;
//Plot( AdR1, StrFormat("ATR (%g)", Periods), ParamColor( "Color", colorCycle ), stylenotitle );
_SECTION_END();
/*
The title is modified here with full name and industry and atr(20) is added to title
the value calculated for atr and displayed in chart is not default atr
*/
strIndustry = IndustryID(1);
SharesOutstanding = GetFnData("SharesOut");
SL = C- ATR(20);
_N(Title = StrFormat("{{NAME}} - {{FULLNAME}} - %s - Outstanding %s, {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) ATR(20) %0.2f Max Stop %.2f" + EncodeColor(titleColor) + " ADR: %.2f {{VALUES}}",strIndustry,NumToStr(SharesOutstanding), O, H, L, C,SelectedValue( ROC( C, 1 ) ), SelectedValue(ADR1), (C-SelectedValue(ADR1)),SelectedValue(ADR) ));
/*backup _N(Title = StrFormat("{{NAME}} - {{FULLNAME}} - %s - Outstanding %s, {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) ATR(20) %0.2f Max Stop %.2f" + EncodeColor(titleColor) + " ADR: %.2f {{VALUES}}",strIndustry,NumToStr(SharesOutstanding), O, H, L, C,SelectedValue( ROC( C, 1 ) ), SelectedValue(ADR1), (C-SelectedValue(ADR1)),SelectedValue(ADR) ));
/*For Zooming in and out. Source afl in the include folder*/
UseZoomer = ParamToggle("Use Zoomer?", "No|Yes", 0);
#include_once <iZoomer.afl>
_SECTION_BEGIN("MA4");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1, 10 );
Plot( MA( P, Periods ), "", ParamColor( "Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();
_SECTION_BEGIN("EMA");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1, 10 );
Plot( EMA( P, Periods ), "", ParamColor( "Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();
_SECTION_BEGIN("EMA1");
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1, 10 );
Plot( EMA( P, Periods ), "", ParamColor( "Color", colorCycle ), ParamStyle("Style") );
//replace "_DEFAULT_NAME()" with "" to get rid of MAs from title
_SECTION_END();
//for summary info into interpretaion winow
#include_once "Formulas\Norgate Data\Business and Financial Summary.afl"```