Announcement

Collapse
No announcement yet.

MAofMACD

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

  • MAofMACD

    Everything works except the MA of MACDStudy.HIST. It returns a very odd value which looks like it might be an overflow. Can't figure out why. Suspect it has something to do with having the study declaration in main(). Any help is appreciated.


    Thanks
    Attached Files
    Last edited by Gavishti; 02-22-2004, 06:21 AM.

  • #2
    Gavishti
    I suspect there is a bug here not dissimilar to the one that occurs when using MA of StochStudy.SLOW. In this instance however if you declare the studies outside of main() it appears to calculate the MA correctly (tried it with the Formula Wizard)
    BTW it also does not work if using MA of MACDStudy.SIGNAL (which is probably the cause of the bug) but does work if using MA of MACDStudy.MACD.
    Alex

    Comment


    • #3
      Thanks for the info Alex. Any idea when eSignal will fix this? Putting it outside of main() means I can't parametize it. Which is part of what I am trying to do. Assuming putting it in a function wouldn't help - that it needs to be declared ahead of main().

      Comment


      • #4
        Gavishti
        I would not know but I have forwarded the information to eSignal's developers.
        FWIW in the case of the StochStudy.SLOW issue I did find a workaround by creating an MA of StochStudy.FAST and then creating an MA of that using only builtin studies. It may be possible to do the same in this case although it might be just simpler to bypass the builtin and write the MA portion from scratch.
        Alex

        Comment


        • #5
          Gavishti,

          Try declaring the cariable outside of main() but initializing inside of main() (or other functions). Maybe that will work?

          If you do initialize inside of main - be sure to do it inside BARSTATE_ALLBARS or similar. I have had scripts blow up and produce unusual results if I initialize for every tick.

          Garth
          Garth

          Comment


          • #6
            Garth, Alex

            Thanks. For now I've written a work around.

            Comment


            • #7
              I believe this one works.
              Attached Files

              Comment


              • #8
                The moving average for the second signal does not update correctly in the prior version. Changed algorithm. This one appears to be updating in real time.
                Attached Files

                Comment


                • #9
                  Added option to color price bars based upon the combined direction of the MACD and MACDHIST.
                  Attached Files

                  Comment

                  Working...
                  X