Home Forex Create EA with RSI Kernel Optimized indicator (iCustom) – Analytics & Forecasts – 6 December 2024

Create EA with RSI Kernel Optimized indicator (iCustom) – Analytics & Forecasts – 6 December 2024

0
Create EA with RSI Kernel Optimized indicator (iCustom) – Analytics & Forecasts – 6 December 2024

To make use of the RSI Kernel Optimized indicator for EA, you’ll be able to see the directions under:

a. The buffers within the indicator and their indexes:

b. Required enter parameters:

MT4 Model 1.15:


double getValueRSIKernelOptimized(string fSymbol,		//Image (fill _Symbol to make use of image present)
                                  ENUM_TIMEFRAMES Timeframe, 	//Timeframe (fill PERIOD_CURRENT to make use of present timeframe)
                                  int Index, 			//index buffer (see part a)
                                  int Shift 			//Shift (often = 1 to get the earlier bar worth)
                                 )
  {
   string indicatorCustomName = "MarketRSI Kernel Optimized MT4 with Scanner";//Path indicator
   return iCustom(fSymbol, Timeframe, indicatorCustomName,
                  iMaxBarsBack,
                  "",
                  rsiLengthInput,
                  rsiSourceInput,
                  highPivotLen,
                  lowPivotLen,
                  "",
                  activationThresholdStr,
                  KDEKernel,
                  KDEBandwidth,
                  KDEStep,
                  false, false, 0, 0, 0, 0, 0, 0, 0, 0, 0, "", false, false, false, false, false, false, "", "", false, "", 0, 0, "", false, 0, 0, false, 0, 0, "", 0, clrNONE, clrNONE, clrNONE, clrNONE, clrNONE, clrNONE, clrNONE, "", false, 0, 0, false, 0, 0, 0,
                  Index, Shift);
  }
    

MT5 Model 1.15 :

double getValueRSIKernelOptimized(string fSymbol,           	
                                  ENUM_TIMEFRAMES Timeframe,   	
                                  int Index,             	
                                  int Shift                	
                                 )
  {
   string indicatorCustomName = "MarketRSI Kernel Optimized with Scanner for MT5";
   int deal with = iCustom(fSymbol, Timeframe, indicatorCustomName,
                        iMaxBarsBack,
                        "",
                        rsiLengthInput,
                        rsiSourceInput,
                        "",
                        highPivotLen,
                        lowPivotLen,
                        "",
                        activationThresholdStr,
                        KDEKernel,
                        KDEBandwidth,
                        KDEStep,
                        false,
                        false,
                        0, 0, 0, clrNONE, 0, clrNONE, 0, clrNONE, 0, clrNONE, "", false, false, false, false, false, false, "", "", false, "", 0, 0, "", false, 0, 0, false, 0, 0, "", 0, clrNONE, clrNONE, clrNONE, clrNONE, clrNONE, clrNONE, clrNONE, "", false, 0, 0, false, 0, 0, 0);
   if(deal with < 0)
     {
      return(EMPTY_VALUE);
     }
   else
     {
      double buf[];
      change(Index)
        {
         case 0:
            if(CopyBuffer(deal with, 0, Shift, 1, buf) > 0)
               return(buf[0]);
            break;
         case 1:
            if(CopyBuffer(deal with, 1, Shift, 1, buf) > 0)
               return(buf[0]);
            break;
         case 2:
            if(CopyBuffer(deal with, 2, Shift, 1, buf) > 0)
               return(buf[0]);
            break;
         case 3:
            if(CopyBuffer(deal with, 3, Shift, 1, buf) > 0)
               return(buf[0]);
            break;
         case 4:
            if(CopyBuffer(deal with, 4, Shift, 1, buf) > 0)
               return(buf[0]);
            break;
         default:
            return EMPTY_VALUE;
            break;
        }
     }
   return EMPTY_VALUE;
  }

d. Use getValueRSIKernelOptimized perform for EA

You utilize the getValueRSIKernelOptimized perform to get the worth wanted to make use of for the EA.

To substantiate that the buffer has a worth, you’ll want to examine it with EMPTY_VALUE.

Listed here are some examples to verify that the earlier bar buffers (shift = 1) have a worth:

0 – Purchase Sign (arrow)

bool buySignal = getValueRSIKernelOptimized(_Symbol, PERIOD_CURRENT, 0, 1) != EMPTY_VALUE;

1 – Promote Sign (arrow)

bool sellSignal = getValueRSIKernelOptimized(_Symbol, PERIOD_CURRENT, 1, 1) != EMPTY_VALUE;

2 – Bullish Dots

bool bullishDots = getValueRSIKernelOptimized(_Symbol, PERIOD_CURRENT, 2, 1) != EMPTY_VALUE;

3 – Bearish Dots

bool bearishDots = getValueRSIKernelOptimized(_Symbol, PERIOD_CURRENT, 3, 1) != EMPTY_VALUE;

Hopefully this text can assist you extra simply automate indicators from the RSI Kernel Optimized indicator into EA.

You possibly can obtain the indicator at: