Exploration for difference in Close price between two specific dates

Hi. I am trying to get a table which shows the difference in closing prices between two input dates. I run this code as an exploration over all symbols and for all quotes but it turns up blank.

InputDate = "2019-10-18";
ClosePrice1 = Lookup(Close, _DT(InputDate), 0);
AddColumn (ClosePrice1, "Close1");
InputDate = "2019-10-25";
ClosePrice2 = Lookup(Close, _DT(InputDate), 0);
AddColumn (ClosePrice2, "Close2");
ClosePriceDiff = ClosePrice2 - Closeprice1;
AddColumn (ClosePriceDiff, "ClosePriceDiff");

hello
Always you need to write your filter criteria to run one exploration.
if you add below line in your code

Filter =1;
means show me everything

https://www.amibroker.com/guide/h_exploration.html

2 Likes

Yes. This worked. Thanks!