Announcement

Collapse
No announcement yet.

Can't get the BidAskVolume.efs program to work.

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

  • Can't get the BidAskVolume.efs program to work.

    I downloaded Jason K programs from eSignal, but could not get them to work. The programs are:

    BidAskVolume.efs
    BidAskVolumeRatio.efs

    When I save them to my computer and download them to a chart, all I get is a blank, no volumes of any kind show up. What am I doing wrong?

    The BidAskVolume.efs program is below:

    PHP Code:
    /*****************************************************************
    Provided By : eSignal. (c) Copyright 2003
    *****************************************************************/

    function preMain() {
        
    setStudyTitle("Bid\/Ask Volume");
        
    setCursorLabelName("Bid Vol"0);
        
    setCursorLabelName("Inside Vol"1);
        
    setCursorLabelName("Ask Vol"2);
        
    setDefaultBarFgColor(Color.blue0);
        
    setDefaultBarFgColor(Color.lime1);
        
    setDefaultBarFgColor(Color.red2);
        
    setDefaultBarThickness(80);
        
    setDefaultBarThickness(61);
        
    setDefaultBarThickness(42);
        
    setPlotType(PLOTTYPE_HISTOGRAM0);
        
    setPlotType(PLOTTYPE_HISTOGRAM1);
        
    setPlotType(PLOTTYPE_HISTOGRAM2);
    }

    var 
    nBidVol 0;
    var 
    nInsideVol 0;
    var 
    nAskVol 0;
    var 
    vVol null;
    var 
    bPrimed false;

    function 
    main() {
        if (
    getCurrentBarIndex() < 0) return;

        var 
    nState getBarState();    
        if (
    nState == BARSTATE_NEWBAR) {
            
    nBidVol 0;
            
    nInsideVol 0;
            
    nAskVol 0;
            
    vVol 0;
        }
        
        var 
    vPrevVol null;
        if (
    vVol != null && bPrimed == truevPrevVol vVol;
        
        var 
    nAsk getMostRecentAsk();
        var 
    nBid getMostRecentBid();
        var 
    vClose close();
        
    vVol volume();
        
        var 
    vTradeVol vVol vPrevVol;
        
        if (
    bPrimed == false && vVol != null) {
            
    bPrimed true;
            return;
        } else {
            if (
    vClose <= nBid) {
                
    nBidVol += vTradeVol;
            } else if (
    vClose >= nAsk) {
                
    nAskVol += vTradeVol;
            } else {
                
    nInsideVol += vTradeVol;
            }
        }
        
        return new Array(
    nBidVolnInsideVolnAskVol);


  • #2
    Re: Can't get the BidAskVolume.efs program to work.

    WantToLearn
    See the Notes of this and this article in the EFS KnowledgeBase
    Alex


    Originally posted by WantToLearn
    I downloaded Jason K programs from eSignal, but could not get them to work. The programs are:

    BidAskVolume.efs
    BidAskVolumeRatio.efs

    When I save them to my computer and download them to a chart, all I get is a blank, no volumes of any kind show up. What am I doing wrong?

    The BidAskVolume.efs program is below:

    PHP Code:
    /*****************************************************************
    Provided By : eSignal. (c) Copyright 2003
    *****************************************************************/

    function preMain() {
        
    setStudyTitle("Bid\/Ask Volume");
        
    setCursorLabelName("Bid Vol"0);
        
    setCursorLabelName("Inside Vol"1);
        
    setCursorLabelName("Ask Vol"2);
        
    setDefaultBarFgColor(Color.blue0);
        
    setDefaultBarFgColor(Color.lime1);
        
    setDefaultBarFgColor(Color.red2);
        
    setDefaultBarThickness(80);
        
    setDefaultBarThickness(61);
        
    setDefaultBarThickness(42);
        
    setPlotType(PLOTTYPE_HISTOGRAM0);
        
    setPlotType(PLOTTYPE_HISTOGRAM1);
        
    setPlotType(PLOTTYPE_HISTOGRAM2);
    }

    var 
    nBidVol 0;
    var 
    nInsideVol 0;
    var 
    nAskVol 0;
    var 
    vVol null;
    var 
    bPrimed false;

    function 
    main() {
        if (
    getCurrentBarIndex() < 0) return;

        var 
    nState getBarState();    
        if (
    nState == BARSTATE_NEWBAR) {
            
    nBidVol 0;
            
    nInsideVol 0;
            
    nAskVol 0;
            
    vVol 0;
        }
        
        var 
    vPrevVol null;
        if (
    vVol != null && bPrimed == truevPrevVol vVol;
        
        var 
    nAsk getMostRecentAsk();
        var 
    nBid getMostRecentBid();
        var 
    vClose close();
        
    vVol volume();
        
        var 
    vTradeVol vVol vPrevVol;
        
        if (
    bPrimed == false && vVol != null) {
            
    bPrimed true;
            return;
        } else {
            if (
    vClose <= nBid) {
                
    nBidVol += vTradeVol;
            } else if (
    vClose >= nAsk) {
                
    nAskVol += vTradeVol;
            } else {
                
    nInsideVol += vTradeVol;
            }
        }
        
        return new Array(
    nBidVolnInsideVolnAskVol);

    Comment

    Working...
    X