if( BarsInProgress == 1 )
if( some condition )
DrawDiamond( "tag"+CurrentBars[0].ToString(), true, 0, Highs[0][0]+TickSize, Color.Black );
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Expose TickSizes[] in addition to TickSize
Collapse
X
-
Expose TickSizes[] in addition to TickSize
Consider the following code that might appear in OnBarUpdate() in an indicator to which a second Bars object was added and that has CalculateOnBarClose set to false:
The idea is that based on some criteria involving the second Bars object a diamond is drawn above the current bar of the primary Bars object. But note that there's one little problem: The call to DrawDiamond() really wants the TickSize of the primary Bars object, but it gets the TickSize of the second bars object. Of course this can be solved by capturing and saving the required TickSize elsewhere. But it seems preferable to be able to reference something like TickSizes[0] the same way CurrentBars[0] and Highs[0][] are used.Code:Tags: None
-
Hi MikeInMA,
Thank you for you suggestion, your feedback is much appreciated!
As you mentioned, for now, you can capture that and save it under the correct BIP context.Last edited by NinjaTrader_Tim; 11-23-2010, 04:01 PM.TimNinjaTrader Customer Service
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by SalmaTrader, 07-07-2026, 10:26 PM
|
0 responses
101 views
0 likes
|
Last Post
by SalmaTrader
07-07-2026, 10:26 PM
|
||
|
Started by CarlTrading, 07-05-2026, 01:16 PM
|
0 responses
61 views
0 likes
|
Last Post
by CarlTrading
07-05-2026, 01:16 PM
|
||
|
Started by CaptainJack, 06-17-2026, 10:32 AM
|
0 responses
25 views
0 likes
|
Last Post
by CaptainJack
06-17-2026, 10:32 AM
|
||
|
Started by kinfxhk, 06-17-2026, 04:15 AM
|
0 responses
35 views
0 likes
|
Last Post
by kinfxhk
06-17-2026, 04:15 AM
|
||
|
Started by kinfxhk, 06-17-2026, 04:06 AM
|
0 responses
38 views
0 likes
|
Last Post
by kinfxhk
06-17-2026, 04:06 AM
|

Comment