Instead of having an RSI indicator which is based on the ups and downs of each bar close, I want it to be based on the ups and downs of an SMA.
As I am not a scalper, the slight delay inherent in this version of the indicator is no great problem as I trade swings which may last several hours or sometimes more than a day.
I have tried to modify RSI.mq4 but my efforts are causing the software to crash.
I have used this version of RSI for some years with more than a modicum of success but unfortunately I had to develop it using a spreadsheet with a DDE link.
But now, having come across your board, it seems high time that it was developed in MT4 and in this way could also be shared with others using this software.
Is there a kind soul who would develop such an indicator for me please ?
It's very simply.
However,can I involve you just once more ?
I notice that the MAPeriod and RSIPeriod are fixed in the routine and cannot be changed on the chart by editing Indicator properties.
What needs to be done to allow this flexibility ?
May be I do not understand something but it can be changed.
OK, I have tried again.
double click does the trick
many thanks to you both
Igor / Newdigital
I have now run the indicator using several alternative macd/rsi combinations and a problem seems to have occurred with the arithmetic.
I have downloaded the data from 'History Center' and input it into my spreadsheet to make absolutely sure that the basic data is the same.
Igor's indicator is producing different output to that in my spreadsheet.
The general shape of his plot is quite similar,but much flatter than mine.
The advantage of the spreadsheet is that you can readily see the sma;ups;downs; and rsi values on a line by line basis and also the formula that is set for each line.
So far, I havent found a way to divert output from an MT4 indicator to a file (cvsv format) so that I can compare the output of the two different routines.
There is probably some adaptation of "Print" which would allow me to do this, but it is not clear from MT4 dictionary how this might be achieved.
Can you help please ?
May be it help.
I made more flexible and usefull version of SMARSI.
Now you can change:
Price - 0-Close, 1-Open, 2-High, 3-Low, 4-Median, 5-Typical, 6-Weighted;
Smooth- smoothing period by SMA;
Try to change input parameters, perhaps, this version can solve your problems.
I know about good trend definition method by John Hayden, that use RSI.
For more information look at this:
many thanks for your additional work on this indicator but I still have a problem with the arithmetic.
as an example,
my test data used 5min chart of GBPUSD.
the final reading on Friday in History center was Close at 1.7727.
at that time, my spreadsheet had an RSI reading of 77.6264 whereas the reading on SMARSIv1 was 60.4108.
Like you (?), I have used the Close as the basis for my calculations.
I hesitate to suggest that there is something amiss with your routine but I have double checked my routine and the formulas seem to be correct.
I would be very happy to compare the output of the two routines but I do not know how to divert the output from your indicator to a Print file.
But the difference is too large for me to ignore.
I have looked at your revised version in Post 7, but it produced the same result as your original version.
All I can add is that your indicator produces a much flatter curve than mine although both are smooth lines.
But mine reaches overbought/oversold more readily than yours.
I really dont know what to suggest, but is it possible that your original indicator is not just an RSI of an SMA but contains an additional smoothing factor ?
Your code refers to "// smoothed moving average", when what is required is just the moving average.
My apologies for raising this point, but it is quite important.
Using my indicator, I have been short for most of the day; but using yours, I would never have had a trading signal.
Can you throw any light on this issue ?
For basis to writing the indicator I have taken RSI from MT4, which
use smoothed average. Robert Colby suggest EMA.
What you use for calculation?
If you use SMA ,this mean that your indicator too noisy.
Tell me what you prefer and I change code.
thanks for your patience
As I cannot print your output to a file, perhaps it might help if I give you an extract of my file ?
I have taken the data from history center for 5 minute GBPUSD.
I have used a 30 bar SMA and a 45 bar RSI
Although these are not the settings I use for trading, I had to use something
big enough to demonstrate the calculations but small enough to be of a
sensible size to post.And they should serve the purpose of illustrating what is involved.
I have limited the calcs to 6 decimal places and the RSI to 4 decimal places.
The question of "smoothing" doesnt feature in my calculations at all.
The SMA does all the smoothing that is necessary.
I trust the calculations are easy to follow, but if you have any queries, please let me know.
Tell me formulas of Ups and Downs.