Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Using a CSV/Excel File to Trade/Rebalance

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Using a CSV/Excel File to Trade/Rebalance

    Is there a way or a specific code that I can implement to make NT8 trade from a CSV file, or Excel? For example, I have a list of about 125 tickers with the exact amount of shares I want to buy of each on the file. I would like to be able to input this file somewhere or have NT8 read it somehow to check the number of shares, if any, of those stocks within my portfolio and trade accordingly to make sure my brokerage account (TDA) portfolio is built up of the same stocks. Essentially, a system that reads a CSV file and rebalances my portfolio from it. Possible?

    #2
    Hello chasep7328,

    Thank you for your post.

    You can use StreamReader to read from a file in your script. Please see this sample script that demonstrates reading from a file using StreamReader:



    If you have any further questions, please let us know.
    Gaby V.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by rbeckmann05, Yesterday, 06:48 PM
    1 response
    12 views
    0 likes
    Last Post bltdavid  
    Started by llanqui, Today, 03:53 AM
    0 responses
    6 views
    0 likes
    Last Post llanqui
    by llanqui
     
    Started by burtoninlondon, Today, 12:38 AM
    0 responses
    10 views
    0 likes
    Last Post burtoninlondon  
    Started by AaronKoRn, Yesterday, 09:49 PM
    0 responses
    15 views
    0 likes
    Last Post AaronKoRn  
    Started by carnitron, Yesterday, 08:42 PM
    0 responses
    11 views
    0 likes
    Last Post carnitron  
    Working...
    X