#region Variables
private string cross = "$EURGBP";
#endregion
protected override void Initialize()
{
Add([B]cross[/B], PeriodType.Minute, 60); // BarsArray[1]
}
#endregion
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
how to declair the Secondary Time Frame Instrument?
Collapse
X
-
how to declair the Secondary Time Frame Instrument?
I am wondering if it's possible to add another Bars object for a different instrument to the script, where the instrument can be declared in Parameters field in Strategy Analyzer. I am trying something like this, it compiles fine, but doesn't work, when I launch Strategy Analyzer and try to select the strategy I am unable to select my strategy. Support please could you indicate me the correct way to do this?
I noticed that it I change the instrument name in the Add() section to "$EURGBP" it works fine;Code:Last edited by yades; 08-15-2013, 05:47 AM.Tags: None
-
Mine was a typo, I am already using $ infront. But my query was another: what syntax should i use in the add() field to be able to type different string value in the parameter section in market analyser?
Originally posted by NinjaTrader_Bertrand View Postyades, I would not expect either to work honestly, as the FX instruments would need to be prefaced by a $ sign, so please try with $EURGBP
Comment
-
Oh ok, I see - to be able to make this a user input please check into this link - http://www.ninjatrader.com/support/f...ead.php?t=5782
What you seek would be user input of type String.
Comment
-
Bertrand this doesnt help.
I am trying to input a string value in the Add() field. Please read again my first post. Its all in there. My string varaible is declaired correctly, what i need to know is how to make it properly work in the Initialize() section
Originally posted by NinjaTrader_Bertrand View PostOh ok, I see - to be able to make this a user input please check into this link - http://www.ninjatrader.com/support/f...ead.php?t=5782
What you seek would be user input of type String.
Comment
-
All solved, i was missing the $ in the variable section, thanks for your helpOriginally posted by NinjaTrader_Bertrand View PostAlright, lets take it a step back, though you wanted more flexibility by not hardcoding the instrument in.
Do you get any errors in the NT log tab running your script? Do you have a CurrentBars check in for both series?
http://www.ninjatrader.com/support/h...ub=CurrentBars
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
651 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
370 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
109 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
574 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
577 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment