There's a way to call an native indicator with two additional custom limits line ?

ramaziero
61
ramaziero  

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.

  

Documentation on MQL5: Working with DirectX / DXInputSet
Documentation on MQL5: Working with DirectX / DXInputSet
  • www.mql5.com
DXInputSet - Working with DirectX - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
William Roeder
24688
William Roeder  
ramaziero: There's a way to call an native indicator in my EA, with two additional custom limits line ?

EAs have no eyes; they can't see limits, only values. If you want to see them, add the indicator to your chart.

ramaziero
61
ramaziero  
Maybe I didn't understand your answer correctly, so let me explain again ...

The MT5 RSI has overbought and oversold lines.
However, the iRSI Handle does not contain this parameter.

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);


I would not like to follow this path, as it increases the size of the EA, and the RSI is already native to MT5.

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?


Documentation on MQL5: Working with DirectX / DXInputSet
Documentation on MQL5: Working with DirectX / DXInputSet
  • www.mql5.com
DXInputSet - Working with DirectX - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
Vladimir Karputov
Moderator
247597
Vladimir Karputov  
ramaziero :
Maybe I didn't understand your answer correctly, so let me explain again ...

The MT5 RSI has overbought and oversold lines.
However, the iRSI Handle does not contain this parameter .

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 );


I would not like to follow this path, as it increases the size of the EA, and the RSI is already native to MT5.

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?


RSI Levels

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':

RSI Levels

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.

RSI Levels
RSI Levels
  • www.mql5.com
Пользовательский индикатор на базе iRSI (Relative Strength Index, RSI) - добавлены два настраиваемых уровня
William Roeder
24688
William Roeder  
ramaziero: Maybe I didn't understand your answer correctly, so let me explain again ... The MT5 RSI has overbought and oversold lines.
However, the iRSI Handle does not contain this parameter.
input  uint                    RSI_LimitUp     = 70;             // overbought 

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.

ramaziero
61
ramaziero  


William Roeder:

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.


If I take an EA, set parameters 75 and 25 and visually see 70 and 30, I would be concerned with the rest of the operation if I didn't know the EA.