Sunday, June 24, 2018

Simple RSI Value Signal for MT4

Create Simple RSI Value Signal on your MT4 chart.
Step 1.
create Simple RSI Value file in expert folder and

Step 2. copy paste code given below on your Simple RSI Value file :
//code start

void OnTick()
{
//create a string variable for the signal
string signal="";
//calculate the RSI value
double RSIValue = iRSI(_Symbol,_Period,14,PRICE_CLOSE,0);
//if the RSI value is below 20
if (RSIValue<20)
{
//create a sell signal
signal ="buy";
}
//if the RSI value is above 80
if (RSIValue>80)
{
//create a sell signal
signal  = "sell";
}
//screen output
Comment ("RSIValue: ",RSIValue, "\n","signal:",signal);
}
//+------------------------------------------------------------------+
//code end
Step 3.
Now open MT4 and go to :
Insert >> Indicator >> Oscillator >> Relative Strength Index 

Step 4.
Now open MT4 and go to :
Charts >> Template >> save template >> save file as tester.tpl.

Step5.
Now open MT4 and go to :
View >> strategy test : 
set your symbol
Use date
Visual Mode
Start

Step6.
View signal on left side on top in your chart.

No comments:

Post a Comment