If I have a chart with multiple dataseries, how would I programatically tell my indicator that it should appear on my second Input Series? I think I have found code examples for specifying the dataseries that an indicator applies to when adding it to a stratgey, but how can I tell the indicator to do a draw action on my second dataseries as opposed to the first dataseries?
Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Input Series of An Indicator
Collapse
X
-
Input Series of An Indicator
Nevermind - I think I found the answer in the Multi-Time Frame and Instrument docs. I need to add another bars object in the initialize method. Thanks!
If I have a chart with multiple dataseries, how would I programatically tell my indicator that it should appear on my second Input Series? I think I have found code examples for specifying the dataseries that an indicator applies to when adding it to a stratgey, but how can I tell the indicator to do a draw action on my second dataseries as opposed to the first dataseries?Last edited by dkrumholz; 04-22-2011, 04:16 PM.Tags: None
-
Draw Arrow on Second Timeframe
I want a chart with the same instrument on two different timeframes. I want my indicator to draw arrows on the second time frame.
I can add the second timeframe to the chart interactivly using the chart's Data Series selection and I can add an indicator and interactively, using the indicators Data - Input series property, get arrows displayed on the second timeframe.
The problem is - how to accomplish adding the second timeframe and drawing the arrows programatically on the second timeframe bars without the interactive steps.
Given a chart with an instrument and its Data Series, can I add an indicator that programtically adds the second timeframe and draws arrows over the second set of bars?
I thought it could be done by adding the second series in the initialize method and then testing BarsInProgress for my drawing. That doesn't seem to work.Last edited by dkrumholz; 04-23-2011, 04:32 AM.
Comment
-
Hello,
Thanks for the note.
What you would need to do is draw the objects in the BarsInProgress == 0. But reference the values you want to draw from from the secondary series.
SMA(BarsArray[1], 14);
Use the above example to get the bars objects of the secondary series and use its value instead to draw at.
Let me know if I can be of further assistance.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by lightsun47, Today, 03:51 PM
|
0 responses
4 views
0 likes
|
Last Post
by lightsun47
Today, 03:51 PM
|
||
Started by 00nevest, Today, 02:27 PM
|
1 response
8 views
0 likes
|
Last Post
by 00nevest
Today, 03:48 PM
|
||
Started by futtrader, 04-21-2024, 01:50 AM
|
4 responses
44 views
0 likes
|
Last Post
by futtrader
Today, 03:01 PM
|
||
Can someone turn this thinkscript into a ninjascript. 5PM CST OHL and Previous Day
by Option Whisperer
Started by Option Whisperer, Today, 09:55 AM
|
1 response
13 views
0 likes
|
Last Post
by bltdavid
Today, 02:44 PM
|
||
Started by port119, Today, 02:43 PM
|
0 responses
8 views
0 likes
|
Last Post
by port119
Today, 02:43 PM
|
Comment