Trade Script for Heikin Ashi

I need to write trade script for following with Heikin-Ashi chart…

Buy Signal: If two consecutive GREEN bar created and HIGH of both green bar breach on third bar and MACD gives BUY Signal.

Sell Signal: If two consecutive RED bar created and LOW of both red bar breach on third bar and MACD gives Sell signal.

U will get the script in no time , but please don’t trade on it. .there r many many false signal generated by this. Use ADX along with price action to along. .ALWAZ KNOW THE DIRECTION BE4 PUTTING ORDER.

NaMasTe TraDeR,

BUY SCRIPT:

SET HC = ((OPEN+HIGH+LOW+CLOSE)/4) AND 
REF(HC,2) > REF(HC,3) AND 
REF(HC,1) > REF(HC,2) AND 
HC > REF(HC,1) AND 
HIGH > REF(HIGH,1) AND 
MACDSIGNAL(13, 26, 9, EXPONENTIAL) > (MACDSIGNAL(13, 26, 9, EXPONENTIAL) 

SELL SCRIPT:

SET HC = ((OPEN+HIGH+LOW+CLOSE)/4) AND 
REF(HC,2) < REF(HC,3) AND 
REF(HC,1) < REF(HC,2) AND 
HC < REF(HC,1) AND 
LOW < REF(LOW,1) AND 
MACDSIGNAL(13, 26, 9, EXPONENTIAL) < (MACDSIGNAL(13, 26, 9, EXPONENTIAL) 

Dear Coders - Thanks in advance for reading this and hope someone helps in this strategy below with whatever possibilites.

Can some one help with a similar code for consequitive third candle break of high/low
for eg
1 candle - high 100 and low 98
2 candle - high 101 and low 99
3rd Candle breach of 2nd high 100.05 buy alert should trigger with arrow
Stockhastic should be rising from 10 and less than 70.

Similar for sell
1 candle - low 100 and high 101
2 candle - low 99 and high 100
3rd candle break below 2nd candle i.e. 98.95 or any lesser value sell alert should trigger with arrow.
Stockhastic should be falling from 90 and less than 30