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".



    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 Skifree, Today, 03:41 AM
        3 responses
        12 views
        0 likes
        Last Post Skifree
        by Skifree
         
        Started by traderqz, Yesterday, 09:06 AM
        5 responses
        32 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by guillembm, Today, 11:25 AM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by owensd, 04-21-2024, 11:34 PM
        9 responses
        34 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by trilliantrader, 04-10-2024, 09:33 PM
        7 responses
        25 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Working...
        X