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 Mestor, 03-10-2023, 01:50 AM
|
12 responses
307 views
0 likes
|
Last Post
by z.franck
Today, 04:29 AM
|
||
Started by AgriTrdr, 07-16-2023, 12:54 PM
|
32 responses
267 views
0 likes
|
Last Post
by f.saeidi
Yesterday, 06:49 AM
|
||
Started by Mestor, Today, 03:15 AM
|
0 responses
2 views
0 likes
|
Last Post
by Mestor
Today, 03:15 AM
|
||
Started by Padan, Today, 02:02 AM
|
0 responses
6 views
0 likes
|
Last Post
by Padan
Today, 02:02 AM
|
||
Started by bukowa, 11-09-2023, 06:07 PM
|
20 responses
409 views
0 likes
|
Last Post
by Adfra
Today, 01:36 AM
|
Comment