Announcement

Collapse
No announcement yet.

Changing ADX/DM Basic Study

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

  • Changing ADX/DM Basic Study

    I want to change the basic ADXDM study by adding horizontal lines at 40 and 20 without having to do it for every symbol I look at on the same chart...Is this possible? I tryed opening the study in the formula wizard and it said it couldn't recognize the study and asked if I wanted to open an empty one....any thoughts/suggestions?

    Thanks,

    ARuss

  • #2
    ARuss
    The Formula Wizard can only open formulas that were written using that tool which is not the case of the efs you are referring to.
    Open the efs with the Editor (Tools-> EFS-> Editor) and insert the following
    PHP Code:
    addBand(40,PS_SOLID,1,Color.black,"40");
    addBand(20,PS_SOLID,1,Color.black,"20"); 
    just above the return new Array(...) statement
    Then save the script with a new name so that it will not be overwritten at the next upgrade
    Alex

    Comment


    • #3
      ARuss
      If you want to be able to modify the position of those lines at any time replace the following section of code
      PHP Code:
      function main() {

          return new Array (
      pdi(14,14),ndi(14,14),adx(14,14));

      with the following
      PHP Code:
      function main(Upper,Lower) {
          if(
      Upper==nullUpper 40;
          if(
      Lower==nullLower 20;
          
      addBand(Upper,PS_SOLID,1,Color.black,"40");
          
      addBand(Lower,PS_SOLID,1,Color.black,"20");
          return new Array (
      pdi(14,14),ndi(14,14),adx(14,14));

      Once you implement this change you can move the locations of the lines without having to edit the script
      Alex

      Comment

      Working...
      X