Announcement

Collapse
No announcement yet.

cci14 hist and cci6 line thread

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

  • cci14 hist and cci6 line thread

    from an SI thread

    Is there a possibility in esgnal to create 2 overlaying cci's with different style drawings?
    If so can you tell me how?

    Tia,

    Olga


    ended up with this

    setStudyTitle("CCI 14");
    var study14 = new CCIStudy(14, "(H+L+C)/3");
    var study6 = new CCIStudy( 6, "(H+L+C)/3");

    function preMain() {
    setPlotType(PLOTTYPE_HISTOGRAM);
    }

    function main() {

    if (study14.getValue(CCIStudy.CCI)>0)
    {setDefaultBarFgColor(Color.lime,0);}

    if (study14.getValue(CCIStudy.CCI)<0)
    {setDefaultBarFgColor(Color.red,0);}

    return new Array(study14.getValue(CCIStudy.CCI),study6.getVal ue(CCIStudy.CCI));
    }

  • #2
    CCI 14 -6 Code

    Here is the code, for making CCI 14 Histogram and CCI6 as line. Hope it helps. One can add as many CCI as one wants.

    Kiri

    PHP Code:
    var study14 = new CCIStudy(14,"HLC/3");
    var 
    study6 = new CCIStudy(6,"HLC/3");

    function 
    preMain() {
        
        
    setStudyTitle("CCIAK 14-6");
        
        
    setCursorLabelName("CCI-AK");
        
    setDefaultBarFgColor(Color.red0); // CCI 14
        
    setDefaultBarFgColor(Color.green1); // CCI 6
            
        
    setHistogramBase(0);
        
    addBand(0PS_SOLID2Color.black); // Zero Line
        
    addBand(100PS_SOLID1Color.black); // +100 Line
        
    addBand(-100PS_SOLID1Color.black); // -100 Line
       
        
    }

    function 
    main() {
        
    setPlotType(PLOTTYPE_HISTOGRAM0);
        
    setPlotType(PLOTTYPE_LINE1);
         
        return new Array(
    study14.getValue(CCIStudy.CCI), study6.getValue(CCIStudy.CCI));

    Last edited by akiri; 01-31-2003, 08:27 AM.

    Comment

    Working...
    X