Kaufman Efficiency Ratio (error) - EasyLanguage Programming | futures io social day trading
futures io futures trading


Kaufman Efficiency Ratio (error)
Updated: Views / Replies:246 / 8
Created: by davidcolin Attachments:0

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
 

Kaufman Efficiency Ratio (error)

  #1 (permalink)
Trading Apprentice
Vancouver BC Canada
 
Futures Experience: Intermediate
Platform: TradeStation
Favorite Futures: ES
 
Posts: 7 since Dec 2014
Thanks: 5 given, 2 received

Kaufman Efficiency Ratio (error)

Hi all,

just trying to code the Kaufman Efficiency Ratio in EasyLanguage as below (user function):

****************************************************

Inputs: length(numericsimple);

KaufmanER = absvalue( close - close[length] ) / absvalue( summation( (close - close[1]), length ) ) ;


****************************************************
Problem is I get a floating point invalid operation error when I apply this code. Can anyone help?

TIA!

David

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)
Elite Member
Cary, NC
 
Futures Experience: Advanced
Platform: MC, NT, Python, R
Broker/Data: FXCM, IB, Oanda, IQFeed
Favorite Futures: 6E, CL, EUR/USD
 
Fu510n's Avatar
 
Posts: 96 since Oct 2009
Thanks: 728 given, 78 received


1) what are you passing in for length?
2) is/could the denominator be calculating as 0? (causing a divide by zero error; need to prevent that from happening if so)
3) have you taken a look at the Kaufman Efficiency Ratio indicator code in the D/L section?

Just a thought...

Reply With Quote
 
  #4 (permalink)
Trading Apprentice
Vancouver BC Canada
 
Futures Experience: Intermediate
Platform: TradeStation
Favorite Futures: ES
 
Posts: 7 since Dec 2014
Thanks: 5 given, 2 received

Hi Fu510n....thanks for your response.

1. My coding ability is fairly rudimentary and as such I don't understand what "passing in for length" means. :/
2. Looks like it is a divide by zero error because I added the alternative:

Inputs: length(numericsimple);

If absvalue( summation( (close - close[1]), length ) ) <> 0
then KaufmanER = absvalue( close - close[length] ) / absvalue( summation( (close - close[1]), length ) )
else KaufmanER = 0

The floating point error disappears but the KER just plots as a straight line at 1. I didn't really know what to put for the alternative value....gah

3. I am not able to download that code as it for Elite members only, which I am not.




Fu510n View Post
1) what are you passing in for length?
2) is/could the denominator be calculating as 0? (causing a divide by zero error; need to prevent that from happening if so)
3) have you taken a look at the Kaufman Efficiency Ratio indicator code in the D/L section?

Just a thought...


Reply With Quote
 
  #5 (permalink)
Market Wizard
Houston, TX
 
Futures Experience: Advanced
Platform: XTrader
Broker/Data: Advantage Futures
Favorite Futures: Energy
 
Posts: 2,045 since Dec 2013
Thanks: 1,693 given, 3,204 received
Forum Reputation: Legendary

absvalue(summation()) <> summation(absvalue())

This should work

Inputs: length(numericsimple);

If summation( absvalue( (close - close[1]), length ) ) <> 0
then KaufmanER = absvalue( close - close[length] ) / summation( absvalue( (close - close[1]), length ) )
else KaufmanER = 0

Reply With Quote
The following 2 users say Thank You to SMCJB for this post:
 
  #6 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,462 since Apr 2013
Thanks: 224 given, 835 received

davidcolin,

the solution @SMCJB provided should fix the error. In general you might want to add a similar check to every division you do within any EasyLanguage code, to ensure the divisor is not 0 (it's enough to trigger this error in case it's 0 once on the very first call).

Regards,

ABCTG


davidcolin View Post
Hi all,

just trying to code the Kaufman Efficiency Ratio in EasyLanguage as below (user function):

****************************************************

Inputs: length(numericsimple);

KaufmanER = absvalue( close - close[length] ) / absvalue( summation( (close - close[1]), length ) ) ;


****************************************************
Problem is I get a floating point invalid operation error when I apply this code. Can anyone help?

TIA!

David


Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #7 (permalink)
Trading Apprentice
Vancouver BC Canada
 
Futures Experience: Intermediate
Platform: TradeStation
Favorite Futures: ES
 
Posts: 7 since Dec 2014
Thanks: 5 given, 2 received

Thanks very much you guys. Your kindness and expertise is appreciated. I will try this out later today.

Reply With Quote
 
  #8 (permalink)
Trading Apprentice
Vancouver BC Canada
 
Futures Experience: Intermediate
Platform: TradeStation
Favorite Futures: ES
 
Posts: 7 since Dec 2014
Thanks: 5 given, 2 received

Thank you again. Your revision worked.

Reply With Quote
The following user says Thank You to davidcolin for this post:
 
  #9 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,462 since Apr 2013
Thanks: 224 given, 835 received

@davidcolin,

you are welcome, I am glad to hear that it works for you.

Regards,

ABCTG

Reply With Quote

Reply



futures io > > > > > Kaufman Efficiency Ratio (error)

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Opening Breakouts and Reversals w/Al Brooks

Elite only
 

Introducing daytradr by Jigsaw, new stand-alone platform

Oct 19
 

RandBots: AutoTrading Bots to diversify your trading

Oct 24
 

TopstepTrader: Profiting Without Risking Your Own Money

Oct 26

Building Open Source Indicators for NT8 w/Fat Tails @ Lizard Indicators

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
(Kaufman adaptive moving average + ROC) Strategy Transcode Pharmakon NinjaTrader Programming 1 April 29th, 2016 04:24 AM
Polarized Fractal Efficiency Indicator zentrade Commodities Futures Trading 46 January 20th, 2014 12:30 PM
Kaufman Efficiency Study wireford NinjaTrader 12 August 3rd, 2013 10:36 AM
BM's High efficiency dishwasher ? kbit Jokes 0 July 5th, 2013 01:30 PM
Download Efficiency hunter548 Feedback and Announcements 2 January 4th, 2011 04:27 PM


All times are GMT -4. The time now is 07:26 AM.

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-10-17 in 0.11 seconds with 19 queries on phoenix via your IP 23.20.120.3