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 Hwop38, 05-04-2026, 07:02 PM
      0 responses
      151 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      304 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      244 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      345 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      175 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Working...
      X