File Name: VolumeTriColor.efs

Description:
Volume TriColor

Formula Parameters:
Volume Up Color: Black
Volume Down Color: Red
Volume EQ Color: Magenta


Notes:
Volume is simply the number of shares (or contracts) traded during a specified time
frame (e.g. hour, day, week, month, etc).


Download File:
VolumeTriColor.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:        
    Volume TriColor

Version:            1.0  10/04/2008

Notes:
    Volume is simply the number of shares (or contracts) traded during a specified time
    frame (e.g. hour, day, week, month, etc).

Formula Parameters:                     Default:
    Volume Up Color                       Black
    Volume Down Color                     Red
    Volume EQ Color                       Magenta

**********************************/

var fpArray = new Array();

function 
preMain() {

    
setPriceStudy(false);
    
setShowCursorLabel(true);
    
setShowTitleParametersfalse );
    
    
setStudyTitle("Volume TriColor");
    
setCursorLabelName("VTC"0);

    
setDefaultBarFgColor(Color.black0);
    
setPlotType(PLOTTYPE_HISTOGRAM0); 
    
setDefaultBarThickness(20);

   
    
askForInput();
    var 
x=0;
    
fpArray[x] = new FunctionParameter("PRICEUp"FunctionParameter.COLOR);
    
with(fpArray[x++]){
        
setName("Volume Up Color");
        
setDefault(Color.black);
    }    

    
fpArray[x] = new FunctionParameter("PRICEDown"FunctionParameter.COLOR);
    
with(fpArray[x++]){
        
setName("Volume Down Color");
        
setDefault(Color.red);
    }    

    
fpArray[x] = new FunctionParameter("PRICEEqual"FunctionParameter.COLOR);
    
with(fpArray[x++]){
        
setName("Volume EQ Color");
        
setDefault(Color.magenta);
    }    



}

function 
main(PRICEUpPRICEDownPRICEEqual) {

    if (
getCurrentBarCount 1)
        
setDefaultBarFgColor(Color.black0);
    
    if (
close(0) > close(-1))        
        
setDefaultBarFgColor(PRICEUp0);
    else
        if (
close(0) < close(-1))
            
setDefaultBarFgColor(PRICEDown0);
         else 
            
setDefaultBarFgColor(PRICEEqual0);
      
    return 
volume(0);