Announcement

Collapse
No announcement yet.

2011 Aug: Fibonacci And Lucas Automated Techniques For Intraday Traders

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

  • 2011 Aug: Fibonacci And Lucas Automated Techniques For Intraday Traders

    File Name: FibLucasSeries.efs

    Description:
    Fibonacci And Lucas Automated Techniques For Intraday Traders

    Formula Parameters:
    Fibonacci/Lucas Fibonacci
    Color Color.lime
    Select Start Date First Bar On Chart
    Start Date (mm/dd/yyyy) null
    Start Time (hh:mm) 00:00


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

    Download File:
    FibLucasSeries.efs



    EFS Code:
    PHP Code:
    /*********************************
    Provided By:  
        Interactive Data Corporation (Copyright © 2010) 
        All rights reserved. This sample eSignal Formula Script (EFS)
        is for educational purposes only. Interactive Data Corporation
        reserves the right to modify and overwrite this EFS file with 
        each new release. 

    Description:        
        Fibonacci And Lucas Automated Techniques For Intraday Traders
        
    Version:            1.00  14/06/2010

    Formula Parameters:                     Default:
    Fibonacci/Lucas                         Fibonacci
    Color                                   Color.lime
    Select Start Date                       First Bar On Chart
    Start Date (mm/dd/yyyy)                 null
    Start Time (hh:mm)                      00:00

    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 
    barOffset 0;
    var 
    bVersion null;
    function 
    preMain() {

        
    setPriceStudy(true);
        
    setCursorLabelName("Last Value of Sequence");
        
    setPlotType(PLOTTYPE_FLATLINES);
        
        var 
    x=0;
        
    fpArray[x] = new FunctionParameter("gFL"FunctionParameter.STRING);
        
    with(fpArray[x++]){
            
    setName("Fibonacci/Lucas");
            
    addOption("FIBONACCI"); 
            
    addOption("LUCAS"); 
            
    setDefault("FIBONACCI"); 
        }

        
    fpArray[x] = new FunctionParameter("gColor"FunctionParameter.COLOR);
        
    with(fpArray[x++]){
            
    setName("Color");
            
    setDefault(Color.lime); 
        }    
        
        
    fpArray[x] = new FunctionParameter("gFirstBar"FunctionParameter.STRING);
        
    with(fpArray[x++]){
            
    setName("Select Start Date");
            
    addOption("First Bar On Chart");
            
    addOption("User Defined");
            
    setDefault("First Bar On Chart"); 
        }
     
        
    fpArray[x] = new FunctionParameter("gDate"FunctionParameter.STRING);
        
    with(fpArray[x++]){
            
    setName("Start Date (mm/dd/yyyy)");
            
    setDefault(""); 
        }

        
    fpArray[x] = new FunctionParameter("gTime"FunctionParameter.STRING);
        
    with(fpArray[x++]){
            
    setName("Start Time (hh:mm)");
            
    setDefault("00:00"); 
        }
    }

    var 
    bInit false;
    var 
    startPos 0;
    var 
    offsetBar null;
    var 
    bFixColor false;
    var 
    F1 5;
    var 
    F2 3;
    var 
    1;
    function 
    maingFLgColorgFirstBargDategTime )
    {
        if (
    bVersion == nullbVersion verify();
        if (
    bVersion == false) return; 

        if (
    getCurrentBarIndex() == && getBarState() == BARSTATE_CURRENTBAR && bFixColor
            
    setBarBgColor(gColor);
        
        if ( 
    getBarState() == BARSTATE_ALLBARS )
        {

            
    F1 5;
            
    F2 3;
            
    1;
            if  ( 
    gFL == 'LUCAS' )
            {
                
    F1 3;
                
    F2 1;
                
    1;
            }
            
            
    offsetBar null;
            if ( 
    gFirstBar !=  "User Defined" )  offsetBar 0;
            else
            {
                var 
    xDate gDate.split("/");
                var 
    xTime = (!isDWM()) ? gTime.split(":") : new Array("0","0");
                var 
    startDate = new Date(xDate[2], xDate[0], xDate[1], xTime[0], xTime[1]);
                
    startPos startDate.getTime();
            }
            if (
    offsetBar == 0)
            {
                    
    setBarBgColor(gColor);
                    
    drawTextRelative(0BottomRow2"Start" gColornull
                        
    Text.FRAME Text.PRESET Text.CENTER "Arial"11"Start" );
                    return 
    "START";
            }
        }

        if ( 
    getBarState() == BARSTATE_NEWBAR )
        {
            if ( 
    isNull(offsetBar) )
            {    
                var 
    currentDate = new Date(year(0), month(0), day(0), hour(0), minute(0));
                var 
    currentPos currentDate.getTime();
                if ( 
    currentPos == startPos 
                {
                    
    offsetBar Math.abs(getOldestBarIndex() - getCurrentBarIndex()); 
                    
    setBarBgColor(gColor);
                    
    drawTextRelative(0BottomRow2"Start" gColornull
                        
    Text.FRAME Text.PRESET Text.CENTER "Arial"11"Start" );
                    return (
    "START");
                }
                if  ( 
    currentPos startPos  )
                {
                    
    drawTextRelative(120" Date not availible "Color.greynull
                        
    Text.RELATIVETOLEFT|Text.RELATIVETOBOTTOM|Text.BOLD|Text.LEFT|Text.FRAME
                        
    null12"dna");
                    return (
    "Date not availible");
                }
            }
            else
            {
                if ( -
    getOldestBarIndex()-offsetBar-F1  == -getCurrentBarIndex() )
                {
                    var 
    F1;
                    
    F1 +=F2;
                    
    F2 b
                    
    N++;
                    
                    
    bFixColor true;
                    
    setBarBgColor(gColor);
                    
    drawTextRelative(0BottomRow3" "+" "gColornull
                        
    Text.FRAME Text.PRESET Text.CENTER "Arial"11"N"+);
                    
    drawTextRelative(0BottomRow2F2" bars" gColornull
                        
    Text.FRAME Text.PRESET Text.CENTER "Arial"11F2 );
                    return 
    ""+F2;
                }
                else
                {    
                    
    bFixColor false;
                    var 
    fromStart = -getOldestBarIndex()-offsetBar getCurrentBarIndex(); 
                    return 
    ""+fromStart;
                }    
            }
        }    



    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 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;

Working...
X