Heikin-Ashi candle High/Low/Close values

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #156105 quote
    betson
    Participant
    Senior

    Could anyone please help me with the code for finding High/Low/Close of a Heikin-Ashi  candle on 5 minute time frame ,and move the stop loss  to the high/low of the last two Heikin-Ashi  candle when candle closes (if price moved favourably) please.

    Thanks in Advance

    #156107 quote
    Vonasi
    Moderator
    Master

    Could anyone please help me with

    This is much more likely to happen if you post your topic in the correct forum as clearly described in the forum rules. I moved it for you.

    Post your topic in the correct forum:
    _ ProRealTime Platform Support: only platform related issues.
    _ ProOrder: only strategy topics.
    _ ProBuilder: only indicator topics.
    _ ProScreener: only screener topics
    _ General Discussion: any other topics.
    _ Welcome New Members: for new forum members to introduce themselves.

     

    Also please observe this one:

    • Give your topic a meaningful title. Describe your question or your subject in your title. Do not use meaningless titles such as ‘Coding Help Needed’.

     

    I changed your title for you.

    #156208 quote
    robertogozzi
    Moderator
    Master

    This is the code to define (and detect) HA candlesticks:

    once xOpen = open
    xClose     = (open + close + high + low) / 4
    if barindex > 0 then
    xOpen  = (xOpen + xClose[1]) / 2
    endif
    xLow       = min(low,min(xClose,xOpen))
    xHigh      = max(high,max(xClose,xOpen))
    xTypic     = (xHigh + xLow + xClose) / 3
    xMed       = (xHigh + xLow) / 2
    xRange     = xHigh - xLow
    xBody      = abs(xOpen - xClose)

    you can reference any price you want, like regular candlesticks, just use xClose instead of Close etc…

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

Heikin-Ashi candle High/Low/Close values


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
betson @betson Participant
Summary

This topic contains 2 replies,
has 3 voices, and was last updated by robertogozzi
5 years, 1 month ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 01/03/2021
Status: Active
Attachments: No files
Logo Logo
Loading...