Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Print DataSeries Chart Style & Write .txt

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

    Print DataSeries Chart Style & Write .txt

    Hello, i have 2 issues im trying to solve, fairy simple i think but wasn't able to find an answer, this r my questions:

    1: how do i get to print the chart "bar style" meaning Minute, Renko, Range, etc?


    2: if i wanted it to write the previous result on an .txt, how would i do that? i downloaded the "SampleStreamWriter" example and been trying to make it work but failed.


    something like this?

    #region Variables

    private string path = Cbi.Core.UserDataDir.ToString() + "D:\test.txt";
    private System.IO.StreamWriter sw;

    protected override void Initialize()
    {

    sw.WriteLine( );

    #2
    Hello,

    1) You can user BarsPeriod to print the PeriodType or PeriodValue you are using:



    2) Yes, SampleStreamWriter should help you get started.

    Please try moving your WriteLine to the OnBarUpdate method.
    MatthewNinjaTrader Product Management

    Comment


      #3
      Hi Matthew

      So far i have this:

      Print( Instrument.FullName + " │ "+ BarsPeriod.Id.ToString() +" │ " + BarsPeriod.Value.ToString( ) +" │ "+ GetType().Name +" │ "+ Time[0] );//

      and i get this:

      $EURUSD │ Final1 │ 26 │ KBT_Hot_Zones_1 │ 16/08/2012 03:50:46 a.m.

      Nothing about the chart type, what im I missing?

      2- Whould you point me to an easy explained tutorial on "StreamWriter " since i really cant start with the indicator, i dont understand were each thing goes

      thank you very much


      BTW, im using RangeAlt and Renko bars
      Last edited by kabott; 08-16-2012, 03:21 PM.

      Comment


        #4
        I tried standard Range bars and got the correct name, must be the "RangeAlt" Bars are named "Final1" , anyways i got that solved

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NRITV, Today, 01:15 PM
        0 responses
        1 view
        0 likes
        Last Post NRITV
        by NRITV
         
        Started by quantismo, Yesterday, 05:13 PM
        2 responses
        16 views
        0 likes
        Last Post quantismo  
        Started by maybeimnotrader, Yesterday, 05:46 PM
        4 responses
        24 views
        0 likes
        Last Post maybeimnotrader  
        Started by frankthearm, Today, 09:08 AM
        6 responses
        26 views
        0 likes
        Last Post frankthearm  
        Started by adeelshahzad, Today, 03:54 AM
        5 responses
        33 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Working...
        X