Trailing stop through the RSI value ??
hi,
Guys the question is: Is it possible to create a trailing stop from the RSI value of the last candle?
If so what is the best method ...
Thanks in advance for all the answers ...
J. Costa
I don't know what you have now.
Firstly you were talking about a trailing stop and now about a stop signal. It's not the same.
When RSI value reach the following condition, only (close short position) and not ( close short position and open a long position)?
//--- checking of conditions to close short position //--- signal line crossover of overbought/oversold levels (upward 30, upward 70) if((RSI(1)<50) && (RSI(2)>50))) result=40;
what is the best way to achive this? Isn't it through a trailing stop? or i have another way
//+------------------------------------------------------------------+ //| Checks conditions for entry and exit from market | //| 1) Market entry (open long position, result=80) | //| 2) Market exit (close short position, result=40) | //+------------------------------------------------------------------+ int CBE_BE_RSI::LongCondition() { int result=0; //--- idx can be used to determine Expert Advisor work mode //--- idx=0 - in this case EA checks trade conditions at each tick //--- idx=1 - in this case EA checks trade consition only at news bars int idx =StartIndex(); //--- checking of conditions to open long position //--- formation of Bullish Engulfing pattern and RSI<30 if(CheckCandlestickPattern(CANDLE_PATTERN_BULLISH_ENGULFING) && (RSI(1)<40)) result=80; //--- checking of conditions to close short position //--- signal line crossover of oerbought/oversold levels (upward 30, upward 70) if((RSI(1)<50) && (RSI(2)>50))) result=40; //--- return result return(result); } //+------------------------------------------------------------------+ //| Checks conditions for entry and exit from market | //| 1) Market entry (open short position, result=80) | //| 2) Market exit (close long position, result=40) | //+------------------------------------------------------------------+ int CBE_BE_RSI::ShortCondition() { int result=0; //--- idx can be used to determine Expert Advisor work mode //--- idx=0 - in this case EA checks trade conditions at each tick //--- idx=1 - in this case EA checks trade consition only at news bars int idx =StartIndex(); //--- checking of conditions to open short position //--- formation of Bearish Engulfing pattern and RSI>60 if(CheckCandlestickPattern(CANDLE_PATTERN_BEARISH_ENGULFING) && (RSI(1)>60)) result=80; //--- checking of conditions to close long position //--- signal line crossover of overbought/oversold levels (downward 70, downward 30) if((RSI(1)>50) && (RSI(2)<50))) result=40; //--- return result return(result); }
Ok, let me be more clear...
When RSI value reach the following condition, only (close short position) and not ( close short position and open a long position)?
what is the best way to achive this? Isn't it through a trailing stop? or i have another way
Ok I see, it's for a Mql5 Wizard generated EA. Are you a coder ? If yes you can check this topic to help you to understand how it works.
Otherwise you will have to ask a programmer to do it for you.
In all case what you ask has nothing to do with a trailing stop.
- www.mql5.com
Ok, let me be more clear...
When RSI value reach the following condition, only (close short position) and not ( close short position and open a long position)?
what is the best way to achive this? Isn't it through a trailing stop? or i have another way
Guys the question is: Is it possible to create a trailing stop from the RSI value of the last candle?
If so what is the best method ...
Thanks in advance for all the answers ...
J. Costa