void OnTick() { // We create a price array MqlRates PriceArray[]; // We sort the array from the current candle downwards ArraySetAsSeries(PriceArray,true); // Wir fill the array with data for 3 candles int Data =CopyRates(_Symbol,_Period,0,3,PriceArray); // we create an array for the EA data double EAArray[]; // We sort the array from the current candle downwards ArraySetAsSeries(EAArray,true); // We define the iTEMA EA int iTEMADefinition =iTEMA(_Symbol,_Period,14,0,PRICE_CLOSE); // Defined EA, first buffer, current candle,3 candles, save in array CopyBuffer(iTEMADefinition,0,0,3,EAArray); // Calculate the current iTEMA value float iTEMAVALUE=EAArray[0]; // Create a chart output depending on the direction if (iTEMAVALUE>PriceArray[1].close) Comment ("iTEMA IS SHORT ", iTEMAVALUE); if (iTEMAVALUE