string CheckEntry() { // We create a string variable for the signal string signal=""; // We create an array for the price data MqlRates PriceArray[]; // We sort the price array from the current candle downwards ArraySetAsSeries(PriceArray,true); // We fill the price array with data for 3 candles int Data =CopyRates(_Symbol,_Period,0,3,PriceArray); // We create another array for the Expert Advisor double EAArray[]; // We sort the array from the current candle downwards ArraySetAsSeries(EAArray,true); // We define the iVIDyA EA int iVIDyADefinition =iVIDyA(_Symbol,_Period,9,12,0,PRICE_CLOSE); // Defined EA, 1 Buffer, current candle, for 3 candles, store in array CopyBuffer(iVIDyADefinition,0,0,3,EAArray); // Calculate the current value float IVIDYAVALUE=EAArray[0]; // Buy signal if (IVIDYAVALUE>PriceArray[1].close) signal="buy"; // Sell signal if (IVIDYAVALUE