Announcement

Collapse
No announcement yet.

SAR set to open prices only

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

  • SAR set to open prices only

    How can I set up SAR set to OPEN prices only
    so the oscillator don't change on the last price
    once new bar pops up on the screen?

  • #2
    Hi Pterkl,

    Try to add setComputeOnClose(); into the preMain function:

    Code:
    function preMain(){
        setStudyTitle("Sample");
        setComputeOnClose();
    }
    Regards,
    Andy

    Comment


    • #3
      RE: Reply to post 'SAR set to open prices only'

      Dear Andy,

      Thank You very much for the reply.
      The formula works OK, but it always calculates the last "close" price.

      My study is based on Open prices and I would love to have
      Parabolic SAR based on open prices, so once it is established on the screen
      (I use line charts set to Open price source) it doesn't change
      (unlike close price that follow the very LAST price of the market).
      Is there a formula that calculate oscillators based on Open rather then
      Close price source???
      What should I add/change to this formula to have it calculated only on OPEN
      price source:


      var study = new ParabolicStudy(0.02, 0.02, 0.2);

      function preMain() {
      setPriceStudy(true);
      setPlotType(PLOTTYPE_SQUAREWAVE,0);
      setDefaultBarThickness(6, 0);
      setStudyTitle("PKTEMP");
      }

      function main() {
      sar0=study.getValue(ParabolicStudy.STOP);
      return sar0;
      }


      Really appreciate your help,


      Regards,
      Peter - Toronto
      [email protected]
      905 270 6564




      -----Original Message-----
      From: [email protected] [mailto:[email protected]]
      Sent: Friday, August 08, 2003 2:23 PM
      To: [email protected]
      Subject: Reply to post 'SAR set to open prices only'


      Hello peterkl,

      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      Comment


      • #4
        Hello Peter,

        This study is based on previous bar's highs and lows. I don't think it is a simple matter of changing the price source to be based on open prices.
        Jason K.
        Project Manager
        eSignal - an Interactive Data company

        EFS KnowledgeBase
        JavaScript for EFS Video Series
        EFS Beginner Tutorial Series
        EFS Glossary
        Custom EFS Development Policy

        New User Orientation

        Comment


        • #5
          Re: Reply to post 'SAR set to open prices only'

          no i wanted to know how to edit the stoch rsi to 8 5 (5) 3


          ----- Original Message -----
          From: <[email protected]>
          To: <[email protected]>
          Sent: Monday, August 11, 2003 1:37 PM
          Subject: Reply to post 'SAR set to open prices only'


          > Hello rt704,
          >
          > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          >

          Comment


          • #6
            RE: Reply to post 'SAR set to open prices only'

            Jason,

            Do you know if I can setup the OPEN source on this study:

            var study = new ParabolicStudy(0.02, 0.02, 0.2);

            function preMain() {
            setPriceStudy(true);
            setPlotType(PLOTTYPE_DOT)
            setDefaultBarThickness(6);
            }

            function main() {
            return study.getValue(ParabolicStudy.STOP);
            }

            Thank You,
            Peter
            [email protected]




            -----Original Message-----
            From: [email protected] [mailto:[email protected]]
            Sent: Monday, August 11, 2003 1:38 PM
            To: [email protected]
            Subject: Reply to post 'SAR set to open prices only'


            Hello peterkl,

            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

            Comment


            • #7
              RE: Reply to post 'SAR set to open prices only'

              Hi there guys,

              Do you know if "" setComputeOnClose(); "" can be modified to
              "" setComputeOnOpen(); "" ??? Or is there any other function
              that will calculate the on screen line/tick charts to "what you
              see is what you get"??

              Thanks
              Peter
              [email protected]






              -----Original Message-----
              From: [email protected] [mailto:[email protected]]
              Sent: Friday, August 08, 2003 2:23 PM
              To: [email protected]
              Subject: Reply to post 'SAR set to open prices only'


              Hello peterkl,

              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

              Comment


              • #8
                if you want to calc on the first tick of a new bar use

                if(getBarState==BARSTATE_NEWBAR){
                ...
                }

                Comment


                • #9
                  RE: Reply to post 'SAR set to open prices only'

                  Thank You dloomis,

                  I don't know much about the Java scripts,
                  How would you add this line
                  if(getBarState==BARSTATE_NEWBAR){

                  to the formula below:

                  var study = new ParabolicStudy(0.02, 0.02, 0.2);
                  function preMain() {
                  setPriceStudy(true);
                  setPlotType(PLOTTYPE_SQUAREWAVE)
                  setDefaultBarThickness(4);
                  }

                  function main(){
                  return study.getValue(ParabolicStudy.STOP);
                  }

                  All I want is to caclulate the Parabolic SAR only
                  on the very first Open price source of the time interval.
                  REALLY appreciate your help,
                  Regards,
                  Peter





                  -----Original Message-----
                  From: [email protected] [mailto:[email protected]]
                  Sent: Sunday, August 17, 2003 11:39 AM
                  To: [email protected]
                  Subject: Reply to post 'SAR set to open prices only'


                  Hello peterkl,

                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

                  Comment


                  • #10
                    var study = new ParabolicStudy(0.02, 0.02, 0.2);
                    function preMain() {
                    setPriceStudy(true);
                    setPlotType(PLOTTYPE_SQUAREWAVE)
                    setDefaultBarThickness(4);
                    }

                    function main(){
                    if(getBarState==BARSTATE_NEWBAR)
                    return study.getValue(ParabolicStudy.STOP);
                    }

                    Comment


                    • #11
                      RE: Reply to post 'SAR set to open prices only'

                      Thank You dloomis,

                      Will this formula calculate SAR based on only first
                      tick of the time interval and don't change until
                      the next one? I was looking for "one at the time
                      interval picture, so it doesn't change after being
                      drawn on the screen.

                      Regards,

                      Peter
                      [email protected]




                      -----Original Message-----
                      From: [email protected] [mailto:[email protected]]
                      Sent: Sunday, August 17, 2003 1:33 PM
                      To: [email protected]
                      Subject: Reply to post 'SAR set to open prices only'


                      Hello peterkl,

                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

                      Comment


                      • #12
                        This will only update ionce per bar and not change until the start of the next bar - is the first tick of each bar will draw a new sar.

                        Comment


                        • #13
                          RE: Reply to post 'SAR set to open prices only'

                          Thank You dloomis,

                          I REALLY appreciate your work,
                          Will test it and let you know.
                          My idea is to design trading based on
                          "what you see is what you get", that
                          takes the emotional part of the trading.
                          Is there any other way to contact you
                          directly???

                          Best Regards,
                          Peter
                          [email protected]


                          -----Original Message-----
                          From: [email protected] [mailto:[email protected]]
                          Sent: Sunday, August 17, 2003 1:57 PM
                          To: [email protected]
                          Subject: Reply to post 'SAR set to open prices only'


                          Hello peterkl,

                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

                          Comment


                          • #14
                            There are other ways to get ahold of me but this public forum is propably the best.

                            That way more people can benefit for the ideas.

                            Comment


                            • #15
                              RE: Reply to post 'SAR set to open prices only'

                              I understand,
                              Will give you my feedback. I am professional FOREX
                              trader, but not "pro" programmer...
                              Hope to get in touch with you later.

                              PK
                              [email protected]




                              -----Original Message-----
                              From: [email protected] [mailto:[email protected]]
                              Sent: Sunday, August 17, 2003 2:07 PM
                              To: [email protected]
                              Subject: Reply to post 'SAR set to open prices only'


                              Hello peterkl,

                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

                              Comment

                              Working...
                              X