Expert data to my list in one CSV file

hi everyone.
I get report with change I'm Ticker only.

the data only for last symbol

any help in this



destination = "D:\\Databox\\";

listNO = 0;
tickerlist = CategoryGetSymbols(categoryWatchlist, listNO); 
SetOption( "NoDefaultColumns", True );
AddTextColumn( Name(), "Ticker", 1, colorWhite, colorDarkGrey, 90 );
AddTextColumn( "Export finished", "Status", 1, colorWhite, colorDarkGreen, 90 );

TimeFrameSet(in5Minute);
BRange05  		= Close - Low ;
SRange05 		= High - Close ;
TimeFrameRestore();			
			
TimeFrameSet(in15Minute);
BRange15  		= Close - Low ;
SRange15 		= High - Close ;
TimeFrameRestore();					

TimeFrameSet(inHourly);
BRangeH  		= Close - Low ;
SRangeH 		= High - Close ;
TimeFrameRestore();				






			
			
if ( Status( "action" ) == actionExplore ) 
{
	frmdir( destination ) ; // delete export folder

		fmkdir( destination ); // creates export folder xlsx  CSV
		filename = destination+ "ALL" + ".csv";
        fw = fopen( filename, "w" );

    if ( fw )
    {
    
    
    fputs( "Ticker,Date,Time,BuyRange05,SellRange05,BuyRange15 ,SellRange15 ,BuyRange60 , SellRange60 \n", fw );
    
		for ( i = 0; (ticker = StrExtract(tickerlist, i, ',')) != ""; i++ ) 
		{	

			SetForeign(ticker, 0);
			
BRange05	= TimeFrameExpand(BRange05, in5Minute );
SRange05	= TimeFrameExpand(SRange05, in5Minute );
BRange15	= TimeFrameExpand(BRange15, in15Minute );
SRange15	= TimeFrameExpand(SRange15, in15Minute );
BRangeH		= TimeFrameExpand(BRangeH, inHourly );
SRangeH		= TimeFrameExpand(SRangeH, inHourly );

			
					//  ticker
                    fputs( ticker + "," , fw );
                    // Date
                    dnex = StrFormat("%02.0f-%02.0f-%02.0f,", Year(), Month(), Day() );
                    fputs( dnex, fw );
                    // Time
                    tnex = StrFormat(" %02.0f:%02.0f:%02.0f,", Hour(), Minute(), Second() );
                    fputs( tnex, fw );
                    //close
                    priceex = StrFormat(" %02.2f , %02.2f , %02.2f , %02.2f , %02.2f , %02.2f \n", BRange05 ,SRange05 ,BRange15,SRange15,BRangeH,SRangeH );
                    fputs( priceex, fw );

        }
        
        
    }
    
    
    fclose( fw ); 
    
 }



Filter = 1;


This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.