Create EA (iCustom) with VOLUMATIC VIDYA


To use the Volumatic VIDyA Scanner indicator (ver.2.00 – download link at the end of the article) for EA, you can see the instructions below:

a. The buffers in the indicator and their indexes:

b. Required input parameters:

MT4 Version 2.10:

double getValueVolumaticVIDyA(string fSymbol,           
                          ENUM_TIMEFRAMES Timeframe,  
                          int Index,             
                          int Shift                
                         )
  {
   string indicatorCustomName = "Market\Volumatic VIDyA MT4";
  return iCustom(fSymbol,Timeframe,indicatorCustomName,iMaxBarsBack,"",vidya_length,vidya_momentum,band_distance,source,pivot_type,pivot_left_bars,pivot_right_bars,vidya_value_smooth_period,"",false,"",false,false,false,clrNONE,clrNONE,clrNONE,50,0,"","",false,false,"",false,false,false,false,false,false,"","",false,"","",0,"",false,0,0,0,false,0,0,0,clrNONE,clrNONE,clrNONE,clrNONE,clrNONE,"",0,0,
                  Index, Shift);
  }

MT5 Version 2.00:

double getValueVolumaticVIDyA(string fSymbol,           
                          ENUM_TIMEFRAMES Timeframe,  
                          int Index,             
                          int Shift                
                         )
  {
   string indicatorCustomName = "Market\Volumatic VIDyA MT5";
   int handle = iCustom(fSymbol,Timeframe,indicatorCustomName,iMaxBarsBack,"",vidya_length,vidya_momentum,band_distance,source,pivot_type,pivot_left_bars,pivot_right_bars,vidya_value_smooth_period,VOLUME_TICK,"","",false,false,false,clrNONE,clrNONE,clrNONE,50,0,false,"","",false,false,"",false,false,false,false,false,false,"","",false,"",0,0,"",false,0,0,0,false,0,0,0,clrNONE,clrNONE,clrNONE,clrNONE,clrNONE,"",0,0);
      if(handle < 0)
      return(EMPTY_VALUE);
   else
     {
      double buf[];
      if(CopyBuffer(handle, Index, Shift, 1, buf) > 0)
         return(buf[0]);
     }
   return EMPTY_VALUE;
  }

d. Use getValueVolumaticVIDyA function for EA

You use the getValueVolumaticVIDyA function to get the value needed to use for the EA.

To confirm that the buffer has a value, you need to compare it with EMPTY_VALUE.

Here are some examples to confirm that the current bar buffers (shift = 0) have a value:

Hopefully this article can help you more easily automate signals from the Volumatic VIDyA  Scanner indicator into EA.



Source link

Leave a Comment