Hosoda Projection Indicator

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #187620 quote
    ArturAgababyan13ArturAgababyan13
    Participant
    New

    Hello,
    I want to create an indicator that projects price targets according to points A, B and C (Hosoda’s Projection), much like fibonacci extensions. Here are the mathematical formulas for calculating price targets:
    If B > C > A then:
    – Objective N = C + (B-A)
    – Objective E = B + (B-A)
    – Objective V = B + (B – C)
    – Objective NT = C + (C – A)

    If B < C < C then:
    – Goal N = C – (A-B)
    – Objective E = B – (A-B)
    – Objective V = B – (C – B)
    – Objective NT = C – (A – C)

    My problem is not the mathematical calculation, it is the fact of wanting to use it as the extension of fibonacci by pressing its logo in the toolbar.

    If anyone can help me that would be great! I could share it with the community once I program it.

     

    Best regards

    #187627 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    It’s not possible:

    • to modify existing tools by adding custom code
    • to add custom tools to the toolbar
    • to write code that interacts with I/O devices and objects.

    You can make an indicator setting the points A, B, C with its properties.

    #187629 quote
    robertogozzirobertogozzi
    Moderator
    Legend
    #187679 quote
    ArturAgababyan13ArturAgababyan13
    Participant
    New

    Hello! Thank you for your help!! There is my code:

    defparam drawonlastbaronly = true

    if a < b then
    n = c+(b-a)
    e = b+(b-a)
    v = b+(b-c)
    nt = c+(c-a)
    else
    n = c-(a-b)
    e = b-(a-b)
    v = b-(c-b)
    nt = c-(a-c)
    endif

    drawhline(n)coloured(255,140,0)
    DRAWTEXT(“Wave N #N#”, barindex + 25, N + (N * 0.003), Dialog, Standard, 12) COLOURED(255,140,0)

    DRAWHLINE(e)coloured(0,191,255)
    DRAWTEXT(“Wave E #E#”, barindex + 25, E + (E * 0.003), Dialog, Standard, 12) COLOURED(0,191,255)

    DRAWHLINE(v)coloured(255,0,0)
    DRAWTEXT(“Wave V #V#”, barindex + 25, V + (V * 0.003), Dialog, Standard, 12) COLOURED(255,0,0)

    DRAWHLINE(nt)coloured(225,215,0)
    DRAWTEXT(“Wave NT #NT#”, barindex + 25, NT + (NT * 0.003), Dialog, Standard, 12) COLOURED(225,215,0)

    return n, e, v, nt

Viewing 4 posts - 1 through 4 (of 4 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

Hosoda Projection Indicator


ProBuilder: Indicators & Custom Tools

New Reply
Author
Summary

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

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