Announcement

Collapse
No announcement yet.

pivots

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

  • pivots

    emet,

    You were so kind to help me with the signals. They were exactly what I needed and are working fantastically.

    Would you be so kind as to help me with the following?

    I'm using PivotPointAll.efs and have changed the pivot lines to solid and the line thickness to 2, then saved it to c_PivotPointAll.efs.

    I have tried to change the color of each line by backing thru the BGR . (dot) behind Color (Lines 19, 23, 27, 31 and 35), which then shows a list of colors to choose from, and then choosing the color I want for each pivot line. But when I save this, the chart then comes up with solid blue lines, thickness1, for each pivot line.

    Can you do the following?

    1) Please change this so I can use whatever color I want, with the line thickness I want, and

    2) Please add //R3 and //S3 to the formula.

    Thank you again in advance for whatever help you can give me. Remember I am a novice and would need simple, step by step procedure on what to do.

    Clayton L. Egeness
    Clayton L. Egeness

  • #2
    Hi egeness, I think this is what you've asked for. Hope this helps you.

    EFS:
    PHP Code:
    var fpArray = new Array();
    function 
    preMain() {
        
    setPriceStudy(true);
        
    setStudyTitle("Pivot Points");
        
    setCursorLabelName("PP-R3"0);
        
    setCursorLabelName("PP-R2"1);
        
    setCursorLabelName("PP-R1"2);
        
    setCursorLabelName("PP"3);
        
    setCursorLabelName("PP-S1"4);
        
    setCursorLabelName("PP-S2"5);
        
    setCursorLabelName("PP-S3"6);    

        
    setDefaultBarStyle(PS_DASH0);
        
    setDefaultBarStyle(PS_DASH1);
        
    setDefaultBarStyle(PS_DOT2);
        
    setDefaultBarStyle(PS_SOLID3);
        
    setDefaultBarStyle(PS_DOT4);
        
    setDefaultBarStyle(PS_DASH5);
        
    setDefaultBarStyle(PS_DASH6);    
        
        
    askForInput();
        var 
    x=0;
        
    fpArray[x] = new FunctionParameter("PP_R1R2"FunctionParameter.COLOR);
        
    with(fpArray[x++]){
            
    setName("PP-R2, PP-S2 Color");
            
    setDefault(Color.red);
        }    

        
    fpArray[x] = new FunctionParameter("PP_S1S2"FunctionParameter.COLOR);
        
    with(fpArray[x++]){
            
    setName("PP-R1, PP-S1 Color");
            
    setDefault(Color.blue);
        }    

        
    fpArray[x] = new FunctionParameter("PP_S3S3"FunctionParameter.COLOR);
        
    with(fpArray[x++]){
            
    setName("PP-R3, PP-S3 Color");
            
    setDefault(Color.green);
        }    


        
    fpArray[x] = new FunctionParameter("PP"FunctionParameter.COLOR);
        
    with(fpArray[x++]){
            
    setName("PP Color");
            
    setDefault(Color.black);
        }    

        
    fpArray[x] = new FunctionParameter("Thickness1"FunctionParameter.NUMBER);
        
    with(fpArray[x++]){
            
    setName("PP-R1, PP-S1 Thickness");
            
    setLowerLimit(1);        
            
    setDefault(1);
        }

        
    fpArray[x] = new FunctionParameter("Thickness2"FunctionParameter.NUMBER);
        
    with(fpArray[x++]){
            
    setName("PP-R2, PP-S2 Thickness");
            
    setLowerLimit(1);        
            
    setDefault(2);
        }

        
    fpArray[x] = new FunctionParameter("Thickness3"FunctionParameter.NUMBER);
        
    with(fpArray[x++]){
            
    setName("PP-R3, PP-S3 Thickness");
            
    setLowerLimit(1);        
            
    setDefault(2);
        }


        
    fpArray[x] = new FunctionParameter("Thickness4"FunctionParameter.NUMBER);
        
    with(fpArray[x++]){
            
    setName("PP Thickness");
            
    setLowerLimit(1);        
            
    setDefault(1);
        }

        
        
    }

    var 
    bInit false;
    var 
    xHigh  null;
    var 
    xLow   null;
    var 
    xClose null
    var 
    vPP null;
    var 
    vR1 null;
    var 
    vS1 null;
    var 
    vR2 null;
    var 
    vS2 null;  
    var 
    vR3 null;
    var 
    vS3 null;  


    function 
    main(Thickness1Thickness2Thickness3Thickness4PP_R1R2PP_S1S2PP_S3S3PP) {

        if(
    isMonthly() || isWeekly())
        return;
        
        if(
    bInit == false){
            
    setDefaultBarFgColor(PP_S3S30);
            
    setDefaultBarFgColor(PP_R1R21);
            
    setDefaultBarFgColor(PP_S1S22);
            
    setDefaultBarFgColor(PP3);        
            
    setDefaultBarFgColor(PP_S1S24);
            
    setDefaultBarFgColor(PP_R1R25);
            
    setDefaultBarFgColor(PP_S3S36);        

            
    setDefaultBarThickness(Thickness30);
            
    setDefaultBarThickness(Thickness21);
            
    setDefaultBarThickness(Thickness12);
            
    setDefaultBarThickness(Thickness43);
            
    setDefaultBarThickness(Thickness14);
            
    setDefaultBarThickness(Thickness25);
            
    setDefaultBarThickness(Thickness36);        
        
            
    xHigh  high(inv("D"));
            
    xLow   low(inv("D"));
            
    xClose close(inv("D")); 
            
    bInit true;
        }
        
        var 
    vHigh  xHigh.getValue(-1);
        var 
    vLow   xLow.getValue(-1);
        var 
    vClose xClose.getValue(-1); 
        if(
    vHigh == null || vLow == null || vClose == null)
        return;
        
        
    vPP = (vHigh+vLow+vClose)/3;
        
    vR1 2*vPP-vLow;
        
    vS1 2*vPP-vHigh;
        
    vR2 = (vPP-vS1)+vR1;
        
    vS2 vPP-(vR1-vS1);  
        
    vR3 = (vPP-vS2)+vR2;
        
    vS3 vPP-(vR2-vS2);  
        
        return new Array(
    vR3vR2vR1vPPvS1vS2vS3);

    Attached Files
    Last edited by emet; 10-02-2008, 06:45 AM.

    Comment


    • #3
      emet

      This is just what I needed. Thank you ... Thank you ... Thank you. May the Buddha Gods of coding grant you your every wish.

      Being a novice and not knowing how all this stuff works and not knowing the difference between a junior member and a senior member, I think you should be at the top of the list.

      Thanks again,

      Clayton L. Egeness
      Clayton L. Egeness

      Comment

      Working...
      X