Drawing Heiken Ashi with special parameters?

 
Can somebody help me how to draw candles with special parameters.
Supose one attach Heiken Ashi on 15M chart but get data and draw bars
from example 4 bars back as follows:
Open[4],High[Highest(NULL,0,MODE_HIGH,4,4)],
Low[Lowest(NULL,0,MODE_LOW,4,4)],Close[1].How to program this?
Please help.
Jeff
Reason: