Stochastic Oscillator, the beginning - page 31

s5804
7
s5804  

I use close-close.

Your picture demonstrates the 100.0 and 0.0 periods.

Attached is a picture I just made from EUR/USD with stoch 8,3,3 cl-cl setting.

Only the K line is visible.

I can't get my head around why the K line bottom on 0.0 when the recent close is not the lowest low of the period.

Files:
picture.png 37 kb
fxbs
3203
fxbs  
s5804:
I use close-close. I can't get my head around why the K line bottom on 0.0 when the recent close is not the lowest low of the period.

is it not?

hhll & cc:

s5804
7
s5804  

I am guessing the meaning of cl-cl (can't find it in the manual)

cl-cl means that the stock formula is using the highest close and lowest close, instead of the highest high and highest low.

I can verify this with my own calculations of, K% lines with smoothing 1.

However how is the smoothing calculated?

Example,

K% values for 8,3,1 are, 0.6428, 0.5, 0.0

To get the smoothed value for K% 8,3,3 on shall 3 period SMA of K% above.

(0.6428 + 0.5 + 0.0) / 3 = 0.3809

However the Meta Trade 4 chart has the value 0.4285

What am I missing with the smoothing?

s5804
7
s5804  

From the code I now understand how the smoothing is done

while(i>=0)

{

double sumlow=0.0;

double sumhigh=0.0;

for(k=(i+Slowing-1);k>=i;k--)

{

sumlow+=Close[k]-LowesBuffer[k];

sumhigh+=HighesBuffer[k]-LowesBuffer[k];

}

MainBuffer=sumlow/sumhigh*100;

i--;

}

dividing the sum of low with the sum of highs is something else than an SMA.

I am curious is the Meta Trader Stochastic.mq4 very special or is this approach common in most other charting products.

The smoothing seems to be far of from the normal documentation about full stochastic.

THX

fxbs
3203
fxbs  

everyting right with mt4 sto:

stock sto (mt4 custom ind folder) w price cc mod

or u can do:

KFull = iStochastic(NULL,TimeFrame,KPeriod,DPeriod,Slowing,MAMethod,PriceField,Ln1Mode,y); (double iStochastic( string symbol, int timeframe, int %Kperiod, int %Dperiod, int slowing, int method, int price_field, int mode, int shift)
Files:
s5804
7
s5804  
fxbs:
everyting right with mt4 sto:

I agree. Just another endless example of where proper documentation (with beginners in mind) would have helped.

Thanks for bringin me up to speed.

fxbs
3203
fxbs  

most of the time- no documentation whatsoever

like this-https://www.mql5.com/ru/code/9028 nobody knows what it is (and where it came from)

camisa
587
camisa  
fxbs:
most of the time- no documentation whatsoever like this-https://www.mql5.com/ru/code/9028 nobody knows what it is (and where it came from)

it had tried it but it repaints :P

demons19
38
demons19  

Stochastic alert

Not sure if this is somewhere on the site but I'm hoping someone could help me with an alert.

I am using the normal stochastic indicator (14,3,3) and what I would like is to have an alert when both lines are in OB/OS (20/80) at the close of 3 consecutive bars.

Would anyone be able to help?

Thanks

fxbs
3203
fxbs  

average of weighted STO_RSI_CCI_3in1, codebase