Announcement

Collapse
No announcement yet.

TickExtremesDaily.efs

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

  • TickExtremesDaily.efs

    File Name: TickExtremesDaily.efs

    Description:
    Non-price study of $TICK that draws the Close as a line and colors the bar’s background color red as the Close of $TICK exceeds the upper or lower extreme parameters.

    Formula Parameters:
    nTickHigh: Default is 1000
    nTickLow: Default is –1000

    Notes:
    This formula is basically the same as TickExtremes.efs but is intended to be used on Daily, Weekly and Monthly intervals. It will work on intra-day intervals as well. If you want to see high and low bars, use TickExtremes.efs.

    Download File:
    TickExtremesDaily.efs




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

    function preMain() {
        
    setStudyTitle(" Tick Extremes Daily");
        
    setCursorLabelName("TICK  Close"0);
        
    setDefaultBarFgColor(Color.blue0);
        
    setStudyMax(1500);
        
    setStudyMin(-1500);
    }

    var 
    vColor Color.blue;
    var 
    vLoaded false;

    function 
    main(nTickHighnTickLow) {   
        if (
    nTickHigh == nullnTickHigh 1000;
        if (
    nTickLow == nullnTickLow = -1000;
        if (
    vLoaded == false) {
            
    addBand(nTickHighPS_SOLID1Color.yellow"top");
            
    addBand(nTickLowPS_SOLID1Color.yellow"bottom");
            
    vLoaded true;
        }
        
        var 
    close(01"$tick")*1;
        if (
    == null) return;

        if (
    getBarState() == BARSTATE_NEWBAR) {
            
    vColor Color.blue;
        }
            
        if (
    nTickHigh) {
            
    setBarBgColor(Color.red);
        }
        if (
    nTickLow) {
            
    setBarBgColor(Color.red);
        }

        return 
    c;

    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