Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

data series issue when translating from NT7 to NT8

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

    #16
    Hello Semion.AI,

    Please see the attached screenshot for an example.
    Attached Files

    Comment


      #17
      Thanks much Jim.

      Could you please show me the correct format for implementing this script within Streamwriter ?

      Semion.

      Comment


        #18
        Hello Semion.AI,

        A complete working example that implements a StreamWriter can be found below.



        Since StreamWriters are not a NinjaScript specific item, I suggest referencing publicly available C# documentation.

        The class in C# is used to write characters to a stream in a particular encoding. It provides an easy way to create and write text to files, making it essential for file I/O operations.


        You may note that in our example, the StreamWriter calls the following lines in OnBarUpdate to open the file, write a line to the file, and to then close the file,

        Code:
        sw = File.AppendText(path); // Open the path for writing
        sw.WriteLine(Time[0] + "," + Open[0] + "," + High[0] + "," + Low[0] + "," + Close[0]); // Append a new line to the file
        sw.Close(); // Close the file to allow future calls to access the file again.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by SalmaTrader, 07-07-2026, 10:26 PM
        0 responses
        35 views
        0 likes
        Last Post SalmaTrader  
        Started by CarlTrading, 07-05-2026, 01:16 PM
        0 responses
        20 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 06-17-2026, 10:32 AM
        0 responses
        12 views
        0 likes
        Last Post CaptainJack  
        Started by kinfxhk, 06-17-2026, 04:15 AM
        0 responses
        18 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 06-17-2026, 04:06 AM
        0 responses
        20 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Working...
        X