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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    44 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    58 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    35 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    95 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    59 views
    0 likes
    Last Post PaulMohn  
    Working...
    X