GannTrend 2.0 (Lines)

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #148733 quote
    Zigo
    Participant
    Master

    I have posted this indicator in the library today. This indicator give a line(s) in the graph that marks the past trend. If we take two different settings for q, (for example 29 and 13) the lines are convergent or divergent or exceptional equal. The angle that will be created by the two lines gives the direction of the trend.

    Unfortunate the lines not adapt by a new candle. (see 2 attachments). Maybe someone can help find a way to coding this matter.

    // q as a variable 29 and 13 is a good pair to use
    // q = 29 and or 13
    Once j=0
    once ab=q
    
    Z=DPO[AB*2](close)
    if Z=Z[1] and Z[1]=Z[2] and Z[2]<>Z[3] Then
    PP=1
    endif
    //////////////////////////////////////////////////
    N=(AB*2)-4
    P=(N/2)-1
    d100=DPO[n](close)
    m100=close-d100
    cx=(m100-m100[1]+(close[p])/n)*n
    PW = TypicalPrice
    RX= Range
    ///////////////////////////////////////////////////
    SQR1=(SQRT(RX) *180) -225
    SQ1=SQR1/360
    ZZ=SQ1 Mod 100
    So9=SQ1-Zz
    Fxd=PW+(So9*2)
    IF Close > FXD Then
    CS=CX-(So9*1.1618)
    else
    CS=CX+(So9*1.1618)
    endif
    /////////////////////////////////////////////////////
    if pp=1 and pp[1]=0 then
    A=LinearRegressionSlope[AB](CS)
    B=LinearRegression[AB](CS)
    c=(b-a*ab)
    endif
    
    if Pp=0 then
    st=undefined
    else
    J=J+1
    ST=a*j+c
    endif
    STx=(ST/100)*100
    
    Return  STx as "F1 Gann Trend"
    GannTrend1DOW-1-minuut.png GannTrend1DOW-1-minuut.png GannTrend2DOW-1-minuut.png GannTrend2DOW-1-minuut.png
    #148752 quote
    Nicolas
    Keymaster
    Master

    The lines are not updating because you are using DPO which is using the future of the price on its first load. Then, in real time, the indicator will obviously use the current price and therefore not behaves as good as in the past.

    Zigo thanked this post
    #148764 quote
    Zigo
    Participant
    Master

    Thank you Nicolas, for your quick reaction.

    #148767 quote
    Zigo
    Participant
    Master

    @ Nicolas is there anything possible to update the lines?

    #148840 quote
    Zigo
    Participant
    Master

    Higher timeframe.

    DOW-6-uren.png DOW-6-uren.png
    #148852 quote
    Nicolas
    Keymaster
    Master

    That’s pretty similar to a common linear regression?

    Standard Deviation & Standard Error Linear Regression Channel

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

GannTrend 2.0 (Lines)


General Trading: Market Analysis & Manual Trading

New Reply
Author
author-avatar
Zigo @zigo Participant
Summary

This topic contains 5 replies,
has 2 voices, and was last updated by Nicolas
5 years, 5 months ago.

Topic Details
Forum: General Trading: Market Analysis & Manual Trading
Language: English
Started: 10/27/2020
Status: Active
Attachments: 3 files
Logo Logo
Loading...