Announcement

Collapse
No announcement yet.

2005 Nov: Improve Your Trading System With Speed (Speed.efs)

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

  • 2005 Nov: Improve Your Trading System With Speed (Speed.efs)

    File Name: Speed.efs

    Description:
    This formula is based on the November 2005 article, Improve Your Trading System With Speed, by Gomu Vetrivel.

    Formula Parameters:
    NA


    Notes:
    The study plots a histogram of the speed value multiplied by 100. The histogram bar will be colored green when greater than the previous value, red when less than and grey when there is no change in speed. The related article is copyrighted material. If you are not a subscriber of Stocks & Commodities, please visit www.traders.com.


    Download File:
    Speed.efs



    EFS Code:
    PHP Code:
    /***************************************
    Provided By : eSignal (c) Copyright 2005
    Description:  Improve Your Trading System With Speed - by Gomu Vetrivel

    Version 1.0  9/12/2005

    Notes:
    November 2005 Issue of Stocks and Commodities Magazine

    * Study requires version 7.9 or higher.


    Formula Parameters:                 Defaults:
    N/A
    ***************************************/

    function preMain() {
        
    setStudyTitle("Speed ");
        
    setShowTitleParameters(false);
        
    setCursorLabelName("Speed"0);
        
    setDefaultBarFgColor(Color.grey0);
        
    setDefaultBarThickness(30);
        
    setPlotType(PLOTTYPE_HISTOGRAM0);
        
    }

    var 
    bVersion null;
    var 
    nSpeed null;
    var 
    nSpeed1 null;

    //Speed = Distance traveled by price / Time taken

    function main() {    

        if (
    bVersion == nullbVersion verify();
        if (
    bVersion == false) return;    

        var 
    nState getBarState();
        
        if (
    nState == BARSTATE_NEWBAR) {
            if (
    nSpeed != nullnSpeed1 nSpeed;
        }
        
    nSpeed Math.abs(close(0) - close(-1)) *100;
        
        if (
    nSpeed nSpeed1setBarFgColor(Color.green);
        if (
    nSpeed nSpeed1setBarFgColor(Color.red);
        
        return 
    nSpeed;
    }


    /***** Support Functions *****/

    function verify() {
        var 
    false;
        if (
    getBuildNumber() < 700) {
            
    drawTextAbsolute(535"This study requires version 7.9 or later."
                
    Color.whiteColor.blueText.RELATIVETOBOTTOM|Text.RELATIVETOLEFT|Text.BOLD|Text.LEFT,
                
    null13"error");
            
    drawTextAbsolute(520"Click HERE to upgrade.@URL=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;

    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
Working...
X