For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/

GenericCSVData



  • Hi there ,

    I am sorry, I feel other already had this issue and it was solved .
    if I have a text file with the following data structure,shown on attached picture do I need to create my own class of data feeder or use generic csvdata feeder of the backtester ?0_1557336165333_Capture1.PNG
    I thank you in advance for your help and tips .


  • administrators

    @augustus said in GenericCSVData:

    if I have a text file

    1. Let me joke: you apparently have an image and not a text file (it's because I can't understand why people post images for things which are raw text)

    2. See the top of the forum (it will let you properly post text blocks)

    For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
    
    1. Use GenericCSVData

    In the 2nd link there is even a usage sample

    data = btfeeds.GenericCSVData(
        dataname='mydata.csv',
    
        fromdate=datetime.datetime(2000, 1, 1),
        todate=datetime.datetime(2000, 12, 31),
    
        nullvalue=0.0,
    
        dtformat=('%Y-%m-%d'),
    
        datetime=0,
        high=1,
        low=2,
        open=3,
        close=4,
        volume=5,
        openinterest=-1
    )
    


  • @backtrader
    Hi
    Thank you very much for the tip. It turned out to be fruitful.