Announcement

Collapse
No announcement yet.

# of trades

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

  • # of trades

    Hello,

    Does anyone have an EFS that will show total # of trades for a given stock.

    Thanks,
    Brian

  • #2
    Hello Brian,

    The code below should do the trick. By the way, I did a search for "trades AND count" and found this.

    PHP Code:
    function preMain() {
        
    setStudyTitle("Trade Count")
        
    setCursorLabelName("Trades ")
        
    setPlotType(PLOTTYPE_HISTOGRAM);
    }

    var 
    TradeCount 0;

    function 
    main() {
        if (
    getCurrentBarIndex() != 0) {
            return;
        }
        if (
    getBarState() == BARSTATE_NEWBAR) {
            
    TradeCount 0;
        }
        
    TradeCount += 1;
        return 
    TradeCount;

    Jason K.
    Project Manager
    eSignal - an Interactive Data company

    EFS KnowledgeBase
    JavaScript for EFS Video Series
    EFS Beginner Tutorial Series
    EFS Glossary
    Custom EFS Development Policy

    New User Orientation

    Comment


    • #3
      Thank you

      Comment

      Working...
      X