• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Can't Draw In 2nd Data Series Panel 2

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

    Can't Draw In 2nd Data Series Panel 2

    Hello:

    I'm a Ninja beginner trying to draw in the secondary data series pane. The code below (general representation) compiles but produces no graphics in "Panel 2".

    Thanks for any ideas on what's going wrong here..

    /************************************/
    public void DrawSomething()
    {
    if (High[0]>=SomeConstant)
    DrawDot(" ", true, 0, High[0], Color.LawnGreen);
    }
    /************************************/
    protected override void Initialize()
    {
    Add("msft", PeriodType.Minute, 2);
    CalculateOnBarClose = true;
    }
    protected override void OnBarUpdate( )
    {
    if (CurrentBars[0] < BarsRequired || CurrentBars[1] < BarsRequired)
    return;
    if (BarsInProgress == 1)
    DrawSomething();
    }

    #2
    tradenj, unfortunately the series you're adding in programmatically here in Initialize() would not be visualized, it would just be internal for calculations and processing.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Originally posted by tradenj View Post
      Hello:

      I'm a Ninja beginner trying to draw in the secondary data series pane. The code below (general representation) compiles but produces no graphics in "Panel 2".

      Thanks for any ideas on what's going wrong here..

      /************************************/
      public void DrawSomething()
      {
      if (High[0]>=SomeConstant)
      DrawDot(" ", true, 0, High[0], Color.LawnGreen);
      }
      /************************************/
      protected override void Initialize()
      {
      Add("msft", PeriodType.Minute, 2);
      CalculateOnBarClose = true;
      }
      protected override void OnBarUpdate( )
      {
      if (CurrentBars[0] < BarsRequired || CurrentBars[1] < BarsRequired)
      return;
      if (BarsInProgress == 1)
      DrawSomething();
      }
      Look up DrawOnPricePanel in NT Help.

      Comment


        #4
        More Ninja vs Wealth Lab

        Hi.
        -Again returning after days away and thanks for your responses.

        It looks like drawing in Panel 2 (i.e. on 2nd data series) is not possible in Ninja. I've also noticed that shapes/ text drawn to the primary pane don't remain there for perusal while scrolling back & forth through chart.

        Coming from Wealth Lab my trading approach involved notating figures & target lines (calculated by code) to intra-day historical and real time data charts. Empty panes could also be created there just for figure notation, graphics, etc.. These annotations were used while trading and for later study. I guess this isn't good for speed of execution here in Ninja, but please let me know if there'd be any means of accomplishing this sort of thing.

        One other question:
        Code:
         Add("NQ 3-13", PeriodType.Minute, 2);
        produces error message
        **NT** The strategy ... has called the Add() method with an invalid instrument. Either 'NQ 3-13' does not exist in the Instrument Manager or the specified exchange has not been configured
        .
        Further thanks for all of your help and ideas.
        Last edited by tradenj; 03-03-2013, 12:12 PM.

        Comment


          #5
          Originally posted by tradenj View Post
          Hi.
          -Again returning after days away and thanks for your responses.

          It looks like drawing in Panel 2 (i.e. on 2nd data series) is not possible in Ninja.
          Already answered. DrawOnPricePanel = false;

          Look it up in the NT Help.

          One other question:
          Code:
           Add("NQ 3-13", PeriodType.Minute, 2);
          produces error message .
          Further thanks for all of your help and ideas.
          That is because the instrument is "NQ 03-13", not "NQ 3-13".
          Last edited by koganam; 03-03-2013, 01:10 PM.

          Comment


            #6
            Hello:

            I appreciate your inputs.

            Re: Topic #1 I was using two data series rather than a data series and an indicator. So far I still haven't been able to draw or do BackColorSeries[] to Panel 2 under these circumstances. Everything goes to Panel 1 regardless of whether DrawOnPricePanel is set to true or false.

            Re: Topic #2 I idiot.

            Additional Question - Is there any way to refer to the chart end in Ninja? Take for example running a program on some days of historical intraday data, after which you want to print some calculated values to the output window (rather than to chart in Ninja).

            Thanks again.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by U0000999, Yesterday, 11:49 PM
            1 response
            5 views
            0 likes
            Last Post NinjaTrader_ChrisSch  
            Started by Mberg, Today, 03:29 AM
            0 responses
            4 views
            0 likes
            Last Post Mberg
            by Mberg
             
            Started by TazoTodua, Today, 03:24 AM
            0 responses
            4 views
            0 likes
            Last Post TazoTodua  
            Started by ahadari28, Yesterday, 04:01 PM
            1 response
            7 views
            0 likes
            Last Post NinjaTrader_ChrisSch  
            Started by NinjaCustomer, Today, 12:14 AM
            1 response
            5 views
            0 likes
            Last Post NinjaTrader_Marco  
            Working...
            X