Announcement

Collapse
No announcement yet.

Help With Adding Price to MovLR, Please

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

  • Help With Adding Price to MovLR, Please

    Hello,
    In the attached study, I'm trying to add the prices at the right end of each line and have those prices adjust as the line slopes change. I'm not having any luck. Could someone help, please? Thank you.
    Diane
    Attached Files

  • #2
    Text Labels

    Hello Diane P,

    Fortunately, I've just recently learned about adding edge labels.

    See how this works for you.

    Kirk

    (zeller4)

    Partial code up to your return; (couldn't get my efs to attach)
    PHP Code:
         // Basis
                
    drawLineRelative(0B2, -(21-1), (A2*(21-1)) + B2
                    
    PS_SOLID1Color.cyan"Basis");
                
    drawTextAbsolute(2,B2,formatPriceNumber(B2), Color.cyannull,
                    
    Text.FRAME Text.BOLD|Text.VCENTER,"Arial"14"Basis1");   
                
    // LR1
                
    drawLineRelative(0B2 + (nLRstdev1*vStDev), -(21-1), (A2*(21-1)) + B2 + (nLRstdev1*vStDev), 
                    
    PS_SOLID1Color.RGB(0,140,140), "Upr1");
                
    drawTextAbsolute(2,B2 + (nLRstdev1*vStDev),formatPriceNumber(B2 + (nLRstdev1*vStDev)), Color.RGB(0,140,140), null,
                    
    Text.FRAME Text.BOLD|Text.VCENTER,"Arial"14"Upr11");   
                
                
    drawLineRelative(0B2 - (nLRstdev1*vStDev), -(21-1), (A2*(21-1)) + B2 - (nLRstdev1*vStDev), 
                    
    PS_SOLID1Color.RGB(0,140,140), "Lwr1");
                
    drawTextAbsolute(2,B2 - (nLRstdev1*vStDev),formatPriceNumber(B2 - (nLRstdev1*vStDev)), Color.RGB(0,140,140), null,
                    
    Text.FRAME Text.BOLD|Text.VCENTER,"Arial"14"Lwr11");   
                
    // LR2
                
    drawLineRelative(0B2 + (nLRstdev2*vStDev), -(21-1), (A2*(21-1)) + B2 + (nLRstdev2*vStDev), 
                    
    PS_SOLID1Color.red"Upr2");
                
    drawTextAbsolute(2,B2 + (nLRstdev2*vStDev),formatPriceNumber(B2 + (nLRstdev2*vStDev)), Color.rednull,
                    
    Text.FRAME Text.BOLD|Text.VCENTER,"Arial"14"Upr22");   
                
    drawLineRelative(0B2 - (nLRstdev2*vStDev), -(21-1), (A2*(21-1)) + B2 - (nLRstdev2*vStDev), 
                    
    PS_SOLID1Color.red"Lwr2");
                
    drawTextAbsolute(2,B2 - (nLRstdev2*vStDev),formatPriceNumber(B2 - (nLRstdev2*vStDev)), Color.rednull,
                    
    Text.FRAME Text.BOLD|Text.VCENTER,"Arial"14"Lwr22");   
                }
        }
            
        return; 

    Comment


    • #3
      Hi Kirk,
      Thank you so much! That is exactly what I was trying to do!
      Diane

      Comment


      • #4
        my pleasure,

        hope you have success with it!
        kz

        Comment

        Working...
        X