Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Accessing Point and Figure data...
Collapse
X
-
In my script (which is a DrawingTool, not an Indicator):
Code:private BarsPeriod bp;
Code:bp = new BarsPeriod();
Code:Print("boxSize: "+bp.Value+" -- reversal: "+bp.Value2);
Code:boxSize: 1 -- reversal: 1
Last edited by funk101; 10-09-2015, 11:09 AM.
Comment
-
I see now. What you are doing is instantiating a new BarsPeriod object, but you are not doing anything with the Box Size and Reversal values of that particular object. What you need is an instance of ChartControl related to the chart on which the object resides. An instance of ChartControl will have a BarsPeriod object attached to it which should carry the correct values, and you can just assign a reference to that existing BarsPeriod object to your bp object.
For example, I was able to get this working in a modified version of the @Text drawing tool as follows:
Code:private void DrawText(ChartControl chartControl) { Print(chartControl.BarsPeriod.Value); ....................
Dave I.NinjaTrader Product Management
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by cmtjoancolmenero, Yesterday, 03:58 PM
|
1 response
17 views
0 likes
|
Last Post Today, 06:16 AM | ||
Started by benmarkal, Yesterday, 12:52 PM
|
3 responses
23 views
0 likes
|
Last Post Today, 05:22 AM | ||
Started by helpwanted, Today, 03:06 AM
|
1 response
20 views
0 likes
|
Last Post Today, 03:35 AM | ||
Started by Brevo, Today, 01:45 AM
|
0 responses
11 views
0 likes
|
Last Post
by Brevo
Today, 01:45 AM
|
||
Started by pvincent, 06-23-2022, 12:53 PM
|
14 responses
244 views
0 likes
|
Last Post
by Nyman
Today, 12:47 AM
|
Comment