Heikin-Ashi candle close

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #188232 quote
    zak1982
    Participant
    New

    Dear All

    I created a cod based on price close above MA. How I can do this but instead using Hekin-Ashi candle close.

    indictaor3= exponentialaverage[50](close)
    indictaor4= exponentialaverage[20](close)

    c2= (close[1] > indictaor3)
    c3= (close[1]> indictaor4)

    I want above close to be based in Heikin Ashi candle ?

    #188233 quote
    robertogozzi
    Moderator
    Master

    There you go:

    //xOpen= Open
    xClose = (open + close + high + low) / 4
    //if barindex > 0 then
        //xOpen = (xOpen[1] + xClose[1]) / 2
    //endif
    //
    indictaor3= exponentialaverage[50](xClose)
    indictaor4= exponentialaverage[20](xClose)
    c2= (xClose[1] > indictaor3)
    c3= (xClose[1] > indictaor4)

    I commented out any reference to xOpen, as you are not using it. If you need it then uncomment those lines.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Heikin-Ashi candle close


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
zak1982 @zak1982 Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzi
3 years, 12 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 02/14/2022
Status: Active
Attachments: No files
Logo Logo
Loading...