def write(ls_symbols, d_data, ldt_timestamps):

    ldt_timestamps.reverse()
    ls_keys = ['actual_open', 'actual_high', 'actual_low', 'actual_close', 'volume', 'close']

    length = len(ldt_timestamps)

    for symbol in ls_symbols:

        sym_file = open('./' + symbol + '.csv', 'w')
        sym_file.write("Date,Open,High,Low,Close,Volume,Adj Close \n")

        for i,date in enumerate(ldt_timestamps):
            date_to_csv = '{:%Y-%m-%d}'.format(date)
            string_to_csv = date_to_csv

            for key in ls_keys:
                string_to_csv = string_to_csv + ',' + str(d_data[symbol][length-i-1])

            string_to_csv = string_to_csv + '\n'
            sym_file.write(string_to_csv)
dataset/ETHPy150Open QuantSoftware/QuantSoftwareToolkit/bin/DataGenerate_SineWave.py/write/original