Download MetaTrader 5

Catch a sharp angle and closer lines in Stochastic Oscillator

To add comments, please log in or register
Hi guys,

I have a serious problem and I don't think I could handle it myself without any help :(. I would be very grateful if someone could give me even something to read because I don't know where to start...
I'm writing a MQL4 indicator and I stuck on one case. What I need to do, in the first place, you can see it on the picture:

example 1 

1) First I start from 1 to 2 - Here I need to make a check if the two lines (Stochastic main line(blue) and signal line(pink)) are rising sharply upwards and are as close to each other. The same thing I need to do from 2 to 3 but downwards (sorry about the example I hadn't enough space for the "2" - I hope it is clear what I mean). 

2) After that I need to check if there is a sharp angle at 2 (It isn't the sharpest angle in my example, but you can see it in the second picture) - I know it sound ridiculous but it is part of the strategy which I'm trying to implement.

I have two main problems. The first one is that my indicator is dependent on MT4 scale/zoom. For example - if I resize the indicator window my angle gets sharper and my lines closer:

 example 2

For this case I read that it is better to use "slope" instead of "angle". Am I right?

If I have to be honest with you I have no idea how the hell is possible to catch a sharp angle in Stochastic Oscillator or even to catch an angle, because there might not be one. Is it possible at all? It's easy to do that just with an eye but with MQL4? Is there any relationship with the main chart or with the values of the Stochastic Oscillator which I can use to catch an angle?

My second problem is in some part related with the first one - I think that if i can find some type of relationship I might be able to solve my problem with finding closer lines.

I don't think it's impossible - there is a way... Will it be easy? Nope! Worth it? Absolutely. :)



An angle requires distance/distance a unitless number. A chart has price/time, (the stochastic has n/time.) What is the angle of going 30 miles in 45 minutes? Meaningless!
You can get the slope from a line. Delta price/ delta time. Changing the axes scales changes the apparent angle, the slope is constant. Angle is meaningless.
To add comments, please log in or register