Skip to content
This repository has been archived by the owner on May 12, 2019. It is now read-only.

aroon indicator calculation #187

Closed
rrphotosoft opened this issue Sep 1, 2017 · 6 comments
Closed

aroon indicator calculation #187

rrphotosoft opened this issue Sep 1, 2017 · 6 comments

Comments

@rrphotosoft
Copy link

rrphotosoft commented Sep 1, 2017

Hi,
Aroon indicator calculation produces unexpected result:
Consider this timeseries

TimeSeries ts = new TimeSeries();
for(int i = 0; i < 100; i ++){
	ZonedDateTime zdt = ZonedDateTime.now().plusDays(i);
	Tick t = new Tick(zdt, Decimal.valueOf("NaN"),Decimal.valueOf("NaN"),Decimal.valueOf("NaN"),Decimal.valueOf("NaN"),Decimal.valueOf("NaN"));
	ts.addTick(t);
}

Attempting to calculate a 25 day aroon up indicator:

AroonUpIndicator aru = new AroonUpIndicator(ts, 25);
for(int i = 0; i  < 100; i++){
    System.out.println(String.valueOf(i) + ":" + std.getValue(i));
}

It prints 0 for every tick.
A value of 0 in aroon terminology is generally a strong bearish sign.
A similarly unexpected result is noted on RSI (built on the close price indicator), with the value being 100 on every tick, and zero on the first tick.

Could you please add your thoughts on this.

Best Regards,
RR.

@mdeverdelhan
Copy link
Owner

Sorry but no. You are in a limit case.
Reading the code and debugging, try to find out in which way the calculations are incorrect AND if a change would be relevant. Do not hesitate to make a pull request if you are able to fix those indicators.

@rrphotosoft
Copy link
Author

Hi,
Thanks for you reply, I will get back to you with a pull request.
Best Regards,
RR.

@dpalic
Copy link

dpalic commented Sep 15, 2017

@rrphotosoft do you have any updates on this issue?
Since this repository was dropped, we have moved to a new organisation. See #192
Could you please repost your question there, if it is still needed? https://github.com/ta4j/ta4j
If not, could you do me a favour and close this issue here?

@rrphotosoft
Copy link
Author

Hi,
Unfortunately the issue cannot be closed. The indicator is calculated even when null values are provided for the prices.
I am working on refactoring the relevant code , but it is complicated.
I will need more time, perhaps till the end of september.
@dpalic

@team172011
Copy link
Contributor

@rrphotosoft please continue this discussion on the new repository. You can also open a new issue and make a pull-request to the develop branch

@mdeverdelhan
Copy link
Owner

Closed. @rrphotosoft Please make your future PR in the new repository https://github.com/ta4j/ta4j. (and good luck)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants