Phase Calculation - NinjaTrader Programming | futures io social day trading
futures io futures trading


Phase Calculation
Updated: Views / Replies:1,939 / 7
Created: by eleven Attachments:3

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors – all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you don’t need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

Phase Calculation

  #1 (permalink)
Elite Member
California, USA
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Kinetick
Favorite Futures: Currency Futures
 
Posts: 29 since Jul 2009
Thanks: 16 given, 75 received

Phase Calculation

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.

Trader-Online.tk® - TradeStation™ Zone - Phase Calculation by John Ehlers

This indicator should oscillate between the range of 0 and 360 degree's.

Thanks.

Attached Files
Register to download File Type: cs Phase.cs (7.9 KB, 28 views)
Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,357 given, 83,238 received




Mike

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.

Reply With Quote
 
  #4 (permalink)
Elite Member
San Diego, California
 
Futures Experience: Intermediate
Platform: Sierra Chart
Broker/Data: IB, OEC, Optimus, DDT
Favorite Futures: ES, ZN
 
Posts: 221 since Jun 2010
Thanks: 513 given, 157 received


eleven View Post
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.

Trader-Online.tk® - TradeStation™ Zone - Phase Calculation by John Ehlers

This indicator should oscillate between the range of 0 and 360 degree's.

Thanks.

I don't know both languages, so my comment is based on my previous programming experience in other languages.

Is CyclePeriod = DomCycle? If they have the same value, then there is a problem with the "for" loop:

for (int j = 0; j < CyclePeriod - 1; j++)

You may need to change it to:

for (int j = 0; j <= CyclePeriod - 1; j++)

or

for (int j = 0; j < CyclePeriod; j++)

Reply With Quote
The following 3 users say Thank You to omaha786 for this post:
 
  #5 (permalink)
Elite Member
California, USA
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Kinetick
Favorite Futures: Currency Futures
 
Posts: 29 since Jul 2009
Thanks: 16 given, 75 received

omaha,

It works! Thanks for taking a look at this. I will update the indy and post.

Mike,
Thanks for the bump.

eleven

Reply With Quote
 
  #6 (permalink)
Elite Member
California, USA
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Kinetick
Favorite Futures: Currency Futures
 
Posts: 29 since Jul 2009
Thanks: 16 given, 75 received

Long time coming.

I recently revisited this indicator and realized I didn't upload the final version. Here it is. I dusted this off and am looking at using it for an exit for a strategy I'm working on.

Attached Files
Register to download File Type: cs Phase.cs (7.9 KB, 17 views)
Reply With Quote
The following user says Thank You to eleven for this post:
 
  #7 (permalink)
Elite Member
Portland Oregon, United States
 
Futures Experience: Beginner
Platform: Ninjatrader®
Broker/Data: CQG, Kinetick
Favorite Futures: Gameplay Klownbine® Trading of Globex
 
Zondor's Avatar
 
Posts: 1,327 since Jul 2009
Thanks: 1,246 given, 2,635 received

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.

Phase2.cs

"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 05:58 AM.
Reply With Quote
The following 2 users say Thank You to Zondor for this post:
 
  #8 (permalink)
Elite Member
California, USA
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Kinetick
Favorite Futures: Currency Futures
 
Posts: 29 since Jul 2009
Thanks: 16 given, 75 received

Right on. Thanks Zondor.

Reply With Quote

Reply



futures io > > > > > Phase Calculation

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Risk Reward calculation baruchs Psychology and Money Management 7 June 15th, 2011 02:06 AM
CUMMULATIVE RSI CALCULATION ShruggedAtlas NinjaTrader Programming 3 June 13th, 2011 08:07 PM
Pivot Point Calculation trendisyourfriend Traders Hideout 54 May 31st, 2011 10:14 AM
d9PO phase setting? Tiberius The Elite Circle 5 March 28th, 2011 02:14 PM


All times are GMT -4. The time now is 02:56 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2017-12-18 in 0.11 seconds with 20 queries on phoenix via your IP 54.92.194.75