Dear forum members,
I would like a Meta Trader platform with pre-programmed RSI (Relative Strength Index) sound alerts built in and I pray to God that email alerts can be included.
I tried reading the Meta Quotes help topics but I cannot get pass the “creating an expert advisor” button. Maybe I am really stupid. I question my sanity when I try MQL4 programming. I also question my 93 year old mother, but she doesn’t have a clue. My cat just looks at me.
I would rather pay someone to do this. I tried reading all the requests for the same thing for a clue to this mystery, and wonder why Meta Trader has not included this feature since so many users ask for it. I don’t mean to be cynical, just practical.
As I write this I have about 20 pages of printed Help Topics from the Meta Trader platform Help Section. I’m still stuck on whether to create a new script, indicator, or expert advisor. I’m running low on ink so I stopped printing pages. My cat is gone to sleep.
I wish I could scream “IS THERE ANYBODY OUT THERE THAT CAN HELP ME PLEASE”!
hi miotroyo, i'm new in metatrader but i think that create an expert that alert you on a constant level of RSI is quite easy to develop.
I've tryed to write it for you, hope i've understand what you would like to create....
int start()
{double MIN_LEVEL = 25;
double MAX_LEVEL = 70;
double actualRSI = iRSI(Symbol(), 0, 14, PRICE_CLOSE, 0);
if (actualRSI < MIN_LEVEL)
{
Print("Warning! Min level of RSI!" + actualRSI);
PlaySound("alert.wav");
}
else if (actualRSI > MAX_LEVEL)
{
Print("Warning! Max level of RSI! - " + actualRSI);
PlaySound("alert.wav");
}
return(0);
}
I've tested it in the "historical prices" cause at the moment the markets are closed.
hope it helps,
sorry for my bad english
psyco
hi miotroyo, i'm new in metatrader but i think that create an expert that alert you on a constant level of RSI is quite easy to develop.
I've tryed to write it for you, hope i've understand what you would like to create....
int start()
{double MIN_LEVEL = 25;
double MAX_LEVEL = 70;
double actualRSI = iRSI(Symbol(), 0, 14, PRICE_CLOSE, 0);
if (actualRSI < MIN_LEVEL)
{
Print("Warning! Min level of RSI!" + actualRSI);
PlaySound("alert.wav");
}
else if (actualRSI > MAX_LEVEL)
{
Print("Warning! Max level of RSI! - " + actualRSI);
PlaySound("alert.wav");
}
return(0);
}
I've tested it in the "historical prices" cause at the moment the markets are closed.
hope it helps,
sorry for my bad english
psyco
Thank you psyco,
Don’t worry about your English. When I look at programming languages it all looks Martian to me. Maybe if I learned to speak Martian I can figure it out? Ok, I choose Create a new advisor and the screen pops up asking me to name the file which I called RSIalerts. Now the code you sent me is to be copied and pasted on the window which has appeared, I presume (gee I really feel stupid)? If the code is to be copied, where is it to be copied and between which lines?
I have an idea. Below is the page with the source code for the normal RSI indicator. If you could copy your modified code into an email or this forum and send it to me I think I can figure out how to create the expert advisor file and paste your code to it. Otherwise, I’m still clueless.
Thanks,
MiOtroYo (miotroyo@comcast.net)
//+------------------------------------------------------------------+
//| RSI.mq4 |
//| Copyright © 2004, MetaQuotes Software Corp. |
//| http://www.metaquotes.net/ |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2004, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net/"
#property indicator_separate_window
#property indicator_minimum 0
#property indicator_maximum 100
#property indicator_buffers 1
#property indicator_color1 DodgerBlue
//---- input parameters
extern int RSIPeriod=14;
//---- buffers
double RSIBuffer[];
double PosBuffer[];
double NegBuffer[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
string short_name;
//---- 2 additional buffers are used for counting.
IndicatorBuffers(3);
SetIndexBuffer(1,PosBuffer);
SetIndexBuffer(2,NegBuffer);
//---- indicator line
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,RSIBuffer);
//---- name for DataWindow and indicator subwindow label
short_name="RSI("+RSIPeriod+")";
IndicatorShortName(short_name);
SetIndexLabel(0,short_name);
//----
SetIndexDrawBegin(0,RSIPeriod);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Relative Strength Index |
//+------------------------------------------------------------------+
int start()
{
int i,counted_bars=IndicatorCounted();
double rel,negative,positive;
//----
if(Bars<=RSIPeriod) return(0);
//---- initial zero
if(counted_bars<1)
for(i=1;i<=RSIPeriod;i++) RSIBuffer[Bars-i]=0.0;
//----
i=Bars-RSIPeriod-1;
if(counted_bars>=RSIPeriod) i=Bars-counted_bars-1;
while(i>=0)
{
double sumn=0.0,sump=0.0;
if(i==Bars-RSIPeriod-1)
{
int k=Bars-2;
//---- initial accumulation
while(k>=i)
{
rel=Close[k]-Close[k+1];
if(rel>0) sump+=rel;
else sumn-=rel;
k--;
}
positive=sump/RSIPeriod;
negative=sumn/RSIPeriod;
}
else
{
//---- smoothed moving average
rel=Close[i]-Close[i+1];
if(rel>0) sump=rel;
else sumn=-rel;
positive=(PosBuffer[i+1]*(RSIPeriod-1)+sump)/RSIPeriod;
negative=(NegBuffer[i+1]*(RSIPeriod-1)+sumn)/RSIPeriod;
}
PosBuffer[i]=positive;
NegBuffer[i]=negative;
if(negative==0.0) RSIBuffer[i]=0.0;
else RSIBuffer[i]=100.0-100.0/(1+positive/negative);
i--;
}
//----
return(0);
}
//+------------------------------------------------------------------+
1. Open MetaTrader 4
2. Menu : Tools --> MetaQuote Editor
3. Add New --> Expert Advisor, give it a name and close the dialog
4. In the "start" method past the code i've posted before
5. Click on "Compile"
6. Go back to the metatrader main window and in the "Advisor" you will see your new advisor
You can use the attachment to see all the code.
You have to put it in the "experts" directory of your metatrader 4 installation directory
The code you posted is the "Method" to calculate the RSI, so you don't need it cause the "Method" is implemented in the method namediRSI in my short code.
I've seen in the other post that you need the "alert" cyclic, if you can use this example I'll help you to implement the "multialert" ....
Hope this is clear.... let me know if i can help
bye
OK, let's do it from the beginning :), no one born with the ability to develop :) I had your same problem at the beginning :) don't worry
1. Open MetaTrader 4
2. Menu : Tools --> MetaQuote Editor
3. Add New --> Expert Advisor, give it a name and close the dialog
4. In the "start" method past the code i've posted before
5. Click on "Compile"
6. Go back to the metatrader main window and in the "Advisor" you will see your new advisor
You can use the attachment to see all the code.
You have to put it in the "experts" directory of your metatrader 4 installation directory
The code you posted is the "Method" to calculate the RSI, so you don't need it cause the "Method" is implemented in the method namediRSI in my short code.
I've seen in the other post that you need the "alert" cyclic, if you can use this example I'll help you to implement the "multialert" ....
Hope this is clear.... let me know if i can help
bye
"hello psycoxand
I installed the code into Meta Trader but nothing happens. When I try to open the expert and attach it to a chart a "pop up" window opens and asks for "input value".
This is as far as I have got.
Miotroyo
I installed the code into Meta Trader but nothing happens. When I try to open the expert and attach it to a chart a "pop up" window opens and asks for "input value".
This is as far as I have got.
Hi miotroyo, that's right.... is that all the EA do :-)
Just try to set the graph time frame at 1min to have major probability that the RSI will go up to 70 or down 30.
You can also try to change the levels value (the constants) and you'll hear the "alert" sound everytime you reach the level.
You can try to have a look at the "Experts" tab in the "Terminal Window" (Menu View -> Terminal [CTRL+T]) and you'll see the result of the "print" method
Thank you psycoxand, I will try setting the levels on the chart and see what happens. So far I have an 82% accuracy rate (third party verified) on trades without installing any custom indicators or advanced programming features. My current trading system is done manually because I lack the programming expertise. Installing a basic sound alert is testimony to my lack of prowess in this area of expertise.
You will be the first to know when my trading system is fully operational and close to being 100% accurate. I am grateful for your assistance.
Will be in touch,
MiOtroYo
I am also looking for the possibility that I receive an email from MetaTrader when RSI indicator is high or low. Can anyone help me?
- You have only three choices: Search for it, learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem. Praying will not help - you have to do something.
- psycoxand: hi miotroyo, i'm new in metatrader ...
Play videoPlease edit your post.
For large amounts of code, attach it. - miotroyo: I have an idea. Below is the page with the source code for the normal RSI indicator.There is no need to post the RSI code. Don't modify the RSI code. Just get the RSI value into your indicator.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Dear forum members,
I would like a Meta Trader platform with pre-programmed RSI (Relative Strength Index) sound alerts built in and I pray to God that email alerts can be included.
I tried reading the Meta Quotes help topics but I cannot get pass the “creating an expert advisor” button. Maybe I am really stupid. I question my sanity when I try MQL4 programming. I also question my 93 year old mother, but she doesn’t have a clue. My cat just looks at me.
I would rather pay someone to do this. I tried reading all the requests for the same thing for a clue to this mystery, and wonder why Meta Trader has not included this feature since so many users ask for it. I don’t mean to be cynical, just practical.
As I write this I have about 20 pages of printed Help Topics from the Meta Trader platform Help Section. I’m still stuck on whether to create a new script, indicator, or expert advisor. I’m running low on ink so I stopped printing pages. My cat is gone to sleep.
I wish I could scream “IS THERE ANYBODY OUT THERE THAT CAN HELP ME PLEASE”!