Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Data Series, Beginner Question.
Collapse
X
-
Data Series, Beginner Question.
New to working with NT. I had a question that I assume there is a very simple answer to, but I am unable to figure out. I am creating a strategy that trades on 30 min. bars. However, I want to add an EMA rule based on daily data, such as only go long when the 14 day EMA is above the 50 day EMA. I am having troubles getting this rule to work, since the indicator defaults to the data series being used in the strategy developer and charting, i.e. the 30 minute bars. There has to be an easy answer I am missing. Thanks.Tags: None
-
Originally posted by thebluescout View PostNew to working with NT. I had a question that I assume there is a very simple answer to, but I am unable to figure out. I am creating a strategy that trades on 30 min. bars. However, I want to add an EMA rule based on daily data, such as only go long when the 14 day EMA is above the 50 day EMA. I am having troubles getting this rule to work, since the indicator defaults to the data series being used in the strategy developer and charting, i.e. the 30 minute bars. There has to be an easy answer I am missing. Thanks.
-
Hello thebluescout,
Thank you for your post.
You will need to add an additional time frame to the code and then use BarsArray as the Input Series of the Indicator. For example:
Code:Add(PeriodType.Day, 1); ... if(EMA(BarsArray[1], 14)[0] > EMA(BarsArray[1], 50)[0]) { // Do something. }
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by DJ888, Yesterday, 10:57 PM
|
0 responses
6 views
0 likes
|
Last Post
by DJ888
Yesterday, 10:57 PM
|
||
Started by MacDad, 02-25-2024, 11:48 PM
|
7 responses
158 views
0 likes
|
Last Post Yesterday, 10:23 PM | ||
Started by Belfortbucks, Yesterday, 09:29 PM
|
0 responses
7 views
0 likes
|
Last Post
by Belfortbucks
Yesterday, 09:29 PM
|
||
Started by zstheorist, Yesterday, 07:52 PM
|
0 responses
7 views
0 likes
|
Last Post
by zstheorist
Yesterday, 07:52 PM
|
||
Started by pmachiraju, 11-01-2023, 04:46 AM
|
8 responses
151 views
0 likes
|
Last Post
by rehmans
Yesterday, 06:44 PM
|
Comment