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):
In OnStateChange() I have:Code:private BarsPeriod bp;
in my OnMouseDown() I haveCode:bp = new BarsPeriod();
my ouput is:Code:Print("boxSize: "+bp.Value+" -- reversal: "+bp.Value2);
My setttings are attachedCode: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 CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
24 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
25 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|
||
|
Started by CaptainJack, 03-25-2026, 09:53 PM
|
0 responses
30 views
0 likes
|
Last Post
by CaptainJack
03-25-2026, 09:53 PM
|
||
|
Started by CaptainJack, 03-25-2026, 09:51 PM
|
0 responses
18 views
0 likes
|
Last Post
by CaptainJack
03-25-2026, 09:51 PM
|
||
|
Started by Mindset, 03-23-2026, 11:13 AM
|
0 responses
27 views
0 likes
|
Last Post
by Mindset
03-23-2026, 11:13 AM
|

Comment