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 fx.practic, 10-15-2013, 12:53 AM
|
5 responses
5,403 views
0 likes
|
Last Post
by Bidder
Today, 12:22 AM
|
||
Started by Shai Samuel, 07-02-2022, 02:46 PM
|
4 responses
94 views
0 likes
|
Last Post
by Bidder
Today, 12:11 AM
|
||
Started by DJ888, Yesterday, 10:57 PM
|
0 responses
6 views
0 likes
|
Last Post
by DJ888
Yesterday, 10:57 PM
|
||
Started by MacDad, 02-25-2024, 11:48 PM
|
7 responses
158 views
0 likes
|
Last Post Yesterday, 10:23 PM | ||
Started by Belfortbucks, Yesterday, 09:29 PM
|
0 responses
8 views
0 likes
|
Last Post
by Belfortbucks
Yesterday, 09:29 PM
|
Comment