Jump to content
Medved Trader Forums

After hrs volume


Recommended Posts

One of my trading strategies is to enter stocks occasionally after hours; for instance SNAP this past week.   To enter I need three characteristics; I need to know the news or earnings info; I need to see the right type of after hours price action and I want to see a high % of daily volume traded after hrs; normally at least 20% before I'd take an entry.    Is it possible and if so can you give me some ideas on how to create an indicator that might display the after hrs volume % somewhere on the chart?  Something like where the pace indicator displays.

So if the stock averages 5M shares a day and after hours 1M shares have traded it would show 20%.

Edited by mlsignups
Link to comment
Share on other sites

int DayNumber = -1;

public void MainCalculation()
{
    
    if (TradingDay.DayNumber != DayNumber)
    {
      CurrentState.AHVol  = 0;
      CurrentState.RegVol = 0;
      DayNumber           = TradingDay.DayNumber;
    }
    
    if (TradingDay.IsAfterHours)
        CurrentState.AHVol += BarVolume;
    else 
        CurrentState.RegVol += BarVolume;
    SetColor("Line Color", SysColor.MainIndicator1);
    SetYValue(CurrentState.RegVol==0?0:CurrentState.AHVol*100/CurrentState.RegVol);
}

/// <summary>
/// Is called at start of paintbar calculation, should be used to initialize anything needed for the paintbar
/// </summary>
private void PaintbarInitialize()
{
      CurrentState.AHVol  = 0;
      CurrentState.RegVol = 0;
}

/// <summary>
/// Holds paintbar state - fill with variables needed to be preserved for next paintbar calc
/// </summary>
private struct PaintbarState
{
    public double AHVol;
    public double RegVol;
}

/// <summary>
/// Holds current PB state - use to calc PB, changes to it carry over to next PB calc
/// </summary>
private PaintbarState CurrentState;

/// <summary>
/// Holds saved PB state - internal
/// </summary>
private PaintbarState SavedState;

/// <summary>
/// Is called at start of paintbar calculation, should be used to clear the paintbar state
/// </summary>
private void PaintbarClearState()
{
    CurrentState = new PaintbarState();
}

/// <summary>
/// Saves paintbar state (called internally).
/// </summary>
private void PaintbarSaveState()
{
    SavedState = CurrentState;
}

/// <summary>
/// Restores paintbar state (called internally).
/// </summary>
private void PaintbarRestoreState()
{
    CurrentState = SavedState;
}

 

image.png

 

In fact you can use the same paintbar as a scan - just set the SetScanResult as well as the SetYValue.

 

Isn't MedvedTrader fun?

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

I was able to see this on the chart; I think it's going to be great.  And I think it may even be better as a scan result.   if I'm watching a # of stocks during earnings after hrs; will be easier to see the ones that immediately jump to say 10% or 20% of normal volume as they are the ones that typically turn out most interesting.  Thanks again.

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...