Modifica indicatore Fractals zig-zag

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #240055 quote
    Msport71
    Participant
    Senior

    Buongiorno,

    Vorrei chiedere la cortesia di modificare l’indicatore in oggetto, affinché invece degli Square indichi la differenza in punti tra ogni top e Bottom.

    Grazie e mille  per l’aiuto.

     

    Fractals ZigZag

    #240062 quote
    Iván González
    Moderator
    Legend

    Ciao. Eccolo qui:

    //---external parameters
    cp = 20
    
    once lastpoint = 0
    
    if high[cp] >= highest[2*cp+1](high) then
    LH = 1
    else
    LH = 0
    endif
    
    if low[cp] <= lowest[2*cp+1](low)  then
    LL = -1
    else
    LL = 0
    endif
    
    if LH = 1 then
    TOPy = high[cp]
    TOPx = barindex[cp]
    endif
    
    if LL = -1 then
    BOTy = low[cp]
    BOTx = barindex[cp]
    endif
    
    if LH>0 and (lastpoint=-1 or lastpoint=0) then
    DRAWSEGMENT(lastX,lastY,TOPx,TOPy) COLOURED(200,0,0,255)
    diff=TOPy-lastY
    DRAWTEXT("Diff:#diff#",TOPx,TOPy,Dialog,Bold,15) coloured(0,200,0,255)
    lastpoint = 1
    lastX = TOPx
    lastY = TOPy
    endif
    
    if LL<0 and (lastpoint=1 or lastpoint=0) then
    DRAWSEGMENT(lastX,lastY,BOTx,BOTy) COLOURED(0,200,0,255)
    diff=BOTy-lastY 
    DRAWTEXT("Diff:#diff#",BOTx,BOTy,Dialog,Bold,15) coloured(200,0,0,255)
    lastpoint = -1
    lastX = BOTx
    lastY = BOTy
    endif
    
    RETURN
    Msport71 thanked this post
Viewing 2 posts - 1 through 2 (of 2 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

Modifica indicatore Fractals zig-zag


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
author-avatar
Msport71 @carlo-pasca Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Iván González
1 year, 10 months ago.

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 11/07/2024
Status: Active
Attachments: No files
Logo Logo
Loading...