Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why ADX expect more values than the given interval #697

Open
Aravin opened this issue Jul 5, 2024 · 0 comments
Open

Why ADX expect more values than the given interval #697

Aravin opened this issue Jul 5, 2024 · 0 comments

Comments

@Aravin
Copy link

Aravin commented Jul 5, 2024

With 1 internal

Not working 👎🏽

const adx = new ADX(1);
adx.update({ close: 10, high: 11, low: 9});

NotEnoughDataError: Not enough data

Working 👍🏽

onst adx = new ADX(1);
adx.update({ close: 10, high: 11, low: 9});
adx.update({ close: 11, high: 12, low: 5});

With 3 internal

Not working 👎🏽

const adx = new ADX(3);
adx.update({ close: 10, high: 11, low: 9});
adx.update({ close: 11, high: 12, low: 5});
adx.update({ close: 12, high: 13, low: 2});


NotEnoughDataError: Not enough data

Working when I pass 5 values 👍🏽

const adx = new ADX(3); 
adx.update({ close: 10, high: 11, low: 9});
adx.update({ close: 11, high: 12, low: 5});
adx.update({ close: 12, high: 13, low: 2});
adx.update({ close: 14, high: 15, low: 1});
adx.update({ close: 15, high: 16, low: 1});

My understanding must be wrong, please explain.

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

No branches or pull requests

1 participant