Chart study, how?

Hello, I need help. I want to do a price study comparing bear markets. For example, is it possible to compare the Dow Jones Ind. in the period 02/14/2020 to 03/27/2020 with the period 10/12/2007 to 03/13/2009? I would like to have this in one chart.
I could bet that Amiboker can do that, but I can't find an approach.

Something for you to start....


DateStart = ParamDate("Start", "2007-12-10", 2);
bi = BarIndex();
barOfDate = Lookup(bi, DateStart, -1);
fVisibleBar = FirstVisibleValue(bi);

reference = barOfDate - fVisibleBar;

sClose = Ref(Close, reference);
sDate = Ref(DateTime(), reference);

_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}}\nShifted: Date %s\n {{VALUES}}", DateTimeToStr(SelectedValue(sDate))));
Plot( C, "Close", colorred, styleLine); 
Plot(sClose, "\nShifted Close", colorBlue, styleLine);

Thank you, this could be the way.

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