hi everyone,
when i run below codes, i got -10000000000 result
how can i only store the price that is not null?
thanks!
path = "C:\\daily\\";
fh = fopen(path+Name()+".csv", "w" );
if( fh )
{
fputs("date,open,high,low,close,volume,dividend,split\n", fh );
for( i = 0; i < BarCount; i++ )
{
y = Year();
m = Month();
d = Day();
ds = StrFormat("%02.0f-%02.0f-%02.0f,", y[ i ] ,m[ i ], d[ i ]);
fputs( ds, fh );
Line = StrFormat("%.4f, %.4f, %.4f, %.4f, %g, %g, %g \n",
Open[ i ],
High[ i ],
Low[ i ],
Close[ i ],
Volume[ i ],
0,
1
);
fputs( Line, fh );
}
fclose( fh );
}
Buy=Sell=0; // for scan
Filter = Status("lastbarinrange");
AddTextColumn("Export done", "Status");