2010 Feb: Barbara Star 350 Swing Trade

ICE Data Services -

RSI_3.efs, RSI_MA.efs, 350_Swing_Alert.efs, 350_Swing_Indicator.efs  
EFSLibrary - Discussion Board  

File Name:

  • RSI_3.efs
  • RSI_MA.efs
  • 350_Swing_Alert.efs
  • 350_Swing_Indicator.efs

Description:

RSI_3.efs
Barbara Star Swing Study - 350 Swing Indicator

RSI_MA.efs
Barbara Star Swing Study - MA RSI Indicator

350_Swing_Alert.efs
Barbara Star Swing Study - Signals

350_Swing_Indicator.efs
Barbara Star Swing Study - Signals

Formula Parameters:

RSI_3.efs

  • RSI Length : 3

RSI_MA.efs

  • RSI Length : 3
  • MA Length : 3

350_Swing_Alert.efs

  • RSI Length : 3
  • MA Length : 3
  • Signal Color Up : Green
  • Signal Color Down: Red
  • Signal Size : 10

350_Swing_Indicator.efs

  • RSI Length : 3
  • Bar Color Up : Green
  • Bar Color Down : Red

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

Download File:
RSI_3.efs
RSI_MA.efs
350_Swing_Alert.efs
350_Swing_Indicator.efs




EFS Code:

  • RSI_3.efs
