Need help with "dn = DateNum();"


From :

The following code exports AB Database to ASCII with any TF of choice, however the dates are in the YYMMDD format which would be much better in the standard YYYYMMDD format.

Im sure its something to do with the "DateNum();" function.

Ive looked up :[email protected]/msg14144.html

and other links but din make much sense to me, any help would be greatly appreciated.

The AFL :
fh = fopen( Name()+""+".csv", "w" );
if( fh )
fputs("Symbol,Date,Time,Open,High,Low,Close,OpenInt,Volume\n", fh );

dn = DateNum();
tn = TimeNum();

for( i = 0; i < BarCount; i++ )
Line = Name() +
dn[ i ] % 1000000,
tn[ i ],
Open[ i ],
High[ i ],
Low[ i ],
Close[ i ],
OpenInt[ i ],
Volume[ i ] );

fputs( Line, fh );

fclose( fh );

Buy=Sell=0; // for scan
Filter = Status("lastbarinrange");
AddTextColumn("Export done", "Status");


Similar threads

Zerodha – Open Paperless Account

Open online account with Zerodha. Free delivery trading and Max Rs 20 for Intraday, F&O, Currency and Commodity Trading. Intraday High leverage with MIS, CO and BO.

Are you a day trader?