Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SampleStreamWriter Max Bars Limit?

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

    #16
    Hello ScorpioTravis,

    Thanks for your reply.

    There is no link to answer your question. The example SampleSteamWriter indicator is an educational example of how to write data to a file in Ninjascript which is based on C# proramming language.

    In this line: sw.WriteLine(ToDay(Time[0]) + " " + Open[0] + " " + High[0] + " " + Low[0] + " " + Close[0]); you would add (or replace) what output you would like to see in the file.

    For example to add a print of the current value of an EMA(14) would be something like:

    sw.WriteLine(ToDay(Time[0]) + " " + Open[0] + " " + High[0] + " " + Low[0] + " " + Close[0]+" "+EMA(14)[0]);

    Comment


      #17
      Originally posted by NinjaTrader_PaulH View Post
      Hello ScorpioTravis,

      Thanks for your reply.

      There is no link to answer your question. The example SampleSteamWriter indicator is an educational example of how to write data to a file in Ninjascript which is based on C# proramming language.

      In this line: sw.WriteLine(ToDay(Time[0]) + " " + Open[0] + " " + High[0] + " " + Low[0] + " " + Close[0]); you would add (or replace) what output you would like to see in the file.

      For example to add a print of the current value of an EMA(14) would be something like:

      sw.WriteLine(ToDay(Time[0]) + " " + Open[0] + " " + High[0] + " " + Low[0] + " " + Close[0]+" "+EMA(14)[0]);
      That's what I thought, but I was unsure if variables need any modification.

      THANKS!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      596 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      343 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      103 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      556 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      554 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X