# Heikin Ashi code

Can you please provide the code to back Heikin Ashi Chart for a cash script e.g reliance

check the below link for the heikin ashi code

Hi AlgoGeek,

​I need your help to add this condition also in this code

Buy if RSI cross >30 (I mean stochastic RSI (14,14,7,3))

Sell If RSI above >80  (I mean stochastic RSI (14,14,7,3))

So code will be for BUY

{

SET HAC = (OPEN+HIGH+LOW+CLOSE)/4
HAC > MAXOF(REF(HAC,1), REF(HAC,2), REF(HAC,3), REF(HAC,4)) AND SOPK(14, 7, 3, SIMPLE) > SOPD(14, 7, 3, SIMPLE)

and Buy if RSI cross > 20 (I mean stochastic RSI (14,14,7,3))}

Code for Sell

{ SET HAC = (OPEN+HIGH+LOW+CLOSE)/4
HAC < MINOF(REF(HAC,1), REF(HAC,2), REF(HAC,3), REF(HAC,4)) AND SOPK(14, 7, 3, SIMPLE) < SOPD(14, 7, 3, SIMPLE)

and  Sell If RSI above >80 (I mean stochastic RSI (14,14,7,3)) }

Would be great if you could add "fisher Transform indicator by Ehlers strategy" (FTI)

Sell below If FTI < +1

----------------------

{

SET HAC = (OPEN+HIGH+LOW+CLOSE)/4
HAC > MAXOF(REF(HAC,1), REF(HAC,2), REF(HAC,3), REF(HAC,4)) AND SOPK(14, 7, 3, SIMPLE) > SOPD(14, 7, 3, SIMPLE)

and Buy if RSI cross >30 (I mean stochastic RSI (14,14,7,3))

}

Final Code for Sell

{ SET HAC = (OPEN+HIGH+LOW+CLOSE)/4
HAC < MINOF(REF(HAC,1), REF(HAC,2), REF(HAC,3), REF(HAC,4)) AND SOPK(14, 7, 3, SIMPLE) < SOPD(14, 7, 3, SIMPLE)

and  Sell If RSI above >80(I mean stochastic RSI (14,14,7,3))

and Sell below If FTI < +1

}