Experts: RSI EA

To add comments, please log in or register
Automated-Trading
133865
Automated-Trading  

RSI EA:

RSI EA - trading based on overbought/oversold zones determined by the iRSI (Relative Strength Index, RSI) indicator.

RSI EA Open Buy

Author: Vladimir Karputov

yyl
22
yyl  

i downloaded your expert rsi ea but when i put it on the windows of a money, it disappears, do you havean idea why it disappears ? thank you

Vladimir Karputov
Moderator
126198
Vladimir Karputov  
yyl :

i downloaded your expert rsi ea but when i put it on the windows of a money, it disappears, do you havean idea why it disappears ? thank you


Check the "Experts" tab in the "Toolbox" window.

siljo
52
siljo  

Can you Explain Trailing Options?

...and input parametters:

InpStopLoss

InpTakeProfit

InpTrailingStop

?


Thanks!

Vladimir Karputov
Moderator
126198
Vladimir Karputov  
siljo :

Can you Explain Trailing Options?

...and input parametters:

InpStopLoss

InpTakeProfit

InpTrailingStop

?


Thanks!

When you run the Expert Advisor, you see all the parameter descriptions. What exactly is not clear?

impactlife
5
impactlife  
when testing this EA, I get the error: "tester stopped because OnInit failed" How can I fix this?
Vladimir Karputov
Moderator
126198
Vladimir Karputov  
impactlife :
when testing this EA, I get the error: "tester stopped because OnInit failed" How can I fix this?

You do not read messages carefully. In the ALWAYS log there is a reason for unsuccessful initialization.

//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
   SetMarginMode();
   if(!IsHedging())
     {
      Print("Hedging only!");
      return(INIT_FAILED);
     }
//---
   m_symbol.Name(Symbol());                  // sets symbol name
   if(!RefreshRates())
     {
      Print("Error RefreshRates. Bid=",DoubleToString(m_symbol.Bid(),Digits()),
            ", Ask=",DoubleToString(m_symbol.Ask(),Digits()));
      return(INIT_FAILED);
     }
   m_symbol.Refresh();
//---
   m_trade.SetExpertMagicNumber(m_magic);    // sets magic number

//--- tuning for 3 or 5 digits
   int digits_adjust=1;
   if(m_symbol.Digits()==3 || m_symbol.Digits()==5)
      digits_adjust=10;
   m_adjusted_point=m_symbol.Point()*digits_adjust;

   ExtStopLoss       = InpStopLoss     * m_adjusted_point;
   ExtTakeProfit     = InpTakeProfit   * m_adjusted_point;
   ExtTrailingStop   = InpTrailingStop * m_adjusted_point;
   ExtSlippage       = InpSlippage     * digits_adjust;

   m_trade.SetDeviationInPoints(ExtSlippage);
//---
   if(!m_money.Init(GetPointer(m_symbol),Period(),m_adjusted_point))
      return(INIT_FAILED);
   m_money.Percent(10); // 10% risk
//--- create handle of the indicator iRSI
   handle_iRSI=iRSI(Symbol(),Period(),RSIperiod,PRICE_CLOSE);
//--- 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);
  }
suzon mia
99
suzon mia  
Hi Vladimir Karputov ,Thank you for your simple RSI EA . Can you please add time filters perameter? so that the ea will run on specific time . it will help me a lot. thanks
Vladimir Karputov
Moderator
126198
Vladimir Karputov  
suzon mia :
Hi Vladimir Karputov , Thank you for your simple RSI EA. Can you add time filters perameter? so that the ea will run on specific time. it will help me a lot. thanks

Do you want to limit work by the hour?

These are the parameters

 input bool      InpTimeControl    = true ;     // Use time control
input uchar     InpStartHour      = 10 ;       // Start hour
input uchar     InpEndHour        = 5 ;         // End hour 

will do?

suzon mia
99
suzon mia  
Vladimir Karputov:

Do you want to limit work by the hour?

These are the parameters

will do?

Thank you so much for your quick response . Exactly  i wanted like this but i can't code. Please help

Vladimir Karputov
Moderator
126198
Vladimir Karputov  
suzon mia :

Thank you so much for your quick response . Exactly  i wanted like this but i can't code. Please help

Version 2: RSI EA v2

This Expert Advisor is a modification of the first version ( RSI EA ). Added time control (you can set the time interval and within days and with the transition in a day). For the control of time are the parameters Use time control , Start hour and End hour. Added trailing. Added opening functions. Advisor works on every tick. It can hold no more than one position in the market - therefore, it will work on both netting and hedge accounts.

12
To add comments, please log in or register