Announcement

Collapse
No announcement yet.

Adr

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

  • Adr

    Hi, still learning the ropes as far as coding goes. Does anyone know of a code for ADR? Id like to apply a daily ADR indicator to an intraday chart.

    Ive tried the following, still looking myself, but any help would be much appreciated.

    Thanks

  • #2
    Adr

    Hi, still learning the ropes as far as coding goes. Does anyone know of a code for ADR? Id like to apply a daily ADR indicator to an intraday chart.

    Ive tried the following, still looking myself, but any help would be much appreciated.

    Thanks



    PHP Code:
    function preMain() {      
        
    setPriceStudy(false);     
        
    setStudyTitle("ATRratio");     
        
    setCursorLabelName("ADR"0);     
        
    setDefaultBarFgColor(Color.blue0);     
        
    setPlotType(PLOTTYPE_LINE,0);     
        
    setDefaultBarThickness(1,0); 
    }  

    function 
    main() {  
        var 
    DR =  (high low);  
        return 
    ADR sma(30,DR)  

    Last edited by saitokun; 01-12-2010, 02:20 AM.

    Comment


    • #3
      Re: Adr

      saitokun
      See my reply in this thread on the same topic
      Alex


      Originally posted by saitokun
      Hi, still learning the ropes as far as coding goes. Does anyone know of a code for ADR? Id like to apply a daily ADR indicator to an intraday chart.

      Ive tried the following, still looking myself, but any help would be much appreciated.

      Thanks



      PHP Code:
      function preMain() {      
          
      setPriceStudy(false);     
          
      setStudyTitle("ATRratio");     
          
      setCursorLabelName("ADR"0);     
          
      setDefaultBarFgColor(Color.blue0);     
          
      setPlotType(PLOTTYPE_LINE,0);     
          
      setDefaultBarThickness(1,0); 
      }  

      function 
      main() {  
          var 
      DR =  (high low);  
          return 
      ADR sma(30,DR)  

      Comment


      • #4
        Thanks for that, Im pretty much there, the one small problem Im still having is Im trying to make it based on Daily data. The hiLo part is running as expected, however I still cant figure out the correct way to write the following
        PHP Code:
         var vEMA ema(30,nHL); 
        Ive tried adding inv("D") as follows
        PHP Code:
         var vEMA ema(30,nHL,inv("D") ); 
        and
        PHP Code:
        var vEMA ema(30,inv("D"),nHL); 
        neither of these seemed to work...

        Comment


        • #5
          Hi guys, dont spose I could get a hand with this last part? Havea had a few goes at it myself without any luck...

          Thanks in advance

          Comment


          • #6
            saitokun
            You can find a complete example on how to do that at the thread linked to the one I indicated in my previous reply
            Alex


            Originally posted by saitokun
            Thanks for that, Im pretty much there, the one small problem Im still having is Im trying to make it based on Daily data. The hiLo part is running as expected, however I still cant figure out the correct way to write the following
            PHP Code:
             var vEMA ema(30,nHL); 
            Ive tried adding inv("D") as follows
            PHP Code:
             var vEMA ema(30,nHL,inv("D") ); 
            and
            PHP Code:
            var vEMA ema(30,inv("D"),nHL); 
            neither of these seemed to work...

            Comment

            Working...
            X