joeldg / bowhead

PHP trading bot framework
Apache License 2.0
800 stars 288 forks source link

Inverted adx #20

Open lploumen opened 7 years ago

lploumen commented 7 years ago

Hi, Following article 1 and checking code at the same time, it says :

Average directional movement index (ADX) is a trend indicator that typically returns a number from 0–100, under 20 it indicates a weak trend, over 50 it indicates a strong trend. Bowhead returns a -1 for under 20 and a 1 for over 50;

But in :

https://github.com/joeldg/bowhead/blob/master/app/Util/Indicators.php#L783

It looks like it is inverted, is it intended ?

rxmg-joeldg commented 7 years ago

Yes.

Good catch

note the note TODO, this one needs more research for the returns

In this case ADX is being used as an overbought/underbought indicator and not a trend indicator, which is what it should be used as ...

When ADX was added, I didn't have the other trend indicators so I was figuring out what to do with it and this should be changed to work with those.

I will made that change...

-joel

On Thu, Aug 3, 2017 at 11:51 PM, Loic Ploumen notifications@github.com wrote:

Hi, Following article 1 and checking code at the same time, it says :

Average directional movement index (ADX) is a trend indicator that typically returns a number from 0–100, under 20 it indicates a weak trend, over 50 it indicates a strong trend. Bowhead returns a -1 for under 20 and a 1 for over 50;

But in :

https://github.com/joeldg/bowhead/blob/master/app/Util/Indicators.php#L783

It looks like it is inverted, is it intended ?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/joeldg/bowhead/issues/20, or mute the thread https://github.com/notifications/unsubscribe-auth/AOT1lQ25PgUazgrDnNoIu-oaIv8gpNCnks5sUr9fgaJpZM4OtV5u .

-- Joel De Gan Vice President of Technology


Mobile: (646) 724-0451 Email: joeldg@rxmg.com Skype: joel-dg

2320 Abbot Kinney Blvd, Suite A Venice, CA 90291 www.RxMG.com http://www.rxmg.com/