Merge multiple indicators to execute a trade only if both conditions are true.

 
Hi I only started coding two days ago for the first time.   I can made a moving average and stochastic indicator, both indicators buy or sell indipendently. But they are 2 diffirent indicators.

i am trying to make both indicators execute a trade only when both of them signal a buy or sell within close proximity of the amount of candles that have passed. 

For example.
Take a 1hour chart.
Take the moving average.
Take the macd.
A doji forms.
The moving average signals true for a buy entry inline with the doji.
The macd signals true for a buy a entry only after the doji and a reverse hammer has formed. 

Both signals were not true for a buy at exactly the same time but they were true within close proximity of one another. In otherwords within a 3 candle stick period on a 1h chart both were true. At that momment I want the indicator to buy/sell.

How do i do this? 
additionally do I need to make changes to the buy/sell code? If i copy the one indicator to the other im gna be sitting with 2 "buys" and 2 "sells".

Instead of Buy/Sell I was thinking to replacd it with terms like A/B 
So on a moving average A/B would replace buy/sell.
On macd C/D would replace buy/sell. 
So even if A was true for a buy the trade wont execute. A and C have to be true (within a 3 candle period diffirence of one another) and only then does the Buy execute.

Also I want this candle period diffirence to be adjustable as an external variable outside the code. 
 
You should post your request as a job in the Freelance section.
 
LuqmaanTitus: How do i do this?

Just get the value(s) of the indicator(s) into EA/indicator (using iCustom) and do what you want with it.

You should encapsulate your iCustom calls to make your code self-documenting.
          Detailed explanation of iCustom - MQL4 programming forum #33 2017.05.23