Thanks in advance!!
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
Strategy Data Series
Collapse
X
-
Strategy Data Series
Can I reference standard candles and renko bars in the same strategy? If so, how?
Thanks in advance!!Tags: None
-
Hi RiversideDude,
Yes, you can reference multiple bar types in a strategy including Renko.
AddRenko(string instrumentName, int brickSize, MarketDataType marketDataType)
Please see the help guide on AddRenko() and Add().
AddRenko() - http://ninjatrader.com/support/helpG...7/addrenko.htm
Add() - http://ninjatrader.com/support/helpGuides/nt7/add3.htmChelsea B.NinjaTrader Customer Service
-
So once I have both data series, I want to add moving averages and MACD based on both of them. Is there an example of how to do that?
Thanks in advance!
Comment
-
Hello RiversideDude,
Use the BarsArray with the proper index as the input series for the indicator call.
Below is a link to the help guide on the SMA.
http://ninjatrader.com/support/helpG...simple_sma.htm
And a link to the help guide on BarsInProgress.
http://ninjatrader.com/support/helpG...inprogress.htmChelsea B.NinjaTrader Customer Service
Comment
-
Is there an option to leave the instrument name blank when you use AddRenko()? I want it to default to the instrument of the chart that it's running against.
Thanks!!Last edited by RiversideDude; 04-21-2016, 04:20 PM.
Comment
-
Hello RiversideDude,
No, you must supply the Instrument name.
Below I am providing a link to the help guide on AddRenko() which lists all overloads that you can use.
http://ninjatrader.com/support/helpG...7/addrenko.htm
To supply the primary instruments name use Instrument.FullName.Chelsea B.NinjaTrader Customer Service
Comment
-
-
When you add a strategy to a chart is there a way to NOT have it process historical bars and only process bars closed going forward?
Thanks!!
Comment
-
I added the attached strategy to a chart and I expected the output for each data series to be the same but it wasn't. Why not?
Thanks!!Attached Files
Comment
-
Originally posted by RiversideDude View PostI added the attached strategy to a chart and I expected the output for each data series to be the same but it wasn't. Why not?
Thanks!!
You really need to read this:
Comment
-
Ok, I read through it. It answered one of my questions, but not why the data series aren't showing the same data. I'm creating a 15 minute chart with an additional 15 minute data series just so that I can learn how it loops through the array.
Maybe it doesn't matter, the first 5 to 6 digits to the right of the decimal are the same.
Thanks!!Last edited by RiversideDude; 04-21-2016, 09:35 PM.
Comment
-
Originally posted by RiversideDude View Post
Maybe it doesn't matter, the first 5 to 6 digits to the right of the decimal are the same.
Thanks!!
NT_CB mentioned this, but I saw nothing in your posted code about this:
Comment
-
Please don't reply to anymore of my questions sledge. Your response seems unprofessional and rude. Keep in mind that I'm trying to learn your system so that I can eventually give you my money!
Thanks!!
Comment
-
Hi RiversideDude,
I just want to be clear about what you are viewing and your environment.
On the chart, a 15 minute series is selected correct?
In the script there is an Add(PeriodType.Minute, 15); and no other Add calls, is this correct?
Are you printing the values of the Close[0] to the output window with the Time[0] of the bar?
What is the output you are getting in your output window?
Attached is a script I have made to test this as well as the output I have received. I am finding that the prints on the ES 06-16 are the same for both series.
(NinjaTrader will not actually create a new series if the instrument and interval match an existing series. Instead it will re-use the existing series to be more efficient. This means the values should be the same)
Can I have you show me the code you are testing and the output you are getting?
On a small note, sledge is a community member who is attempting to assist you but does not represent NinjaTrader Support.Chelsea B.NinjaTrader Customer Service
Comment
-
First let me say, I have lots of programming experience, I'm just new to NT. I have 2k lines in TS II that I want to convert over.
So I created the strategy and I add it to a chart with the same data series (AUD/JPY, 15 minutes bid) I was just testing to see that my understanding of how NT was looping through the array was correct. When I printed the values I expected them to be exactly the same but they weren't, so that's why I asked.
So yes, no other ADD() and it was a 15 minute chart. I only trade currencies.
I attached my code to my earlier post. And the output showed different values for the SMA(20) even though the dataseries was the same.
Is there a way to find out which bar is actually being processed?
Ok, I thought he worked for NT.
Thanks ChelseaB!!Last edited by RiversideDude; 04-22-2016, 12:28 PM.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by rbeckmann05, Yesterday, 06:48 PM
|
1 response
12 views
0 likes
|
Last Post
by bltdavid
Today, 05:43 AM
|
||
Started by llanqui, Today, 03:53 AM
|
0 responses
6 views
0 likes
|
Last Post
by llanqui
Today, 03:53 AM
|
||
Started by burtoninlondon, Today, 12:38 AM
|
0 responses
10 views
0 likes
|
Last Post Today, 12:38 AM | ||
Started by AaronKoRn, Yesterday, 09:49 PM
|
0 responses
15 views
0 likes
|
Last Post
by AaronKoRn
Yesterday, 09:49 PM
|
||
Started by carnitron, Yesterday, 08:42 PM
|
0 responses
11 views
0 likes
|
Last Post
by carnitron
Yesterday, 08:42 PM
|
Comment