Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Accumulation distribution formula larry william for stocks

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Accumulation distribution formula larry william for stocks

    hello..
    I'm reading an old book by Larry William that says:

    "In a concise form the equation is this: Close minus the opening, divided by high
    minus the low, times daily volume = net buying or selling volume for the day (net
    daily A/D figure).

    This is equated as :
    close-open
    -----------------
    high -low X total volume = net buying or selling pressure for the day."

    can you help me write this indicator?please

    thank you very much

    Simone

    #2
    Hello lion1980, thanks for your note.

    The first thing the script will need is a secondary daily series. This will let us get the daily volume. Use AddDataSeries() to add a daily series.

    After this, in BarsInProgress == 0, perform the calculation:

    Code:
    [I]protected override void OnStateChange()
            {
                if (State == State.SetDefaults)
                {
                    ...
                    AddPlot(Brushes.Red, "MyPlot");
                }
                else if (State == State.Configure)
                {
                    AddDataSeries(BarsPeriodType.Day, 1);
                }
            }
    
            protected override void OnBarUpdate()
            {
                if(CurrentBars[1] < 1 || CurrentBars[0] < 1)
                    return;
    
                if(BarsInProgress == 0)
                {
                    Value[0] = (Close[0] - Open[0])/((High[0] - Low[0])*Volumes[1][0]);
                }
    
            }[/I]

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    571 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    330 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    548 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    548 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X