Pregunta sobre handle indicador custom

 

Hola buenas, queria saber si estoy llamando correctamente el handle del RVI para mi programa

https://www.mql5.com/en/code/16716  Aquí está el indicador custom que estoy utilizando

// RVI
enum enPrices
{
   pr_close,      // Close
   pr_open,       // Open
   pr_high,       // High
   pr_low,        // Low
   pr_median,     // Median
   pr_typical,    // Typical
   pr_weighted,   // Weighted
   pr_average,    // Average (high+low+open+close)/4
   pr_medianb,    // Average median body (open+close)/2
   pr_tbiased,    // Trend biased price
   pr_tbiased2,   // Trend biased (extreme) price
   pr_haclose,    // Heiken ashi close
   pr_haopen ,    // Heiken ashi open
   pr_hahigh,     // Heiken ashi high
   pr_halow,      // Heiken ashi low
   pr_hamedian,   // Heiken ashi median
   pr_hatypical,  // Heiken ashi typical
   pr_haweighted, // Heiken ashi weighted
   pr_haaverage,  // Heiken ashi average
   pr_hamedianb,  // Heiken ashi median body
   pr_hatbiased,  // Heiken ashi trend biased price
   pr_hatbiased2  // Heiken ashi trend biased (extreme) price
};
enum enStdMethods
{
   std_custSam, // Custom - with sample correction
   std_custNos  // Custom - without sample correction
};
enum enMaTypes
{
   ma_sma,    // Simple moving average
   ma_ema,    // Exponential moving average
   ma_smma,   // Smoothed MA
   ma_lwma    // Linear weighted MA
};

enum enColorOn
{
   cc_onSlope,   // Change color on slope change
   cc_onMiddle,  // Change color on middle line cross
   cc_onLevels   // Change color on outer levels cross
};
input int VolPeriod = 10; // Periodos RVI
int handle_RVI = 0;
double array_rvi[];
double rvi_valor;

input ENUM_TIMEFRAMES TimeFrame       = PERIOD_CURRENT;
input enPrices        VolPrice        = pr_close;       // Precio RVI
input enStdMethods    VolStdMethod    = std_custSam;    // Deviation method RVI
input enMaTypes       VolMaMethod     = ma_ema;        // Average method for volatility calculation RVI
input int             VolSmooth       = 10;             // Smoothing period RVI
input enMaTypes       VolSmoothMethod = ma_ema;         // Average method for volatility smoothing RVI  

int OnInit()
{
  // Handle RVI
  handle_RVI = iCustom(Symbol(), Period(), "Relative_volatility_index", TimeFrame, VolPeriod,VolPrice,VolSmoothMethod,VolMaMethod,VolSmooth); // Hay que cargar todo xd 
  
  return INIT_SUCCEEDED;
}
Relative Volatility Index
Relative Volatility Index
  • www.mql5.com
Indicator is already multi time frame version with alerts included.
 
luisardo:

Tiene margen de mejora en varios aspectos, pero, en términos generales, es funcional.

A primera vista, no he encontrado errores, aunque, como mencioné, hay áreas que podrían optimizarse para un mejor rendimiento o claridad.

 
Miguel Angel Vico Alba #:

Tiene margen de mejora en varios aspectos, pero, en términos generales, es funcional.

A primera vista, no he encontrado errores, aunque, como mencioné, hay áreas que podrían optimizarse para un mejor rendimiento o claridad.

Muchas gracias por la ayuda