Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Getting user input to initialize additional data series

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

    Getting user input to initialize additional data series

    I am new to Ninja Trader and I am writing scripts for someone else, I have written a script that adds a data series to a chart... I want to get user input for The script initialize to use as the time base for the new data series... I am lost and cannot find anything script reference.

    This is the initialize of my script:

    Code:
     
    protected override void Initialize()
    {
    Add(PeriodType.Minute, 600); 
    CalculateOnBarClose = false;
    }
    I want to get user input for "period".

    Is it possible to get user input?
    Last edited by dhunnewell; 02-23-2010, 09:47 AM.

    #2
    Unfortunately not for bar creation. You will need to hard code it.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Thanx!, New problem... hope you can help...

      Here is my script mod:

      Code:
       
      #region Using declarations
      using System;
      using System.Collections.Generic;
      using System.Text;
      using System.ComponentModel;
      using System.Diagnostics;
      using System.Drawing;
      using System.Drawing.Drawing2D;
      using System.Windows.Forms;
      using System.Xml.Serialization;
      using NinjaTrader.Cbi;
      using NinjaTrader.Data;
      using NinjaTrader.Indicator;
      using NinjaTrader.Gui.Chart;
      using NinjaTrader.Strategy;
      #endregion
      namespace NinjaTrader.Strategy
      {
      [Description("Plots fibonacci extension of previous bar on current bar and indicates retrace.")]
      public class MacdCon : Strategy
      {
      #region Variables
      #endregion
      
      /// <summary>
      /// This method is used to configure the strategy and is called once before any strategy method is called.
      /// </summary>
      protected override void Initialize()
      {
      TextBoxRenderer.DrawTextBox(Graphics.FromHdc, Rectangle.FromLTRB, TextBoxState.Normal);
      Problem is TextBoxState.Normal generates the following error:

      The name 'TextBoxState' does not exist in the current context.

      Indeed when I refer to Intellisense it is not there!

      Did I leave out a reference?

      Comment


        #4
        dhunnewell,

        This would be more of a general C# question. Unfortunately I do not know which "using" you would need to add for TextBoxes. Perhaps you could try googling it.
        Josh P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        650 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        370 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        109 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        574 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        577 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X