Announcement

Collapse
No announcement yet.

2001 Aug: Balance Of Market Power, by Igor Livshin

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 2001 Aug: Balance Of Market Power, by Igor Livshin

    File Name: BalanceOfMarketPower.efs

    Description:
    Balance Of Market Power, by Igor Livshin

    Formula Parameters:
    Length: 14
    Line Thickness: 2
    Line Color: Green
    Display Cursor Labels: True


    Notes:
    The related article is copyrighted material. If you are not
    a subscriber of Stocks & Commodities, please visit www.traders.com.


    Download File:
    BalanceOfMarketPower.efs



    EFS Code:
    PHP Code:
    /*********************************
    Provided By:  
        eSignal (Copyright c eSignal), a division of Interactive Data 
        Corporation. 2008. All rights reserved. This sample eSignal 
        Formula Script (EFS) is for educational purposes only and may be 
        modified and saved under a new file name.  eSignal is not responsible
        for the functionality once modified.  eSignal reserves the right 
        to modify and overwrite this EFS file with each new release.

    Description:        
        Balance Of Market Power, by Igor Livshin

    Version:            1.0  12/05/2008

    Formula Parameters:                     Default:
        Length                              14
        Line Thickness                      2
        Line Color                          Green
        Display Cursor Labels               True
        
    Notes:
        The related article is copyrighted material. If you are not
        a subscriber of Stocks & Commodities, please visit [url]www.traders.com.[/url]
    **********************************/

    var fpArray = new Array();
    var 
    bInit false;
    var 
    bVersion null;

    function 
    preMain() {
        
    setPriceStudy(false);
        
    setShowCursorLabel(false);
        
    setShowTitleParametersfalse );
        
    setStudyTitle("Balance Of Market Power");
        
    setCursorLabelName("BMP"0);
        
    setDefaultBarFgColor(Color.red0);
        
    setPlotType(PLOTTYPE_LINE0); 
        
    setDefaultBarThickness(20);
       
        
    askForInput();
        var 
    x=0;
        
    fpArray[x] = new FunctionParameter("LineColor"FunctionParameter.COLOR);
        
    with(fpArray[x++]){
            
    setName("Line Color");
            
    setDefault(Color.green);
        }    
        
    fpArray[x] = new FunctionParameter("ViewValue"FunctionParameter.BOOLEAN);
        
    with(fpArray[x++]){
            
    setName("Display Cursor Labels");
            
    setDefault(true);
        }    
        
    fpArray[x] = new FunctionParameter("Length"FunctionParameter.NUMBER);
        
    with(fpArray[x++]){
            
    setLowerLimit(1);        
            
    setDefault(14);
        }
        
    fpArray[x] = new FunctionParameter("Thickness"FunctionParameter.NUMBER);
        
    with(fpArray[x++]){
            
    setName("Line Thickness");
            
    setLowerLimit(1);        
            
    setDefault(2);
        }
    }

    var 
    xPrev_BMP null;
    var 
    xBMP null;

    function 
    main(LengthThicknessLineColorViewValue) {
    var 
    nBMP 0;
        if (
    bVersion == nullbVersion verify();
        if (
    bVersion == false) return;   

        if ( 
    bInit == false ) { 
            
    setDefaultBarFgColor(LineColor0);
            
    setDefaultBarThickness(Thickness0);
            
    setShowCursorLabel(ViewValue);        
            
    xPrev_BMP efsInternal("Calc_BMP");
            
    xBMP sma(LengthxPrev_BMP);
            
    bInit true
        } 

        
    nBMP xBMP.getValue(0);
        return 
    nBMP
    }

    function 
    Calc_BMP(){
    var 
    nRes 0;
        if (
    high(0) - low(0) == 0) return;
        
    nRes = (close(0) - open(0)) / (high(0) - low(0));
        if (
    nRes == nullnRes 1;
        return 
    nRes;
    }

    function 
    verify() {
        var 
    false;
        if (
    getBuildNumber() < 779) {
            
    drawTextAbsolute(535"This study requires version 8.0 or later."
                
    Color.whiteColor.blueText.RELATIVETOBOTTOM|Text.RELATIVETOLEFT|Text.BOLD|Text.LEFT,
                
    null13"error");
            
    drawTextAbsolute(520"Click HERE to [email protected]=http://www.esignal.com/download/default.asp"
                
    Color.whiteColor.blueText.RELATIVETOBOTTOM|Text.RELATIVETOLEFT|Text.BOLD|Text.LEFT,
                
    null13"upgrade");
            return 
    b;
        } else {
            
    true;
        }
        return 
    b;

Working...
X