How to compare the body with tail

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #83481 quote
    Hiraokii
    Participant
    Junior

    hi guys, I am a beginner and I am having problems to compare the body of a candle with the tail. Can I have some help ? Thanks

    #83483 quote
    robertogozzi
    Moderator
    Master

    This piece of code tears a bar apart in Body, UpperTail and LowerTail:

    Body      = abs(close - open)
    UpperTail = high - max(open,close)
    LowerTail = min(open,close) - low

    You can then compare them as you want, with range for instance:

    IF Body >= (Range * 0.7) THEN   //you may want to take actions only when a candle's body is at least 70% of the candle's range
      .
      .
    ENDIF
    #83484 quote
    Hiraokii
    Participant
    Junior

    Thanks brother

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

How to compare the body with tail


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Hiraokii @hiraokii Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Hiraokii
7 years, 3 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 10/25/2018
Status: Active
Attachments: No files
Logo Logo
Loading...