Announcement

Collapse
No announcement yet.

how can i plot standard deviation of an indicator??

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

  • how can i plot standard deviation of an indicator??



    Hello all,

    i'm just moving from tradestation so i'm way behind the powercurve so thank you in advance for your help.

    via EFS, how can i program the following.

    an indicator with the following plots:

    1. volume (histogram with that is brown if down bar, blue if up bar)

    2. volume + 1 standard deviation (34 bars but if can make it variable where user can change in edit studies so much the better)

    i could program this in 2 seconds in easylanguage, but haven't been able to even get close in the last 2 hours working in e-signal. isn't learning fun???

    thanks in advance,

    largo
    Last edited by mclargo; 03-06-2003, 10:54 PM.

  • #2
    I found an error in the first one. Attached is the corrected script.

    Chris
    Attached Files

    Comment


    • #3
      Works like a champ. You are great.

      Largo

      Comment


      • #4
        Chris-Std deviation of a different study

        Hi Chris, your STandard deviation of a Voume Study looked pretty handy (thanks Largo for the suggestion!)and I was thinking along similar lines for a " Detrended Oscillator" (DTO)- basically an oscillator above and below zero that measures the High/Low/Close from a moving average of the Close. This meaures Overbought and Oversold and is pretty good with the 7 period default I have. I wanted to put Std Deviation bands above positive figures and under the negative figures. I started out thinking that this would be a transplant of my original formula into your formula replacing the vMA /VolArray with DTOMA and DTOArray but Ive got into a right pickle!!!
        I dont know if its because of the two nperiods running (7 for my DTO calculation and 34 with the MA for the Std Deviation) but it just wont work.
        Is there something Ive missed in your original formula that will mean that I can't just take the Volume indicator out and replace with my DTO
        I've enclosed my original oscillator formula below. This BB Post system doesnt allow multiple attachments but I can send my version of your file if you like
        Your help would be much appreciated.

        Thanks in advance
        John
        Attached Files

        Comment


        • #5
          John:

          Try the attached EFS. You might need to add a new parameter for the detrend period but, other than that, I think it is what you were looking for.

          Chris
          Attached Files

          Comment


          • #6
            Detrend Oscillator

            Hi Chris, many thanks for your reply. Thats just what I was looking for. I can see pretty much where I went wrong and that you've tidied up my detrend formula. I see that I can change the number of standard deviations by placing,for instance, "+2*" or "-2*" in front of the nSTdDev on line 95. I can also change the high to low or close. Great. I changed your value 34 to my 7 and thats fine.But when I tried to have a different Std Deviation calc to the Detrend nperiod value, it just used the one you put in. I tried to add a line in front of my calc for the detrend that said a different period. ie use 7 periods for my detrend calc but use your 34 periods for the MA and Std Dev calc. It only used your value because of line 74 (uses frPeriod). Having written this and reread your last post I can now see that if I delete frperiod from line 74 and put the value 7 in i get exactly what i described above--- the detrend worked out on period 7 and the MA/STdDev worked out with the 34 value. Marvellous!! Sometimes it helps to talk/write it down just to get the thinking process straight!!!! Please let me know if I've done anything wrong. In the meantime,
            Many thanks for you help
            John

            Comment


            • #7
              Added attached file

              Sorry guys, forgot to attach the file!!
              Attached Files

              Comment


              • #8
                John:

                It looks fine. I went ahead and added parameters for the detrend period as well as the # of std devs. See attached.

                Chris
                Attached Files

                Comment


                • #9
                  DTO Oscillator

                  Hi Chris, many thanks thats spot on. It looks a bit tidier now
                  All the best,
                  John

                  Comment

                  Working...
                  X