AddColumn using date from Analysis window Filter Setting

Applying code tags is mandatory in this forum!
How to use this site

This is now the nth time that you ignore it despite having been informed several time before.


Use Lookup function to get an element at chosen date

dtstr = "2018-10-01"; // your chosen date

lc = Lookup( C, _DT(dtstr), 0 );	
							
Filter = Status( "lastbarinrange" );

AddColumn(C,"Last Bar Close ", 1.3 );
AddColumn(lc,"Close at " + dtstr, 1.3 );

Alternativally you may use ParamDate

dtstr = "2018-10-01" ; // your chosen default date

pdt = DateTimeConvert(2, ParamDate( "Chosen Date", dtstr));
lc = Lookup( C, pdt, 0 );								

Filter = Status( "lastbarinrange" );

AddColumn(C,"Last Bar Close ", 1.3 );
AddColumn(lc,"Close at " + dtstr, 1.3 );
2 Likes