As for the ZeroLagMACD, there were errors in the code you provided. It says "The name 'macdAvg2' does not exist in the current context". This error appears 4 times and I was unable to resolve it. Any ideas?
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
Zero Lag MACD - programming hint
Collapse
X
-
Here is the LeaderOfMACD indicator. Do you have any insight on its intended use? If so I can include it in the description and post it in the file sharing section. It looks extremely useful!
As for the ZeroLagMACD, there were errors in the code you provided. It says "The name 'macdAvg2' does not exist in the current context". This error appears 4 times and I was unable to resolve it. Any ideas?
-
That did the trick!
This is so much better than the regular MACD. I never use the default values, but rather use a higher slow period and a gigantic smooth value to avoid wipsaws, and this really cuts down on the lag.
If I get a chance later today, I think I'll play around with the code a little more and add the ability to use different MA types...
Now I'm curious what a 'ZeroLagLeaderOfMACD' would look like.
I can't wait for NT7 when the InputSeries parameter is available outside of the strategy wizard, 'cause its a real pain having to recode every indicator I want to use smoothed data with...
Anyway, I hope people find this useful. I'll write a description and add it to the file sharing section later today...Attached Files
Comment
-
Good. For the ZeroLag just replace all EMAs in the code with ZeroLagEMA. It's real simple. Look here http://www.traders.com/S&C_homepg.html next month to see what they say. As said, it's not out yet but a couple of programs already have this indicator so I thought I'd see what it does and/or if it is useful.
For the JMA here are 2 pictures just to give you an idea: they are all 50 MA: blue solid = EMA; blue dash = SMA; orange = ZeroLagEMA; red =JMA with phase +100 and green = JMA ith phase -100 (these are the 2 extremes but you can put in any number from -100 to +100.
For the other picture I put in various DM which have been smoothed using T3 and zeroLagEMA (since you said you tried this) the Jurik DMX, a DM smoothed with a JMA and finally the DM. For the DMX I removed the DM+/DM- which are represented here by the DMX line which oscillates around the 0. Although the DM and DMX is a nice indicator, it becomes dangerous when you get a bad tick => see on the chart the 28th at about 20:55. See that huge uptick ? I think that's probaby a bad tick and see how the DM and the DMX immediately jump up. It might be an idea to try and smooth the DMX as well, which would probably remove this. To me, if you were to try and built an automatic system this would disqualify this indicator.....
Comment
-
Thanks for the screenshots. The JMA looks considerably better than the other average types.
Judging by the DM screenshots, the ZeroLagEMA version seems about as quick as the Jurik and the T3 looks about as smooth. I think I might try a ZeroLagEMA DM using a T3 with a smooth of 2-3 as the input. I think it would be really close. I still plan to get the Jurik indicators, but would like to be able to get as close as possible with open source indicators first.
Also, I made a ZeroLagLeaderOfMACD and found it useful although it benefits greatly from presmoothing the data a bit...
Comment
-
here's the revised version that colors the macd-avg line red/green or leaves it blank based on rise/fall.
cheers,
-eAttached Files
Comment
-
Comment
-
Comment
-
This is a known bug in NT that arises when one indicator uses another and they have conflicting settings for CalcOnBarClose in their Initialize() methods.
The solution is to edit all your .cs files and remove the CalcOnBarClose lines from Initialize()
(or set all indicators to CalcOnBarClose = false, which is what I have done)
Comment
-
Originally posted by sefstrat View Post(or set all indicators to CalcOnBarClose = false, which is what I have done)
Edit the ZeroLag-EMA and set on Line 34 the CalculateOnBarClose from true to false .
Then compile and save and hope that it works .
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Aviram Y, Today, 05:29 AM
|
0 responses
1 view
0 likes
|
Last Post
by Aviram Y
Today, 05:29 AM
|
||
Started by quantismo, 04-17-2024, 05:13 PM
|
3 responses
25 views
0 likes
|
Last Post Today, 05:23 AM | ||
Started by ScottWalsh, 04-16-2024, 04:29 PM
|
7 responses
34 views
0 likes
|
Last Post Today, 05:15 AM | ||
Started by cls71, Today, 04:45 AM
|
0 responses
5 views
0 likes
|
Last Post
by cls71
Today, 04:45 AM
|
||
Started by mjairg, 07-20-2023, 11:57 PM
|
3 responses
216 views
1 like
|
Last Post
by PaulMohn
Today, 04:22 AM
|
Comment