Trading without indicators

Viewing 3 posts - 451 through 453 (of 453 total)
  • Author
    Posts
  • #265218 quote
    shugshug
    Participant
    Average

    even managed to draw a satalight dish on my screen lol.

    Screenshot-2026-09-18-174529.png Screenshot-2026-09-18-174529.png
    #265219 quote
    shugshug
    Participant
    Average
    // ================================================================
    // GBM Projection Cone — Ito's Lemma closed-form solution
    // S(t) = S0 * EXP( (mu - 0.5*sigma^2)*t + sigma*W(t) )
    // Plotted here as E[S(t)] with a +/- K*sigma*sqrt(t) lognormal band
    // ================================================================
    
    DEFPARAM DrawOnLastBarOnly = true
    
    // ---------- inputs ----------
    Length = 100  // bars of history used to estimate mu and sigma
    Horizon = 30  // bars projected into the future
    K    = 2   // confidence band width, in std devs of ln(S)
    
    // ---------- estimate mu and sigma from log returns ----------
    SumR = 0
    SumR2 = 0
    FOR i = 0 TO Length-1 DO
    r = LOG(Close[i]/Close[i+1])
    SumR = SumR + r
    SumR2 = SumR2 + r*r
    NEXT
    
    Mu  = SumR/Length
    Var  = SumR2/Length - Mu*Mu
    Sigma = SQRT(MAX(Var,0))
    
    // ---------- draw the projection cone from the current bar ----------
    S0   = Close
    PrevMed = S0
    PrevUp = S0
    PrevDn = S0
    
    FOR t = 1 TO Horizon DO
    Med = S0 * EXP((Mu - 0.5*Sigma*Sigma)*t)
    Up = Med * EXP(K*Sigma*SQRT(t))
    Dn = Med * EXP(-K*Sigma*SQRT(t))
    
    DRAWSEGMENT(BarIndex+t-1, PrevMed, BarIndex+t, Med) COLOURED(0,90,200)
    DRAWSEGMENT(BarIndex+t-1, PrevUp, BarIndex+t, Up) COLOURED(160,160,160)
    DRAWSEGMENT(BarIndex+t-1, PrevDn, BarIndex+t, Dn) COLOURED(160,160,160)
    
    PrevMed = Med
    PrevUp = Up
    PrevDn = Dn
    NEXT
    
    RETURN
    
    #265220 quote
    shugshug
    Participant
    Average

    I’m not endorsing any of the above if someone wants to play with it good luck!

Viewing 3 posts - 451 through 453 (of 453 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

Trading without indicators


General Trading: Market Analysis & Manual Trading

New Reply
Author
author-avatar
shug @shug Participant
Summary

This topic contains 452 replies,
has 21 voices, and was last updated by shugshug
2 days, 14 hours ago.

Topic Details
Forum: General Trading: Market Analysis & Manual Trading
Language: English
Started: 07/30/2020
Status: Active
Attachments: 117 files
ProRealCode ProRealCode
Loading...