50% Retrace

Viewing 15 posts - 1 through 15 (of 39 total)
  • Author
    Posts
  • #121852 quote
    Zigo
    Participant
    Master
    Defparam DRAWONLASTBARONLY =true
    defparam CALCULATEONLASTBARS = 300
    
    top=t
    bodem=b
    V=top-bodem
    
    // instappen
    ESH=B+0.5*v
    DRAWHLINE(ESH)
    
    DRAWTEXT("                                        EnterShort=#ESH#", barindex, f*ESH ,dialog, standard, 25)coloured(55,155,250,255)
    
    st2=B+v
    DRAWSEGMENT(barindex[p], st2, barindex[q], st2)coloured(255,55,0,255)
    DRAWTEXT("                                        StopShort=#st2#", barindex, ST2, dialog, standard, 15)coloured(255,55,0,255)
    
    TP0=b
    DRAWSEGMENT(barindex[r],TP0, barindex[q], TP0)coloured(125,125,125,255)
    Drawtext("                                         Lowest=#b#", barindex[21], f*TP0, dialog,standard, 15)coloured(155,155,155,255)
    
    TPSH1=b
    
    DRAWSEGMENT(barindex[p], TPSH1, barindex[q], TPSH1)coloured(255,55,0,255)
    DRAWTEXT("                                       TP 1(Sh)=#TPSH1#", barindex, TPSH1,dialog, standard,15)coloured(255,55,0,255)
    
    TPSH2=t-1.272*V
    DRAWSEGMENT(barindex[p], TPSH2, barindex[q], TPSH2)coloured(255,55,0,255)
    DRAWTEXT("                                          TP 2(Sh)=#TPSH2#", barindex, TPSH2, dialog, standard, 15)coloured(255,55,0,255)
    
    TPSH3= t-1.618*v
    DRAWSEGMENT(barindex[p], TPSH3, barindex[q], TPSH3)coloured(255,55,0,255)
    DRAWTEXT("                                          TP 3(Sh)=#TPSH3#", barindex, TPSH3, dialog, standard, 15)coloured(255,55,0,255)
    
    TPSH4= 2.058-Target4*v
    DRAWSEGMENT(barindex[p], TPSH4, barindex[q], TPSH4)coloured(255,55,0,255)
    DRAWTEXT("                                          TP 4(Sh)=#TPSH4#", barindex, TPSH4, dialog, standard, 15)coloured(255,55,0,255)
    
    begin=top
    DRAWSEGMENT(barindex[r-(round(r/2))],top, barindex[q], top)coloured(125,125,125,255)
    Drawtext("                                         Highest#begin#", barindex[21],f* begin, dialog,Standard, 15)coloured(155,155,155,255)
    
    return top coloured(125,125,125,255)style(dottedline,1)as"Hoogste", ST2 coloured(205,155,55,255)style(dottedline,1) as"StopLoss", ESH coloured(55,55,255,255)style(dottedline,1) as"EnterShort", TPSH1 coloured(0,105,205,255)style(dottedline,1) as"Targetline 1", TPSH2 coloured(0,155,205,255)style(dottedline,1) as"Targetline 2", TPSH3 coloured(0,155,205,255)style(dottedline,1) as"Targetline 3", TPSH4 coloured(0,155,205,255)style(dottedline,1) as"Targetline 4", TP0 coloured(125,125,125,255)style(dottedline,1)as "bodem"
    Fabiano thanked this post
    #121854 quote
    Zigo
    Participant
    Master

    At this very moment TP 1 has already reached. See also the firt entry at 13;18:00 Less than an hour later it has reach TP 2.

    In the graph you can see T’s and B’ (Tops and Bottoms) its a pitty but this is another indicator and I want to integrate this indicator with the T’s and B’s into the first indicator on line 4, 5 and 6

    Because  in the indicator shown I have to add to much parameters as you can see in the first attachementy.

    The second attachement shows the completition of TP1

    #121865 quote
    Zigo
    Participant
    Master
    once n =5
    once lastpoint = 0
    
    if High[n] >= highest[2*n+1](high) then
    LH = 1
    Topy = High[n]
    Topx = barindex[n]
    
    //Previous Top
    
    PT=highest[n+1](high)
    DRAWSEGMENT(barindex, PT, barindex[n], PT)coloured(0,205,0,255)
    elsif Low[n] <= lowest[2*n+1](low)  then
    LL = -1
    Bottemy = low[n]
    Bottemx = barindex[n]
    PB=lowest[n+1](low)
    DRAWSEGMENT(barindex, PB, barindex[n], PB)coloured(255,55,55,255)
    else
    LL = 0
    LH = 0
    endif
    if LH>0 and (lastpoint=-1 or lastpoint=0) then
    DRAWTEXT("T",TOPx,TOPy+AverageTrueRange[14](close),Dialog,Bold,20) coloured(0,205,0,255)
    lastpoint = 1
    lastX = TOPx
    lastY = TOPy
    
    endif
    
    if LL<0 and (lastpoint=1 or lastpoint=0) then
    DRAWTEXT("B",Bottemx,Bottemy-AverageTrueRange[14](close),Dialog, bold, 20) coloured(251,55,0,255)
    lastpoint = -1
    lastX = Bottemx
    lastY = Bottemy
    endif
    
    RETURN lastX as"Last Top", LastY as "Last Bottem", PT as "Previous Top",PB as "Previous Bottem"
    
    Fabiano thanked this post
    #121873 quote
    Zigo
    Participant
    Master

    There is a fault on line 35 in the first indicator it must be:

    TPSH4= t-Target4*v
    #121923 quote
    Zigo
    Participant
    Master
    Defparam DRAWONLASTBARONLY =true
    defparam CALCULATEONLASTBARS = 300
    
    once r=25
    
    Top=t
    Bodem=b
    V=top-bodem
    
    // instappen
    EL=b+0.50*v
    
    DRAWTEXT(" #el# Enter(Long)", barindex, el,dialog, standard, 18)coloured(0,105,255,255)
    
    st=b
    DRAWSEGMENT(barindex, st, barindex[r], st)coloured(0,125,25,255)
    DRAWTEXT(" #b# Initial (Stop)", barindex, St,dialog,standard,15)coloured(150,55,25,255)
    
    TP0=t
    
    Drawtext("Last Valuble Top", barindex[15],1.0015*TP0, dialog,standard, 15)coloured(205,0,255,255)
    
    TP1=b+v
    
    DRAWTEXT(" TP1(long) #TP1#", barindex, TP1, dialog, standard, 15)coloured(0,155,50,255)
    
    TP2=b+1.272*V
    
    DRAWTEXT(" TP2(Long) #TP2#", barindex,TP2, dialog,standard,15)coloured(0,155,20,255)
    
    TP3=b+1.618*v
    
    DRAWTEXT(" TP3(Long)#TP3#", barindex,TP3, dialog, standard,15)coloured(0,155,25,255)
    
    TP4= B+2.058*v
    
    DRAWTEXT(" TP4(Long)#TP4#", barindex, TP4, dialog, standard,15)coloured(0,155,25,255)
    
    begin=bodem
    
    Drawtext("Last Valuble Bottem", barindex[15],1.0015* begin, dialog,standard, 15)coloured(205,0,255,255)
    
    return begin coloured(125,125,125,255)style(line,2)as "Start", El coloured(0,155,250,255)style(line,2) as"Enter", St coloured(125,105,55,255)as"Stop",TP0 coloured(125,125,125,255)style(line, 2)as"begin", TP2 as"Targetlijn 2", TP3 as"Targetrlijn3", TP4 as"Targetlijn 4"
    #121932 quote
    Zigo
    Participant
    Master
    Defparam DRAWONLASTBARONLY =true
    defparam CALCULATEONLASTBARS = 300
    
    once r=25
    
    Top=t
    Bodem=b
    V=top-bodem
    
    // instappen
    EL=b+0.50*v
    
    DRAWTEXT("                                               #el# Enter(Long)", barindex, el,dialog, standard, 18)coloured(0,105,255,255)
    
    st=b
    DRAWSEGMENT(barindex, st, barindex[r], st)coloured(0,125,25,255)
    DRAWTEXT("                                                                 #b# Initial (Stop)", barindex, St,dialog,standard,15)coloured(150,55,25,255)
    
    TP0=t
    
    Drawtext("Last Valuble Top", barindex[15],1.0015*TP0, dialog,standard, 15)coloured(205,0,255,255)
    
    
    TP1=b+v
    
    DRAWTEXT("                                                                    TP1(long) #TP1#", barindex, TP1, dialog, standard, 15)coloured(0,155,50,255)
    
    TP2=b+1.272*V
    
    DRAWTEXT("                                                                       TP2(Long) #TP2#", barindex,TP2, dialog,standard,15)coloured(0,155,20,255)
    
    TP3=b+1.618*v
    
    DRAWTEXT("                                                                        TP3(Long)#TP3#", barindex,TP3, dialog, standard,15)coloured(0,155,25,255)
    
    TP4= B+2.058*v
    
    DRAWTEXT("                                                                        TP4(Long)#TP4#", barindex, TP4, dialog, standard,15)coloured(0,155,25,255)
    
    begin=bodem
    
    Drawtext("Last Valuble Bottem", barindex[15],1.0015* begin, dialog,standard, 15)coloured(205,0,255,255)
    
    return begin coloured(125,125,125,255)style(line,2)as "Start", El coloured(0,155,250,255)style(line,2) as"Enter", St coloured(125,105,55,255)as"Stop",TP0 coloured(125,125,125,255)style(line, 2)as"begin", TP2 as"Targetlijn 2", TP3 as"Targetrlijn3", TP4 as"Targetlijn 4"
    #122010 quote
    eckaw
    Participant
    Veteran

    Hi Zigo,

    I get an error message:

    Syntax error:

    The following variable is undefined: t

    The following variable is undefined: b

    Do you know how to fix this?

    #122037 quote
    Zigo
    Participant
    Master

    Thats wy I asking help to integrate the two indicators. Because you have to gice in the last top and the last bottem, they change.

    #122039 quote
    Fabiano
    Participant
    Veteran

    Hello, please what am I wrong?
    Thanks for your help

    #122044 quote
    Zigo
    Participant
    Master

    The last top and Last bottem is manually , fill in the values as is mentioned above. (10:33 AM)

    The values in the indicator are from USDJPY, replace them.

    #122048 quote
    Zigo
    Participant
    Master

    @Fabiano maybe my topic “Wanted help to integrate two indicators” can help you and others.

    #122052 quote
    Fabiano
    Participant
    Veteran

    Unfortunately I’m not a programmer, I understand little about codes. Sorry thanks

    #122067 quote
    Zigo
    Participant
    Master

    @ Fabiano, I hope your syntax error is solved? You have to

    Fill in the last valuable bottem B

    Fill in last valuable top T

    #122070 quote
    Zigo
    Participant
    Master

    Furthermore I realy would appreciate that the programming adapt the Stoploss changes. If TP1 is reached the stoploss = BreakEven, If TP2 is reached stoploss = TP1 If TP3 is reached Stoploss = TP2 and so on. In the attachement stoploss= TP1.

    #122740 quote
    Zigo
    Participant
    Master

    We shall see.

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

50% Retrace


ProBuilder support

New Reply
Author
author-avatar
Zigo @zigo Participant
Summary

This topic contains 38 replies,
has 7 voices, and was last updated by Zigo
5 years, 8 months ago.

Topic Details
Forum: ProBuilder support
Language: English
Started: 03/11/2020
Status: Active
Attachments: 29 files
Logo Logo
Loading...