Add Dates in Row

Is it possible to put date in rows instead of columns by any way in scanner.

Yes, you can do that via AddRow in conjunction with AddColumn.
https://www.amibroker.com/guide/afl/addrow.html
https://www.amibroker.com/guide/afl/addcolumn.html
Filter variable is set to zero if you just want to output data via AddRow.

(AddRow has been the vital missing link to output any data in any way in Explorer. You can also output Matrices and any non symbol's related data there easily in nice table format. The only missing part of AddRow in comparison to using Addcolumn is some coloring option of cells. But other than that it is fully functional and as said you can flexibly output/place data anywhere in any/same way as in Excel.)

Anyway in your case you would use AddColumn function to initialize the columns (via loop). Since AddRow() expects string as input you collect that data in loop too and AddRow function uses the result outside of the loop.

// INCOMPLETE!
// Basic (sample) template 

Filter = 0;

SetOption( "NoDefaultColumns", 1 );

col = 10; // number of columns, do not overdo things here as far as number of columns are concerned
for( i = Max(0, BarCount-col); i < BarCount; i++) {
	// AddColumn creation here
	//	
	// collecting string data for AddRow() here	
}

AddRow( "YourLoopDataHERE" );

Now, either you place date data only at the top for all symbols (then Pad&align option of analysis setting being checked is mandatory!)
2

OR you add date rows per each symbol (then pad&align setting being checked is not mandatory but well, optional).

1

5 Likes

Awesome example, thanks for sharing this, I was wondering how you get all the exploration tables to look like excel. Thumbs up!!!

Please note that dates are placed in rows for a reason. Windows list view horizontal size is limited the same as any drawing context in Windows to 32767 pixels. If sum of width of all columns exceeds 32767 pixels it will not draw column beyond that. This device context pixel limit is buried inside Windows and I don't see Microsoft changing it any time soon.

3 Likes