Announcement

Collapse
No announcement yet.

TS Support - Dynamic_Momentum_Index.efs - Script not working

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

  • TS Support - Dynamic_Momentum_Index.efs - Script not working

    The following script Draws Three Horizonal lines. Not sure what the problem is.

    Thanks

    This script was download from the TS Support Web Site:
    Attached Files

  • #2
    whatever,

    I just downloaded the file: Dynamic_Momentum_Index.efs

    (http://www.tssupport.com/support/bas...rticle&id=1578)

    It plots me 2 horizontal lines - BuyZone & SellZone, and 1 curve line - the DMI itself as You can see at the screenshot.

    Please, tell me the symbol name and symbol settings You are trying to plot DMI with.

    Andrew
    @TS Support

    [email protected]
    Attached Files

    Comment


    • #3
      I have been trying to load it on FOREX Charts.

      The picture is of the: GBP A0-FX
      Time Compression: 240 min


      Thanks
      Attached Files

      Comment


      • #4
        Hi whatever,

        Please try the code below and let me know if it suits your needs.

        Regards,
        Robert


        Code:
         
        
        var vADX = null 
        
        function preMain() {
            setStudyTitle("ADXDM");
            setCursorLabelName("ADX", 0);
            setCursorLabelName("+DMI", 1);
            setCursorLabelName("-DMI", 2);
            setDefaultBarFgColor(Color.RGB(255, 0, 255), 0); //adx color
            setDefaultBarFgColor(Color.blue, 1); //+DI color
            setDefaultBarFgColor(Color.red, 2); //-DI color
            setDefaultBarThickness(2,0); //ADX Line thickness
            setDefaultBarThickness(1,1); //+DMI Line thickness
            setDefaultBarThickness(1,2); //-DMI Line thickness
            
            var fp1 = new FunctionParameter("DILength", FunctionParameter.NUMBER);
        	fp1.setLowerLimit(1);		
        	fp1.setDefault(14); //Edit this value to set a new default
        	
        	var fp2 = new FunctionParameter("ADXLength", FunctionParameter.NUMBER);
        	fp2.setLowerLimit(1);		
        	fp2.setDefault(14); //Edit this value to set a new default
        	
        	var fp3 = new FunctionParameter("ADXTrigger", FunctionParameter.NUMBER);
        	fp3.setLowerLimit(0);		
        	fp3.setDefault(25); //Edit this value to set a new default
            
        }
        
        function main(DILength, ADXLength, ADXTrigger) {
              
            if (vADX == null) vADX = new ADXDMStudy(DILength, ADXLength);
           
          
            return new Array(vADX.getValue(ADXDMStudy.ADX), vADX.getValue(ADXDMStudy.PDI), vADX.getValue(ADXDMStudy.NDI));
            
        }

        Comment


        • #5
          I am confussed. One has a variable length the other is a basic ADX study.

          I think they are very different.

          I am not sure why the "Dynamic_Momentum_Index.efs" will not work on the FOREX charts.

          Comment

          Working...
          X