It should be a 2-in-1. If you set showRatio to true it will do what the ratio version was doing. If you choose If you set showRatio to false it will do what effective indicator was doing. If this version is OK then alerts are easy
mladen - many thanks - the logic of the two in one indicator is good. I haven't been through the maths, but one thing I have noticed straight off. If you look at the large volume and small volume (and the same for the effective ratio - i.e. small ratio vs large ratio) the lines/values are the same (they are however different to the total - as they should be). Not sure why this would be?
if (MathAbs(tmp4) < avgVol)
if (showSmall) Buffer2 += tmp4;
else if (showLarge) Buffer3 += tmp4;
if (showSmall) Buffer2 += tmp4;
please add alert to this indicator
Just an idea : why don't you use the simplest solution : since stochastic is ranging from 0 to 100 you can easily place as many stochastic indicators in one sub-window as you wish. For that purpose you can use the indicator you already mentioned (from this post : https://www.mql5.com/en/forum/180648/page243 ) and that way you can have an unlimited number of combinations. For example, the 7,3,3 - 14,3,3 and 21,3,3 combination would look like this in that case :
So, all you have to do is to drag the stochastic)s) that already has an alert into the same window and you can have as many of them as you wish (you would not depend on drawing buffers limitation)
A suggestion : If you have the original source code, post that. I doubt that someone add alerts to a decompiled code
Woov Mladen !
Truly you reflect the character on your avatar trying to help everyone.What is the character called on your avatar ?
Mr Bean (according to my younger daughter) :):)
Thank you for your suggestion. I do currently have that setup and it does works fine for me. My intentions though is to have this configuration combined into one indicator with alerts when all three settings reach the overbought and oversold levels so that it takes away the visual of having to sit in front of the pc and waiting for a signal. The current setup does not afford me that opportunity and I would also be able to place trades during the day while at work if I were to receive any signals via my cell phone. So this is my dilema at this time. Thank you for taking the time to respond. You are doing great work here and we all appreciate you.
mladen - i tried changing the code to buffer2 and 3 from 7 and 8 as above, but that produced no results - so maybe you meant something else. Perhaps it might be easier to put into a revised indicator. What I would say is that the original code may not be 100% correct in its logic (which is why i came to you!!!).
To clarify my last statement, I have looked at your code for the effective ratio (that I am presuming is buffer 6 (total ratio),7(small ratio) and 8(large ratio), but I am not convinced that we previously had the right equation. The effective ratio should be:
positive effective volume - negative effective volume for a period of time (say 30 bars)
and then you divide this by the total volume (i.e. volume in metatrader) for that period of time.
For further clarification, positive effective volume refers to the total of those bars where there was firstly an effective volume (as there is only an effective volume where the volume has moved the price) and where that volume was was more than 0. Negative effective volume - vice versa. This effective volume can then be split into total, large or small
If this doesn't match what the indicator should be showing - then it would need to be adjusted.
many thanks again from all of us hoping to use this!
Try this version out. It has that part simplified and it is very easy now to add any code or to alter it as you wish in it. Also, I find that now the "large" is giving rather interesting values (see the example). Check it out and I think you will find it easy to adjust the code now to any idea you have about it
Please enable the necessary setting in your browser, otherwise you will not be able to log in.