- Williams' Percent Range - Oscillators - Indicators - Charts - MetaTrader 5 for Android
- Williams' Percent Range - Oscillators - Indicators - Chart - MetaTrader 5 for iPhone
- Williams' Percent Range - Oscillators - Technical Indicators - Price Charts, Technical and Fundamental Analysis
Good day users,
//--- Mode Standard OSC if (m_mode==0) { double smain=iStochastic(m_symbolname,m_timeframe,m_period_k,m_period_d,m_slowing,m_method,m_pricefield,MODE_MAIN,m_shift); double ssignal=iStochastic(m_symbolname,m_timeframe,m_period_k,m_period_d,m_slowing,m_method,m_pricefield,MODE_SIGNAL,m_shift); double stoch=0; if (smain>100-m_signal && smain<ssignal) stoch=-100+(MathMax(smain,ssignal)*2); else if (smain<m_signal && smain>ssignal) stoch=-100+(MathMin(smain,ssignal)*2); return -stoch; }
This is a snippet of one of my signal classes. It will return a value between +100 (long) and -100 (short) which indicates the strength of the signal, 0 means no signal. It does exactly what you asked for. You just have to change the variable names to your needs, whereby m_signal is the distance to overbought/oversold maximum of 100 and 0. If you set m_signal to 20 it means, 80 and 20 are used and if the lines cross above/below 80 and 20, the variable "stoch" will be >0 / <0, otherwise it´s zero.
PS: If you´re looking for algorithms, take a look at the signal classes of MT5/MQL5. I did not take my code from there, but anyway many algorithms of those classes should work fine.
This is a snippet of one of my signal classes. It will return a value between +100 (long) and -100 (short) which indicates the strength of the signal, 0 means no signal. It does exactly what you asked for. You just have to change the variable names to your needs, whereby m_signal is the distance to overbought/oversold maximum of 100 and 0. If you set m_signal to 20 it means, 80 and 20 are used and if the lines cross above/below 80 and 20, the variable "stoch" will be >0 / <0, otherwise it´s zero.
PS: If you´re looking for algorithms, take a look at the signal classes of MT5/MQL5. I did not take my code from there, but anyway many algorithms of those classes should work fine.
Wow. I really appreciate the information and advice and will definitely use both. I hope after learning more i can swing through here and help someone out as you have done for me.
You´re welcome :) But maybe you should have a name instead of a user-number ;)
Doerk
While working on this I am unsure of a couple term you used in the example you provided. I will send you a private note to get a little clarity
Thanks
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use