Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to pass external data to strategy

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

    How to pass external data to strategy

    Hi

    I would like to know how I can pass support and resistance levels to a strategy from a file stored in my computer.

    Regards.

    #2
    Hllo J2512,

    You can see the following example which shows how to read a file. You can use any C# means to read or work with local files, you can find more examples online by searching for "C# read file".

    https://ninjatrader.com/support/help...o_read_fro.htm

    JesseNinjaTrader Customer Service

    Comment


      #3
      Hi NinjaTrader_Jesse

      Is ther some example to do the same but from excel or .csv file, the goal is to read .csv file and store it in a dataframe or diferents arrays to link each array postion between them and check their values when it is needed.

      As example to clarify it, I have a file with 3 columns, first column store SOR values from timeframe 15 minutes, second store the same for 30 min and third the same for 60 min, the goal is to store each column in an array to use during strategy, could you provide a example of this or any link where I can find it? My knowledge about C# is reduce but I know program in python, C, R...

      Regards.

      Comment


        #4
        Hello J2512,

        The link I last provided uses a .csv, you could use any standard text format with the code shown in the last link. That uses comma separated items and shows how you would split a string into induvial data. Similar to that you would need to iterate and store the data you read in the way you wanted.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by bsmith, Today, 03:09 PM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_Eduardo  
        Started by speedytrade02, 09-06-2023, 03:35 AM
        20 responses
        123 views
        0 likes
        Last Post speedytrade02  
        Started by manitshah915, Today, 10:33 AM
        4 responses
        28 views
        0 likes
        Last Post bltdavid  
        Started by wzgy0920, Today, 01:27 PM
        3 responses
        13 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by westsider, Today, 10:30 AM
        2 responses
        15 views
        0 likes
        Last Post westsider  
        Working...
        X