GT
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
Indicator of Indicator
Collapse
X
-
Indicator of Indicator
I have an indicator of an indicator showing on a chart just fine. When I add the same indicator of an indicator into a strategy it gives different results. Is there something I am missing or that must be done to use an indicator of another indicator in a strategy? Thanks!
GTTags: None
-
Hi GT,
Indicators and strategies both work from bar objects, so you should generally expect the values to match up, provided everything is the same (session template, days to load, etc) between the chart and the strategy accessing the value.
The best way to line these up is apply your strategy directly to the chart. You can add your nested indicator in the strategies Initialize() method, and then the visuals should be similar to if you added the indicator through the right click > indicators screen.
If you're seeing a discrepancy, can you attach the indicator script you're working with? We can then give a run here and compare.Ryan M.NinjaTrader Customer Service
-
OK, when I add a ZeroLagTEMA of a custom indicator to the chart it is written as:
Code:ZeroLagTEMA(myIndicator(5, Length).BuySignal, 50).ZeroTEMA[0]
GT
Comment
-
HI GT,
See this forum post for help adding indicators to strategies.
You can also build an expression with this indicator using the strategy wizard and then set the plot on chart selection > true. It then places correctly the Add statement needed in Initialize().Ryan M.NinjaTrader Customer Service
Comment
-
Thanks for your help. My broker was able to figure out the issue for me. It appears that I had calculate on bar close set to true in the strategy and once I changed that the values matched up perfect. A learning experience for me and others.
GT
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by frankthearm, Yesterday, 09:08 AM
|
13 responses
45 views
0 likes
|
Last Post
by frankthearm
Today, 01:52 PM
|
||
Started by PaulMohn, Today, 12:36 PM
|
2 responses
16 views
0 likes
|
Last Post
by PaulMohn
Today, 01:48 PM
|
||
Started by Conceptzx, 10-11-2022, 06:38 AM
|
2 responses
53 views
0 likes
|
Last Post
by PhillT
Today, 01:47 PM
|
||
Started by Kaledus, Today, 01:29 PM
|
1 response
4 views
0 likes
|
Last Post Today, 01:53 PM | ||
Started by yertle, Yesterday, 08:38 AM
|
8 responses
37 views
0 likes
|
Last Post
by ryjoga
Today, 01:22 PM
|
Comment