Announcement

Collapse
No announcement yet.

Calling non-builtin Scripts and the DMACD

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

  • Calling non-builtin Scripts and the DMACD

    I'm not exactly proficient at creating scripts but have given a shot at creating one that sounds Alerts when the slope of the Dinapoli MACD's AVG changes from positive to negative or vice versa.

    Another alert would also sound on a cross of the avg by the macd.

    The thing is I have been able to choose only from "builtin" scripts for referencing. The Dinapoli macd isn't "builtin". Can anyone help me out here, please?

    Thank you.
    Anson

  • #2
    Anson
    The attached should do what you asked.
    It will play one sound when the Signal line changes direction and another sound when the MACD and Signal lines cross.
    Alex
    Attached Files

    Comment


    • #3
      Originally posted by Alexis C. Montenegro
      Anson
      The attached should do what you asked.
      It will play one sound when the Signal line changes direction and another sound when the MACD and Signal lines cross.
      Alex
      Hey Alex,

      Thanks for the efs

      But now that you added in color and it's so oooh nice... do you think you could make the color change for the Slower EMA based on its pos/neg slope instead? Rather than the current scheme which changes color based on the faster MACD line, I believe?

      Reason being Dinapoli's method of using the MACD for trend and the EMA being the smoother one here while fading the weak.

      PS. I did try altering it myself but the faster MACD remained the one with changed colors for some strange reason. Ok I'm terrible at coding!
      Thanks alot!
      Anson

      Comment


      • #4
        Anson
        Interestingly enough I had initially colored the other line but I then realized that in the original script the slower line is defined as the MACD and the faster one as the Signal even though it still appears backwards to me.
        Anyhow reversing colors between the plots entailed modifying only two lines of code and the attached revision should do what you asked.
        Alex
        Attached Files

        Comment


        • #5
          Thanks alot, Alex!
          That's exactly what I needed.

          Anson

          Comment

          Working...
          X