I have converted Ehlers Phase Calculation from EasyLanguage to Ninjatrader (C#). I also converted all the degrees to radians with is the .net default. However, the output is not what I expect. Would someone be as kind to review my code to see where I went wrong? I provided a link of the Phase Calculation EasyLanguage code.
Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.
Need help? 1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first. 2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses. 3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make. 4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance. 5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers. 6) Help using the forum? Watch this video to learn general tips on using the site.
If you want to support our community, become an Elite Member.
Favorite Futures: Gameplay Klownbine® Trading of Globex
Posts: 1,276 since Jul 2009
Thanks: 1,227 given,
Corrected code for Phase indicator
I wasn't pleased with the way this was coded. So I fixed it.
This version will probably run better on COBC false than the original did on COBC true.
It will accept inputs other than the Close (ie Median, Weighted, Typical, etc)
And I got rid of the annoying and dopey comments that the Ninjascript Indicator Wizard puts in. Really guys, you don't need that stuff. It's embarrassing.
See if you can figure out why I made these changes. The operations that I removed were totally unnecessary. And you don't need to calculate the value of 2*Pi over and over again on every bar, it will always be the same. How utterly ridiculous.
I tested it in Market Replay. It plots the same as the original.
I did this for the fun of it. Since I have an Intergalactic Media Empire, I don't need to worry about whether this indicator will actually make me any money.
"If we don't loosen up some money, this sucker is going down." -GW Bush, 2008
“Lack of proof that something is true does not prove that it is not true - when you want to believe.” -Humpty Dumpty, 2014
“The greatest shortcoming of the human race is our inability to understand the exponential function.” Prof. Albert Bartlett
Last edited by Zondor; December 29th, 2012 at 04:58 AM.
The following 2 users say Thank You to Zondor for this post: