# How to create a handle for 2 indicators in 1 Window (Stochastic oscillator & Ichimoku Kinko Hyo)

How best can i first create a handle for my window containing Stochastic oscillator & Ichimoku Kinko Hyo if possible?

I want to use this handle to create Indicator values for my buy, sell conditions and Take profit

I had clearly defined and created Arrays for my indicators but my conditions show "EXPRESSIONS HAVE NO EFFECT". I need help with the correct expression

Basically the idea is that;

~~~EA has to open a Buy position when Ichimoku (Blue line shown on picture below) touches Stochastic Level 16 and Take profit be level 80

~~~ EA has to open a Sell position when Ichimoku (Blue line shown on picture below) touches Stochastic Level 80 and Take profit be level 16

```//Buy signal
//if Ichimoku is above Stochastic level 14
if (IchimokuArray[0]==StochasticArray[0]>14)

//and Ichimoku is below Stochastic level 16
if (IchimokuArray[0]==StochasticValue[0]<16)

//that means Ichimoku line has touched Stochastic level 15

//chat output
Comment("The signal is now: ",signal);

}```

Here below i have attached a picture of what i am trying to say.

https://www.mql5.com/en/charts/13022627/volatility-75-index-m5-deriv-limited

here is the full code

i am still learning so i write comments on top of the code so that i dont forget

those last conditions are giving me 5 errors and 1 warning

```   #include  <Trade\Trade.mqh>

void OnTick()
{

//We calculate the Bid price
double Bid=NormalizeDouble(SymbolInfoDouble(_Symbol,SYMBOL_BID),_Digits);

//We create an array for the prices
MqlRates PriceInfo[];

//Sort the price array from the current candle downwards
ArraySetAsSeries(PriceInfo,true);

//We fill the array with price data
int PriceData =CopyRates(_Symbol,_Period,0,3,PriceInfo);

//Create a string for the signal
string signal="";

//Create 2 Arrays for Ichimoku and Stochastic Oscillator
double IchimokuArray[],StochasticArray[];

//we define Ichimoku, Stochastic Oscillator
int IchimokuDefinition = iIchimoku(_Symbol,_Period,9,9,52);
int StochasticDefinition = iStochastic(_Symbol,_Period,1,1,1,MODE_SMA,STO_LOWHIGH);

//Sort the price array from the current candle downwards
ArraySetAsSeries(IchimokuArray,true);
ArraySetAsSeries(StochasticArray,true);

//we fill the array with price data
//Defined EA, one line, current candle for 3 candles, store in array
CopyBuffer(IchimokuDefinition,0,0,3,IchimokuArray);
CopyBuffer(StochasticDefinition,0,0,3,StochasticArray);

//Calculate Ichimoku and Stochastic Value of the current candle
double IchimokuValue=NormalizeDouble(IchimokuArray[0],2);
double StochasticValue=NormalizeDouble(StochasticArray[0],2);

//if Ichimoku is above Stochastic level 14
if (IchimokuArray[0]==StochasticArray[0]>14)

//and Ichimoku is below Stochastic level 16
if (IchimokuArray[0]==StochasticValue[0]<16)

//that means Ichimoku line has touched Stochastic level 15

//chat output
Comment("The signal is now: ",signal);

}```
Stochastic Oscillator
• www.mql5.com
The Stochastic Oscillator technical indicator compares where a security’s price closed relative to its price range over a given time period. The Stochastic Oscillator is displayed as two lines. The main line is called %K. The second line, called %D, is a Moving Average of %K. The %K line is usually displayed as a solid line and the %D line is...
Files:

`   if (IchimokuArray[0]==StochasticArray[0]>14)`

That is babel. Consider: True = non-zero and false = zero so you get:

 ```if( 3 < 2 < 1 ) if( false < 1 ) if(     0 < 1 ) if(     true  )``` ```if( 3 > 2 > 1 ) if(  true > 1 ) if(     1 > 1 ) if(     false ) ```

William Roeder:

That is babel. Consider: True = non-zero and false = zero so you get:

So this condition simply means when:
- ichimoku price on current candle meets stochastic price on current candle > level 14 thats true right?

I am a bit lost William.

@JayB friend you could finally solve it - could you share it thanks since I could not that the EA will have operations
JayB
• 2021.01.09
• www.mql5.com