How to compare the body with tail

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #83481 quote
    HiraokiiHiraokii
    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
    robertogozzirobertogozzi
    Moderator
    Legend

    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
    HiraokiiHiraokii
    Participant
    Junior

    Thanks brother

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

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

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 HiraokiiHiraokii
7 years, 11 months ago.

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