/*********************************
Provided By:  
    eSignal (Copyright c eSignal), a division of Interactive Data 
    Corporation. 2009. 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:        
    Barbara Star Swing Study - 350 Swing Indicator
    
Version:            1.0  08/08/2009
 
Formula Parameters:                                         Default:

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

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

var xRSI = null;
var bInit = false;
var bCharts = false;

function preMain() {
	setStudyTitle("RSI 3");
	setShowCursorLabel(true);
	setShowTitleParameters(true);
	setPriceStudy(false);
	
    setStudyMin(0);	
    setStudyMax(100);
	
	setCursorLabelName("RSI 3", 0);
	setDefaultBarFgColor(Color.red, 0);
	setPlotType(PLOTTYPE_LINE, 0);
	setDefaultBarThickness(2, 0);
	
	var fp1 = new FunctionParameter("nLength", FunctionParameter.NUMBER);
	fp1.setName("RSI Length");
	fp1.setDefault(3);
	
}
function main(nLength) {
	if (!bInit) {
		xRSI = rsi(nLength);
        addBand(25, PS_SOLID, 1, Color.grey, "25");
        drawTextAbsolute(-2,28,"25",Color.black,null,null,"Arial",10,"T25");
        
        addBand(50, PS_SOLID, 1, Color.black, "50");
        drawTextAbsolute(-2,53,"50",Color.black,null,null,"Arial",10,"T50");
        
        addBand(80, PS_SOLID, 1, Color.grey, "80");
        drawTextAbsolute(-2,83,"80",Color.black,null,null,"Arial",10,"T80");
		bInit = true;
	}

	var nRSI = xRSI.getValue(0);
	if (nRSI == null) return;
	
	
	return  nRSI;
	
}
  • RSI_MA.efs
/*********************************
Provided By:  
    eSignal (Copyright c eSignal), a division of Interactive Data 
    Corporation. 2009. 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:        
    Barbara Star Swing Study - MA RSI Indicator
    
Version:            1.0  08/08/2009
 
Formula Parameters:                     Default:
    

RSI Length          - Length for the RSI                             3                          
MA Length          - Length for the Moving Avg of                    3           

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


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

var xRSI = null;
var xMA = null;
var bInit = false;

function preMain() {

	setStudyTitle("RSI MA");
	setShowTitleParameters(true);

	setStudyMin(0);
	setStudyMax(100);

	setCursorLabelName("RSI MA", 0);
	setDefaultBarFgColor(Color.darkgrey, 0);
	setPlotType(PLOTTYPE_LINE, 0);
	setDefaultBarThickness(2, 0);
	
	var fp1 = new FunctionParameter("nRSILength", FunctionParameter.NUMBER);
	fp1.setName("RSI Length");
	fp1.setDefault(3);
	
	var fp2 = new FunctionParameter("nMALength", FunctionParameter.NUMBER);
	fp2.setName("MA Length");
	fp2.setDefault(3);
}
function main(nRSILength, nMALength) {
	if (!bInit) {
		xRSI = rsi(nRSILength);
		xMA = sma(nMALength, xRSI);
		
        addBand(20, PS_SOLID, 1, Color.grey, "20");
        drawTextAbsolute(-2,23,"20",Color.black,null,null,"Arial",10,"20");
        
        addBand(80, PS_SOLID, 1, Color.grey, "80");
        drawTextAbsolute(-2,83,"80",Color.black,null,null,"Arial",10,"80");
        
		bInit = true;
	}
	
	var nMA = xMA.getValue(0);
	if (nMA == null) return;
	
	return  nMA;

}
  • 350_Swing_Alert.efs
/*********************************
Provided By:  
    eSignal (Copyright c eSignal), a division of Interactive Data 
    Corporation. 2009. 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:        
    Barbara Star Swing Study - Signals
    
Version:            1.0  08/08/2009
 
Formula Parameters:                                             Default:

RSI Length          - Length for the RSI                             3                          
MA Length          - Length for the Moving Avg of                    3           
Signal Color Up     - Signal Color when MA RSI crosses above       Green
                      80

Signal Color Down   - Signal Color when MA RSI crosses below         Red
                      20
                      
Signal Size         - Signal (Diamond)  size                         10
                      
    
    
    
Notes:
    The related article is copyrighted material. If you are not a subscriber
    of Stocks & Commodities, please visit www.traders.com.

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

debugClear();
var bNewBar = false;
var bAlert = false;
var xRSI = null;
var xRT = null;
var bInit = false;

function preMain() {
	setStudyTitle("350 Swing Alert");
	setPriceStudy(true);
	
	setDefaultPriceBarColor(Color.black);
	
	setShowCursorLabel(false);
	
	var fp1 = new FunctionParameter("nRSILength", FunctionParameter.NUMBER);
	fp1.setName("RSI Length");
	fp1.setDefault(3);
	
	var fp2 = new FunctionParameter("nMALength", FunctionParameter.NUMBER);
	fp2.setName("MA Length");
	fp2.setDefault(3);
	
	var fp3 = new FunctionParameter("cUpColor", FunctionParameter.COLOR);
	fp3.setName("Signal Color UP");
	fp3.setDefault(Color.green);
	
	var fp4 = new FunctionParameter("cDownColor", FunctionParameter.COLOR);
	fp4.setName("Signal Color DOWN");
	fp4.setDefault(Color.red);
	
	var fp5 = new FunctionParameter("SignalSize", FunctionParameter.NUMBER);
	fp5.setName("Diamond Size");
	fp5.setDefault(10);
}
function main(nRSILength, nMALength, cUpColor, cDownColor, SignalSize) {

var ci = getCurrentBarIndex();

	if (!bInit) {
		xRSI = rsi(nRSILength);
		xMA = sma(nMALength, xRSI);
		xRT= rawtime();
		bInit = true;
	}
	
	var nMA = xMA.getValue(0);
	if (nMA == null) return;
	
	var nRT = xRT.getValue(0);
	
	if (nMA >= 80) 
        drawTextRelative (0, AboveBar2, "\u0075", cDownColor, null, Text.PRESET | Text.CENTER | Text.ONTOP, "Wingdings",SignalSize , "tagDown" + nRT );
	else 
        removeText("tagDown" + nRT);

    if (nMA <= 20) 
        drawTextRelative (0, BelowBar2, "\u0075", cUpColor, null , Text.PRESET | Text.CENTER | Text.ONTOP, "Wingdings",SignalSize  , "tagUp" + nRT);
    else
        removeText("tagUp" + nRT);
	
}
  • 350_Swing_Indicator.efs
/*********************************
Provided By:  
    eSignal (Copyright c eSignal), a division of Interactive Data 
    Corporation. 2009. 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:        
    Barbara Star Swing Study - Signals
    
Version:            1.0  08/08/2009
 
Formula Parameters:                                     Default:

RSI Length     - Length for the RSI                     3                          
Bar Color Up   - Bar Color when RSI crosses above       Green
                 50

Bar Color Down - Bar Color when RSI crosses below       Red
                 50
    
Notes:
    The related article is copyrighted material. If you are not a subscriber
    of Stocks & Commodities, please visit www.traders.com.

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

debugClear();
var bNewBar = false;
var bAlert = false;
var xRSI = null;
var bInit = false;

function preMain() {
	setStudyTitle("350 Swing Indicator");
	setPriceStudy(true);
	setColorPriceBars(true);
	setDefaultPriceBarColor(Color.black);
	
	setShowCursorLabel(false);
	
	var fp1 = new FunctionParameter("nRSILength", FunctionParameter.NUMBER);
	fp1.setName("RSI Length");
	fp1.setDefault(3);
	
	var fp2 = new FunctionParameter("cUpColor", FunctionParameter.COLOR);
	fp2.setName("Bar Color UP");
	fp2.setDefault(Color.green);
	
	var fp3 = new FunctionParameter("cDownColor", FunctionParameter.COLOR);
	fp3.setName("Bar Color DOWN");
	fp3.setDefault(Color.red);
	

}
function main(nRSILength, cUpColor, cDownColor) {

	if (!bInit) {
		xRSI = rsi(nRSILength);
		bInit = true;
	}
	
	var nRSI = xRSI.getValue(0);
	if (nRSI == null) return;

	
	if (nRSI > 50) 
        setPriceBarColor(cUpColor);
	else if (nRSI < 50) 
        setPriceBarColor(cDownColor);
	else 
        setPriceBarColor(Color.black);
	
}