EAs have no eyes; they can't see limits, only values. If you want to see them, add the indicator to your chart.
See below, that the parameters are not set.
RSI_Handle = iRSI (_Symbol, PERIOD_CURRENT, ma_period, price_applied);
The solution for this would be to copy the indicator code, insert the parameters, and call through iCustom and #resource with the additional parameters, for example:
input uint RSI_LimitUp = 70; // overbought
input uint RSI_LimitDn = 30; // oversold
RSI_Handle = iCustom(_Symbol, RSI_TF, "::Indicators\\EATest\\NewRSI.ex5", ma_period, price_applied, RSI_LimitUp, RSI_LimitDn);
So, is there any way to call the native RSI that doesn't have the parameters natively and let the user define the input parameters in the EA manually?
- www.mql5.com
See below, that the parameters are not set.
RSI_Handle = iRSI (_Symbol, PERIOD_CURRENT, ma_period, price_applied );
The solution for this would be to copy the indicator code, insert the parameters, and call through iCustom and #resource with the additional parameters, for example:
input uint RSI_LimitUp = 70; // overbought
input uint RSI_LimitDn = 30; // oversold
RSI_Handle = iCustom (_Symbol, RSI_TF, "::Indicators\\EATest\\NewRSI.ex5", ma_period, price_applied, RSI_LimitUp, RSI_LimitDn );
So, is there any way to call the native RSI that doesn't have the parameters natively and let the user define the input parameters in the EA manually?
Indicator idea
When testing Expert Advisors based on the iRSI (Relative Strength Index, RSI) in the visual tester, the RSI indicator is displayed with the default levels ('70' and '30). And if you set your own levels in the EA (for example, '75' and '25'), the indicator in the visual tester will still display the standard levels 70 'and '30.
Therefore, this indicator was written - in its settings there are two parameters for levels: ' RSI: Level UP ' and ' RSI: Level DOWN ' and now when using the ' RSI Levels ' indicator in visual testing (and online, when working on a chart), the indicator will display the set levels. An example of the EA working with the ' RSI Levels ' indicator and with the specified levels '75' and '25':
Figure: 1. An example of receiving indicator data from an advisor
An Expert Advisor immediately comes with the indicator - an example of working with an indicator: creating and receiving data.
- www.mql5.com
input uint RSI_LimitDn = 30; // oversold
There is no need, those do not affect the RSI value at all. They are visual only. EAs have no eyes; just use the 70/30 in the EA.
If you want to see the lines, add it to the chart.
There is no need, those do not affect the RSI value at all. They are visual only. EAs have no eyes; just use the 70/30 in the EA.
If you want to see the lines, add it to the chart.
Really for EA there is no need.
However, it is visually important for the user to know that what he configured, is being reflected, as it passes more security.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
There's a way to call an native indicator in my EA, with two additional custom limits line ?
Example:
Call native RSI from MT5, but he doesn´t parameters about his limits.
Then, i want to call the native indicator, but input manually in my EA the limits parameters.
is it possible?
I dont want do a copy of indicator, and use #resource and iCustom.