Hi all,
Though one can change the chart type to the Heikin-Ashi chart, I want to build my own since I want to use the Heikin-Ashi as input to the indicator. Here is my code, it seems not correct 100%. Any tips?
Hclose=0
Hopen=0
Hlow=0
Hhigh=0
Hclose=(Open+High+Low+Close)/4
Hopen=(Open[1]+Close[1])/2
Max1=MAX(Hclose,Hopen)
Hhigh=MAX(Hhigh,Max1)
Min1=MIN(Hopen,Hclose)
Hlow=MIN(Hlow,Min1)
IF Hopen=0 THEN
Hclose=close
Hopen=open
ENDIF
// RETURN Average[n](HClose) COLOURED(255, 0, 0)
RETURN Hclose - Hopen
Topic moved to the ProBuilder forum as it is an indicator question and not a platform support issue. Please try to post in the correct forums.
You’ll find many Heikin Ashi codes in the forums and in the library, just make a quick search with the search tool of the website (in the dropdown menu below your avatar).