Announcement

Collapse
No announcement yet.

Macd Display

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

  • Macd Display

    GOOD DAY,

    HOW CAN I GET THE MACD TO DISPLAY MORE DECIMALS...

    IT DISPLAYS .001 , .002, ETC ... HOW CAN I GET THE NUMBERS
    IN BETWEEN?

    THANKS A LOT,

    JAIME

  • #2
    Out of curiousity, what is the reason you want more precision in the display?

    How many decimals is enough?

    Comment


    • #3
      Jaime
      At this time it is not possible to increase the number of decimals beyond what is set by the application.
      A workaround available through efs is to multiply the MACD values by some factor (for example 100 or 1000) to "shift" the values to the left. Enclosed below is a basic example of how to do this followed by a chart that compares the plots of the regular MACD and of the adjusted one
      Alex

      PHP Code:
      function preMain() {
          
      setStudyTitle("MACDx100");
          
      setCursorLabelName("MACD",0);
          
      setCursorLabelName("MACDSig",1);
          
      setCursorLabelName("MACDHist",2);
          
      setDefaultBarFgColor(Color.blue,0); 
          
      setDefaultBarFgColor(Color.red,1);
          
      setDefaultBarFgColor(Color.magenta,2); 
          
      setPlotType(PLOTTYPE_LINE,0);
          
      setPlotType(PLOTTYPE_LINE,1);
          
      setPlotType(PLOTTYPE_HISTOGRAM,2); 
      }
       
      var 
      xMACD null;
      var 
      xSignal null;
      var 
      xHist null;
       
      function 
      main(){
       
          if(
      xMACD==nullxMACD macd(12,26,9);
          if(
      xSignal==nullxSignal macdSignal(12,26,9);
          if(
      xHist==nullxHist macdHist(12,26,9);
       
          if(
      xMACD.getValue(0)==null||xSignal.getValue(0)==null||xHist.getValue(0)==null) return;
       
          return new Array ((
      xMACD.getValue(0)*100),(xSignal.getValue(0)*100),(xHist.getValue(0)*100));
          



      Originally posted by jaimeog
      GOOD DAY,

      HOW CAN I GET THE MACD TO DISPLAY MORE DECIMALS...

      IT DISPLAYS .001 , .002, ETC ... HOW CAN I GET THE NUMBERS
      IN BETWEEN?

      THANKS A LOT,

      JAIME

      Comment

      Working...
      X