![]() |
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Member
Join Date: Jan 2008
Posts: 32
Thanks: 0
Thanked 0 times in 0 posts
|
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;
}
Is it possible to get user input?
Last edited by dhunnewell; 02-23-2010 at 08:47 AM.
|
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
Unfortunately not for bar creation. You will need to hard code it.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Member
Join Date: Jan 2008
Posts: 32
Thanks: 0
Thanked 0 times in 0 posts
|
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);
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? |
|
|
|
|
|
#4 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
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
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Initialize value of Time Series in a Strategy | Jean-Marc-Molina | Strategy Development | 3 | 10-15-2009 11:26 AM |
| DataSeries input to indicator in strategy Initialize() routine | trader20 | Strategy Development | 2 | 07-16-2009 06:03 AM |
| How to access user defined inuts in initialize function. | oblix | General Programming | 3 | 06-03-2009 02:46 PM |
| DataSeries as User Input | SystemTrading | Strategy Development | 3 | 02-03-2009 10:39 AM |
| Input Series For Indicator | CraigC | Indicator Development | 7 | 06-28-2008 03:58 AM |