Here's the macd sample converted into a simple stochastic sample that buys when it breaks oversold(30) level sells overbought(70) level etc.
Maybe it'll help.
Cheers.
Files:
stoch_sample.txt
6 kb

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I have multiple criteria for a trade signal that can occur with in a certain number of bars from each other. For example, on the hourly time frame, the stocastics show over bought at 1pm and I want to allow 3 more hourly bars to produce the second criteria (say a moving cross over at 4pm) before the stocastic signal is no longer valid. How do I code this? I was thinking of using an array but I am not sure if that would be best. Any code samples would be very helpful as I am new to MQL4. Thank you.