KDJ Indicator

Here you can post and download custom indicators. PLEASE: Do not start topics unless you are posting your own indicator, they will be moved to appropriate section even if you do.

Moderator: admin

KDJ Indicator

Postby Alexander.Gettinger » Wed Jun 09, 2010 4:11 am

K line is :
K = ((Current Close – Lowest Low) / (Highest high – Lowest low))* 100

D is simple moving average of the K line. Usually D is 3 day simple moving average of K line but it depends on what trader wants to choose. We have used exponential average.
D = N day simple moving average of K line

‘J’ is the divergence of ‘D’ value from the ‘K’ value.
J = (3*D) – (2*K)

An example of a strategy rules:

Buy – When ‘J’ line crosses above the 50 mark
Sell – When the ‘J’ line crosses below the 50 mark

KDJ.png


KDJ.lua
(2.2 KiB) Downloaded 3297 times

KDJ Averages.lua
(7.21 KiB) Downloaded 1074 times

Averages indicator can be found here.
viewtopic.php?f=17&t=2430&hilit=averages

The indicator was revised and updated
Alexander.Gettinger
FXCodeBase: Confirmed User
 
Posts: 3785
Joined: Wed Mar 31, 2010 9:40 pm
Location: Russia, Omsk

Re: KDJ Indicator

Postby leonala » Fri Jun 03, 2011 2:11 am

Thanks very much. It's really useful.
Moreover, seems the J value calculated by the indicator is incorrect. J =3*K-2*D, but in lua file it's 3*D-2K.....
leonala
 
Posts: 6
Joined: Wed May 11, 2011 12:22 am

Re: KDJ Indicator

Postby Apprentice » Fri Jun 03, 2011 2:34 am

I checked.
The formula is same.

Mq4
percentJ[i] = 3 * percentD[i] - 2 * percentK[i];

Lua
buff_J[period]=3.*buff_D[period]-2.*buff_K[period];
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 29946
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: KDJ Indicator

Postby leonala » Fri Jun 03, 2011 4:17 am

Thanks for reply.
I misunderstand the definition of J value, both of 3K-2D and 3D-2K are okay, and the accuracy of each one depends on market.
Thanks again.
leonala
 
Posts: 6
Joined: Wed May 11, 2011 12:22 am

Re: KDJ Indicator

Postby Apprentice » Sun Mar 12, 2017 6:08 pm

Indicator was revised and updated.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 29946
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: KDJ Indicator

Postby weijing » Fri Jul 02, 2021 11:44 pm

dear apprentice:
the indicator works abnormally. the reason is that the formula given is incorrect. will yoou please revise the indicator again? following this formula:

RSV = ((Current Close – Lowest Low<in 9 periods>) / (Highest high<9> – Lowest low<9>))* 100

K line is 3 periods simple averrage of the RSV data .
K = N day simple moving average of RSV

D line is simple moving average of the K line. Usually D is 3 day simple moving average of K line depends on what trader wants to choose.
D = N day simple moving average of K line

‘J’ line is the divergence of ‘D’ value from the ‘K’ value.
J = (3*K) – (2*D)
weijing
 
Posts: 5
Joined: Thu Mar 19, 2020 5:28 am

Re: KDJ Indicator

Postby Apprentice » Sun Jul 04, 2021 4:03 am

Your request is added to the development list.
Development reference 612.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 29946
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia



Return to Custom Indicators

Who is online

Users browsing this forum: Google [Bot] and 5 guests