Announcement

Collapse
No announcement yet.

Dunnigan Bars

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

  • Dunnigan Bars

    File Name: Dunnigan_Bars.efs

    Description:
    This displays "Dunnigan Bars," which is defined as:

    Higher High and High Low = Green Color
    Lower High and Lower Low = Red Color
    Inside Bar = Grey Color
    Outside Bar = Yellow Color

    Colors are adjustable through the Edit Studies menu.

    Formula Parameters:
    HHHLColor - Sets color for Higher High and High Low Bars
    LHLLColor - Sets color for Lower High and Lower Low Bars
    InsideColor - Sets color for Inside Bars
    OutsideColor - Sets color for Outside Bars

    Download File:
    Dunnigan_Bars.efs



    EFS Code:

    PHP Code:
    /*****************************
    Copyright © eSignal, 2003
    Title:    Dunnigan Bars
    Version:    1.0

    ==========================
    Fix History:


    ==========================
    Project Description:  

    This displays "Dunnigan Bars," which is defined as:

    Higher High and High Low = Green Color
    Lower High and Lower Low = Red Color
    Inside Bar = Grey Color
    Outside Bar = Yellow Color

    Colors are adjustable through the Edit Studies menu.

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


    function preMain() {
        
    setStudyTitle("Dunnigan Bars");
        
    setShowCursorLabel(false);
        
    setColorPriceBars(true);
        
    setPriceStudy(true);
        
        var 
    fp6 = new FunctionParameter("HHHLColor"FunctionParameter.COLOR);
        
    fp6.setName("Higher High & Higher Low Color");
        
    fp6.setDefault(Color.green); //Edit this value to set a new default
        
        
    var fp7 = new FunctionParameter("LHLLColor"FunctionParameter.COLOR);
        
    fp7.setName("Lower High & Lower Low Color");
        
    fp7.setDefault(Color.red); //Edit this value to set a new default
        
        
    var fp8 = new FunctionParameter("InsideColor"FunctionParameter.COLOR);
        
    fp8.setName("Inside Bars Color");
        
    fp8.setDefault(Color.grey); //Edit this value to set a new default

        
    var fp9 = new FunctionParameter("OutsideColor"FunctionParameter.COLOR);
        
    fp9.setName("Outside Bars Color");
        
    fp9.setDefault(Color.yellow); //Edit this value to set a new default

    }

    function 
    main(HHHLColorLHLLColorInsideColorOutsideColor) {

        var 
    vHigh high();
        var 
    vPrevHigh high(-1);
        var 
    vLow low();
        var 
    vPrevLow low(-1);
        
        if (
    vHigh == null || vPrevHigh == null || vLow == null || vPrevLow == null) return;
        
        if      (
    vHigh vPrevHigh && vLow vPrevLowsetPriceBarColor(HHHLColor);
        else if (
    vHigh vPrevHigh && vLow vPrevLowsetPriceBarColor(LHLLColor);
        else if (
    vHigh vPrevHigh && vLow vPrevLowsetPriceBarColor(InsideColor);
        else if (
    vHigh vPrevHigh && vLow vPrevLowsetPriceBarColor(OutsideColor);

        return;
        

    Regards,
    Jay F.
    Product Manager
    _____________________________________
    Have a suggestion to improve our products?
    Click Support --> Request a Feature in eSignal 11
Working...
X