Announcement

Collapse
No announcement yet.

setstudymax

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

  • setstudymax

    i know this is an old thread, but i didn't want to begin a new one unnecessarily.
    on the subject of setstudymin/max, i am having trouble using this in the premain section of any macd.efs file i can find. it seems to eventually flatten out the macd upon the zl.

    as always, thanks very much,
    angela

  • #2
    angela
    I am not sure I understand what you are trying to accomplish or what the problem is. Anyhow, if the problem is that you need to be able to adjust those limits then you could move setStudyMax/Min() inside main() and add the required Function Parameters to set them through Edit Studies
    Alex

    Comment


    • #3
      angela,

      for macd the setStudyMax() and min should be something like

      setStudyMax(2)

      setStudyMin(0)

      If you see a flat line you probably have too high a max/min

      Comment


      • #4
        oops

        sorry for beginning a new thread that is somewhat of a repeat of an older one. i thought i had posted my query to an older thread.

        Comment


        • #5
          thanks Alex and David

          sorry to have been so unclear in my original post Alex; i had meant to post to an existing thread which would have provided some context for my question. looks like i missed the button and began a whole new thread.

          i am trying to set a fixed scale for a plain old macd study, so i included the following in the premain section:

          setStudyMin(-.5)
          setStudyMax(+.5)

          this results in the lines going flat at the zero line immediately on my 3 minute euro chart, and on all other timeframes and symbols eventually. i also tried to set it to a whole number (e.g. -1, +1) thinking that a value <1 was causing the trouble. but the result is the same.

          attached is a snapshot of my 3 minute euro chart with a flatlined macd.

          thanks very much for your help,
          angela
          Attached Files

          Comment


          • #6
            angela,

            Because the euro macd is such a small nuber, try using 0.001 for max and -0.001 for themin, you need to 'strech' out the line that appears flat.

            You may want to comment out the stmin and set max lines till yousee the range you want to have the study scaled to.

            Comment


            • #7
              aha

              David,
              thank you. what a difference a decimal place or two makes. duh.

              of course now i realize why the scaling has to be relative, and what a really terrible idea it would be to fix it, since the minimum/maximum values will vary significantly for each symbol. this was a foolish exercise i started.

              but...is it possible to fix or center the zero line instead?

              thank you!
              angela

              Comment

              Working...
              X