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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      129 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      74 views
      1 like
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      116 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      110 views
      1 like
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      89 views
      0 likes
      Last Post CarlTrading  
      Working...
      X