Everything about RSI - page 143

 
Alain Verleyen:

Why posting that in a RSI thread ?

And an other time please post a smaller image, I am still able to see it.

He already got an answer in PM that those are MACDs but obviously he did not like the answer :)
 
Mladen Rakic:
He already got an answer in PM that those are MACDs but obviously he did not like the answer :)
Ah he want it to be an RSI, got it :-D
 
 

RSI Levels Expert Advisor - expert for MetaTrader 5 

RSI Levels Expert Advisor - expert for MetaTrader 5

Classic trading strategy based on RSI levels. Buys when RSI is oversold and sells when RSI is overbought.
This code can be used in both MetaTrader5 and MetaTrader4.  Just change the file extension from .mq5 to .mq4 and compile the file again.

 

How to Trade Using RSI (more information about HowTo- read this post)


 
Hello can anyone give me a rsi indicator where in it send push notifications when price crosses 75 and 25?
 

Forum on trading, automated trading systems and testing trading strategies

How to start with MQL5

Vladimir Karputov, 2020.03.12 05:36

iRSI simple advisor

Advisor works only on the new bar. The signal to open a position BUY: rsi on bar # 1> 'RSI Level UP'. Signal to open a SELL: rsi position on bar # 1 <'RSI Level DOWN'.

iRSI simple advisor

//+------------------------------------------------------------------+
//|                                          iRSI simple advisor.mq5 |
//+------------------------------------------------------------------+
#property version   "1.005"
//---
#include <Trade\Trade.mqh>
CTrade         m_trade;                         // trading object
//--- input parameters
input int                  Inp_RSI_ma_period       = 14;          // RSI: averaging period 
input ENUM_APPLIED_PRICE   Inp_RSI_applied_price   = PRICE_CLOSE; // RSI: type of price
input double               Inp_RSI_Level_UP        = 70;          // RSI Level UP
input double               Inp_RSI_Level_DOWN      = 30;          // RSI Level DOWN
//---
int      handle_iRSI;                           // variable for storing the handle of the iRSI indicator
datetime m_prev_bars                = 0;        // "0" -> D'1970.01.01 00:00';
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- create handle of the indicator iRSI
   handle_iRSI=iRSI(Symbol(),Period(),Inp_RSI_ma_period,Inp_RSI_applied_price);
//--- if the handle is not created 
   if(handle_iRSI==INVALID_HANDLE)
     {
      //--- tell about the failure and output the error code 
      PrintFormat("Failed to create handle of the iRSI indicator for the symbol %s/%s, error code %d",
                  Symbol(),
                  EnumToString(Period()),
                  GetLastError());
      //--- the indicator is stopped early 
      return(INIT_FAILED);
     }
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//---

  }
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
//--- we work only at the time of the birth of new bar
   datetime time_0=iTime(Symbol(),Period(),0);
   if(time_0==m_prev_bars)
      return;
   m_prev_bars=time_0;
//---
   double rsi_1=iRSIGet(1);
   if(rsi_1==EMPTY_VALUE)
      return;
//---
   if(rsi_1>Inp_RSI_Level_UP)
      m_trade.Sell(1.0);
   else if(rsi_1<Inp_RSI_Level_DOWN)
      m_trade.Buy(1.0);
  }
//+------------------------------------------------------------------+
//| TradeTransaction function                                        |
//+------------------------------------------------------------------+
void OnTradeTransaction(const MqlTradeTransaction &trans,
                        const MqlTradeRequest &request,
                        const MqlTradeResult &result)
  {
//---
int d=0;
  }
//+------------------------------------------------------------------+
//| Get value of buffers for the iRSI                                |
//+------------------------------------------------------------------+
double iRSIGet(const int index)
  {
   double RSI[1];
//--- reset error code 
   ResetLastError();
//--- fill a part of the iRSI array with values from the indicator buffer that has 0 index 
   if(CopyBuffer(handle_iRSI,0,index,1,RSI)<0)
     {
      //--- if the copying fails, tell the error code 
      PrintFormat("Failed to copy data from the iRSI indicator, error code %d",GetLastError());
      //--- quit with zero result - it means that the indicator is considered as not calculated 
      return(EMPTY_VALUE);
     }
   return(RSI[0]);
  }
//+------------------------------------------------------------------+


 
iRSI simple advisor - go to post to download updated version.
How to start with MQL5
How to start with MQL5
  • 2020.03.12
  • www.mql5.com
This thread discusses MQL5 code examples. There will be examples of how to get data from indicators, how to program advisors...
 

RSI with BB - indicator for MetaTrader 5

RSI with BB - indicator for MetaTrader 5

The indicator consists in an RSI and Bollinger bands calculated on it, it also plots arrows when RSI value was out of Bands and came again in Bands.

RSI with BB
RSI with BB
  • www.mql5.com
The indicator consists in an RSI and Bollinger bands calculated on it, it also plots arrows when RSI value was out of Bands and came again in Bands.
 

Non Lag Relative Strength Index for MT5 - indicator for MetaTrader 5

Non Lag Relative Strength Index for MT5 - indicator for MetaTrader 5

Non Lag Relative Strength Index for MT5

Eliminates unnecessary preliminary calculations on the built-in RSI.

Same indicator for MT4 is on this CodeBase page.
Non Lag Relative Strength Index for MT5
Non Lag Relative Strength Index for MT5
  • www.mql5.com
Volume Profile + Range v6.0 - indicator for MetaTrader 5 (Fixed iBarShift Issue) Volume Profile + Range v6.0 (former TPO). Distribution of deals by price levels at a given time interval. Displayed as a histogram. The width of the histogram at the level means the number...
Reason: