Announcement

Collapse
No announcement yet.

Unchanged candlesticks

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Unchanged candlesticks

    Does anyone have a formula for Candlestick charts for an Advanced Chart where an unchanged price candlestick will be blue colored as they are in Basic Charts? Advance Charts only allow you to configure up or down bars. Thanks

  • #2
    Please see attached. Below is the code for it as well.

    PHP Code:
    /************************
    Copyright © eSignal, 2003
    *************************/

    function preMain() {

        
    setPriceStudy(true);
        
    setStudyTitle("Neutral Bars");
        
    setShowCursorLabel(false);
        
    setColorPriceBars(true);
        
    setDefaultPriceBarColor(Color.black);
        
        var 
    fp7 = new FunctionParameter("UpBarColor"FunctionParameter.COLOR);
        
    fp7.setName("Up Bar Color");
        
    fp7.setDefault(Color.green);
        
        var 
    fp8 = new FunctionParameter("DownBarColor"FunctionParameter.COLOR);
        
    fp8.setName("Down Bar Color");
        
    fp8.setDefault(Color.red);
        
        var 
    fp9 = new FunctionParameter("NeutralBarColor"FunctionParameter.COLOR);
        
    fp9.setName("Neutral Bar Color");
        
    fp9.setDefault(Color.cyan);
    }

    function 
    main(UpBarColor,DownBarColor,NeutralBarColor) {

        var 
    vOpen open();
        if (
    vOpen == null) return;
        var 
    vClose close();
        if (
    vClose == null) return;
        
        if (
    vOpen vClose) {
            
    setPriceBarColor(UpBarColor);
        } else if (
    vOpen vClose) {
            
    setPriceBarColor(DownBarColor);
        } else {
            
    setPriceBarColor(NeutralBarColor);
        }
        
        return;

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

    Comment

    Working...
    X