Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Script disables itself... why?
Collapse
X
-
Ryan M.NinjaTrader Customer Service
-
The secondary series is Closes[1][0]. Note the extra s.
You can also contain in a BarsInProgress filter, which is used to define the context of bar updates.
if (BarsInProgress == 1)
{
Print("This is the secondary series close: " + Close[0]);
}Ryan M.NinjaTrader Customer Service
Comment
-
In this case my event handling procedure might look like this:
protected override void OnBarUpdate()
{
if (BarsInProgress == 0)
{ My_First_Instrument_LastPrice=Close[0];}
if (BarsInProgress == 1)
{ My_Second_Instrument_LastPrice=Close[0];}
}
And if I wouldn't want to split logic:
protected override void OnBarUpdate()
{
My_First_Instrument_LastPrice=Close[0];
My_Second_Instrument_LastPrice=Closes[1][0];
}Last edited by greed999; 07-07-2011, 02:53 PM.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by ZenCortexCLICK, Today, 04:58 AM
|
0 responses
5 views
0 likes
|
Last Post Today, 04:58 AM | ||
Started by sidlercom80, 10-28-2023, 08:49 AM
|
172 responses
2,281 views
0 likes
|
Last Post
by sidlercom80
Today, 04:40 AM
|
||
Started by Irukandji, Yesterday, 02:53 AM
|
2 responses
18 views
0 likes
|
Last Post
by Irukandji
Today, 03:55 AM
|
||
Started by adeelshahzad, Today, 03:54 AM
|
0 responses
8 views
0 likes
|
Last Post
by adeelshahzad
Today, 03:54 AM
|
||
Started by Barry Milan, Yesterday, 10:35 PM
|
3 responses
13 views
0 likes
|
Last Post Yesterday, 11:58 PM |
Comment