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
Can you Explain Trailing Options?
...and input parametters:
InpStopLoss
InpTakeProfit
InpTrailingStop
?
Thanks!
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); }
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?
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
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.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
RSI EA:
RSI EA - trading based on overbought/oversold zones determined by the iRSI (Relative Strength Index, RSI) indicator.
Author: Vladimir Karputov