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 bc24fl, 08-30-2019, 01:58 PM
|
4 responses
259 views
0 likes
|
Last Post
by PaulMohn
Today, 04:13 AM
|
||
Started by sugalt, Today, 04:02 AM
|
0 responses
6 views
0 likes
|
Last Post
by sugalt
Today, 04:02 AM
|
||
Started by tradingnasdaqprueba, 04-09-2024, 09:52 AM
|
6 responses
30 views
0 likes
|
Last Post Today, 02:15 AM | ||
Started by PaulMohn, Today, 02:06 AM
|
1 response
8 views
0 likes
|
Last Post
by PaulMohn
Today, 02:12 AM
|
||
Started by Mindset, Today, 01:27 AM
|
0 responses
6 views
0 likes
|
Last Post
by Mindset
Today, 01:27 AM
|
Comment