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 Waxavi, Today, 02:10 AM
|
0 responses
3 views
0 likes
|
Last Post
by Waxavi
Today, 02:10 AM
|
||
Started by TradeForge, Today, 02:09 AM
|
0 responses
7 views
0 likes
|
Last Post
by TradeForge
Today, 02:09 AM
|
||
Started by Waxavi, Today, 02:00 AM
|
0 responses
2 views
0 likes
|
Last Post
by Waxavi
Today, 02:00 AM
|
||
Started by elirion, Today, 01:36 AM
|
0 responses
4 views
0 likes
|
Last Post
by elirion
Today, 01:36 AM
|
||
Is it possible to have a drawing, such as a line, cycle through different colors?
by gentlebenthebear
Started by gentlebenthebear, Today, 01:30 AM
|
0 responses
4 views
0 likes
|
Last Post Today, 01:30 AM |
Comment