Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Multiple instrument chart
Collapse
X
-
Multiple instrument chart
Is there a way to chart multiple instruments (5 or 6) on a chart (or as an indicator) within NT? Ideally as a percentage change from session open or a specified point?Tags: None
-
Hello,
Thanks for your forum post.
This is absolutely possible with a NinjaScript indicator.
You can contact one of our NinjaScript consultants to assist you with coding this or you can use our NinjaScript guide and forums to code this indicator yourself if you are a programmer.
NinjaScript Consultants:
NinjaScript Help Guide:
NinjaTrader Support Forum:
Let me know if I can be of further assistance.
-
i know this is possible i was asking if you guys have one available or if i have to do it myself?
so I take it you do not have one or do not want to share it as you would rather make money on the consulting jobs?
Comment
-
Hello,
Here at NinjaTrader we do not create code for clients as this is what the NinjaScript Consultants are for, NinjaTrader has no ties to NinjaScript consultants.
Please see the following link on how to do this if you want to code it yourself. This is not too bad to code however does involve somewhat involved multi series coding, you need too add in the bar series and simply do any percentage calculation you want to do then output that as a plot.
Samples and INstructions Here:
Let me know if I can be of further assistance.
Comment
-
Hi nightriderx
You may consider this indicator: http://www.ninjatrader.com/support/f...d=1&linkid=270TimNinjaTrader Customer Service
Comment
-
-
Hi, so I got this working like i want on the same instrument as my chart, but when i try to change the instrument to a difft one via parameters it gives me an out of bounds error... any ideas why this would be?
this same exact method is used with indicators that you guys have made in the pairs suite...
Comment
-
actually even when i try the pairs correlation indicator now its not working, gives me a "value outside of valid range" error...
Comment
-
ok. well you were right about not having enough bars, but it doesnt make sense. The indicator is comparing the 10th bar back to the current one, yet i am getting the error if i have less than 2000 bars loaded... how can this be?
Comment
-
#region Variables
private int lookBack = 100;
private string instrument1 = "ZB 12-10";
#endregion
protected override void Initialize()
{
Add(Instrument1, PeriodType.Minute,1);
Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Change"));
Overlay = false;
}
protected override void OnBarUpdate()
{
if (CurrentBar < (LookBack ))
return;
Change.Set((Closes[1][0] - Closes[1][LookBack]) / Closes[1][0]);
}
#region Properties
[Browsable(false)]
[XmlIgnore()]
public DataSeries Change
{
get { return Values[0]; }
}
[Description("")]
[GridCategory("Look Back")]
public int LookBack
{
get { return lookBack; }
set { lookBack = Math.Max(1, value); }
}
[Description("")]
[GridCategory("Instrument")]
public string Instrument1
{
get { return instrument1; }
set { instrument1 = value; }
}
#endregion
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by AaronKoRn, Today, 09:49 PM
|
0 responses
10 views
0 likes
|
Last Post
by AaronKoRn
Today, 09:49 PM
|
||
Started by carnitron, Today, 08:42 PM
|
0 responses
9 views
0 likes
|
Last Post
by carnitron
Today, 08:42 PM
|
||
Started by strategist007, Today, 07:51 PM
|
0 responses
10 views
0 likes
|
Last Post Today, 07:51 PM | ||
Started by StockTrader88, 03-06-2021, 08:58 AM
|
44 responses
3,980 views
3 likes
|
Last Post
by jhudas88
Today, 06:59 PM
|
||
Started by rbeckmann05, Today, 06:48 PM
|
0 responses
9 views
0 likes
|
Last Post
by rbeckmann05
Today, 06:48 PM
|
Comment