Announcement

Collapse
No announcement yet.

Alert on bar close???

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

  • Alert on bar close???

    I am trying to write an alert (low volume), but I want the alert to come at the close of the bar (5 minute) - how can this be done in the Formula Wiz?

  • #2
    lassiter
    This can't be done yet in the Formula Wizard.
    However once you have completed and saved the formula with the Formula Wizard, then open it with the Editor and add the following statement in the function preMain() section.

    setComputeOnClose()

    Alex

    Comment


    • #3
      Thanx !!!

      Comment


      • #4
        OK, I give up - this is what I have:


        function preMain(){

        /**
        * This function is called only once, before any of the bars are loaded.
        * Place any study or EFS configuration commands here.
        */



        setPriceStudy(true);
        setComputeOnClose(true);
        setStudyTitle("duv");


        //}}EFSWizard_PreMain 6130

        }

        ...but it's not working - what am I doing wrong???

        Comment


        • #5
          lassiter
          The statement is setComputeOnClose() and not setComputeOnClose(true)
          Alex

          Comment


          • #6
            OK, now it reads:



            setPriceStudy(true);
            setComputeOnClose();
            setStudyTitle("duv");



            ...but it still ain't workin'...(sigh)

            Comment


            • #7
              lassiter
              Does the alert work if you rem the setComputeOnClose() statement?
              If yes then this could be the same issue others have reported where the setComputeOnClose prevents alerts from working.
              If no then you might want to post the efs or the code and someone can take a look at what could be a reason.
              Alex

              Comment


              • #8
                Yes - it works just fine without the statement - tick by tick.

                One more thing - I don't know if it matters, but the "statement" is in black, while the others are in blue...

                Comment


                • #9
                  lassiter
                  This looks like it is the same issue then. So as to provide better feedback to eSignal you may want to post what build this is happening with.
                  The compute on close statement is written in black btw, so that is normal.
                  Alex

                  Comment


                  • #10
                    7.2 build 544

                    Comment


                    • #11
                      lassiter,

                      You may want to try the current beta release. This has a few improvements/corrections to the setComputeOnClose function, and could solve your issue. If it does not, then there are ways of doing the setComputeOnClose equivalent with checking the getBarState() for BARSTATE_NEWBAR. For instance...

                      PHP Code:
                      if (getBarState() == BARSTATE_NEWBAR) { // is true when a new bar is created.

                       // .. insert your alert code here


                      Regards,
                      Jay F.
                      Product Manager
                      _____________________________________
                      Have a suggestion to improve our products?
                      Click Support --> Request a Feature in eSignal 11

                      Comment


                      • #12
                        Going to 7.3 did the trick - THANX

                        Comment

                        Working...
                        X