Announcement

Collapse
No announcement yet.

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.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    43 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    21 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    30 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    50 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    40 views
    0 likes
    Last Post CarlTrading  
    Working...
    X