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

How to add additional columns to Data grid?

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

    How to add additional columns to Data grid?

    Hi, I am pretty new for this system, but I have some questions for historical data import and backtesting. Hope I can get some helps here.

    Here is an example of Apple stock historical data:

    Date,Open,High,Low,Close,Volume,Adj Close,CompanySentimentIndex
    2010-08-17,250.08,254.63,249.20,251.97,15083200,251.97,1.2 2
    2010-08-16,247.58,250.01,246.62,247.64,11350600,247.64,1.3 4
    2010-08-13,251.65,251.88,249.09,249.10,12657400,249.10,0.9 8
    2010-08-12,246.69,253.10,246.12,251.79,19083400,251.79,1.7 5
    2010-08-11,255.40,255.69,249.81,250.19,22108400,250.19,2.1 2

    Actually I have a new column called "CompanySentimentIndex", which indicates how good or how bad the company is in new/media on that day. I want to make it as an additional signal in my trading strategy. But how I provide this data to the system? Currently only Data/Open/high/low/Close/Volume are recognized by day bar during import.

    I haven't figured out a way to add new columns, but is that possible?
    If not possible, any workaround to import this new field and use it in trading strategies? Thanks for your helps!
    Last edited by michaelz; 09-15-2010, 10:07 AM.

    #2
    Hello Michaels,

    Welcome to the NinjaTrader forums!

    CompanySentimentIndex isn't something you could import directly into the database.

    You can use NinjaScript to program an indicator to read from a file and capture this value. The following reference samples can help with reading / writing from a file.

    Using StreamReader to read from a text file
    Using System.IO File properties to write to and read from a text file
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Thanks for your prompt reply. I will take a look of that.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Christopher_R, Today, 12:29 AM
      0 responses
      9 views
      0 likes
      Last Post Christopher_R  
      Started by sidlercom80, 10-28-2023, 08:49 AM
      166 responses
      2,235 views
      0 likes
      Last Post sidlercom80  
      Started by thread, Yesterday, 11:58 PM
      0 responses
      3 views
      0 likes
      Last Post thread
      by thread
       
      Started by jclose, Yesterday, 09:37 PM
      0 responses
      8 views
      0 likes
      Last Post jclose
      by jclose
       
      Started by WeyldFalcon, 08-07-2020, 06:13 AM
      10 responses
      1,415 views
      0 likes
      Last Post Traderontheroad  
      Working...
      X