Announcement

Collapse
No announcement yet.

real-time / reload

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Greg
    The attached revision now updates correctly in real time.
    Alex
    Attached Files

    Comment


    • #17
      Yes, it does. Greatly appreciate your help Alex.
      - Greg

      Comment


      • #18
        In attempting to add CCI, I mess it up again. I have all declared all the new variables as well as added new equations in similar locations as what you gave me in the past, but to no avail.

        Any help you can lend would be greatly appreciated.

        Also, I've tried the playSound in a variety of formats, & none of them work. What am I doing wrong there?

        Thanks,
        Greg
        Attached Files

        Comment


        • #19
          Greg
          With regards to the alerts you need to change the commands to
          Alert.playSound("C:\\Program Files\\eSignal\\Sounds\\yoursound.wav");
          or even just
          Alert.playSound("yoursound.wav");
          You may also want to add some flag to prevent the sound alerts from playing on every tick once they are triggered. If you run a Search in the Bulletin Board for average* AND alert* you should find several examples showing different ways of doing this.
          As to the shapes the problem is that unlike bar or background colors, which are properties of a chart and can be changed at any time, shapes, text, etc are objects that are applied to the chart and are persistent even if the condition that triggered them is no longer true. In other words you have to remove them yourself once the condition no longer exists. Using your own code as an example here is what you would need to do to remove the shape drawn by the first condition

          PHP Code:
          if(T3Average>T3Average_1 && vStochFast>vStochSlow && vCCI vCCI_1) {
                  
          drawShapeRelative(0open(), Shape.SQUAREnullColor.darkgreenShape.RIGHTgetValue("rawtime")+"SAR1");
                  
          Alert.playSound("C:\\Program Files\\eSignal\\Sounds\\buzz.wav");    // doesn't work
                  
          drawTextAbsolute(130" Long Entry " open() + " "Color.darkgreennullText.RELATIVETOLEFT|
                                  
          Text.RELATIVETOBOTTOM|Text.FRAME"Arial"11"text1");
              }else{
                  
          removeShape(getValue("rawtime")+"SAR1");
              } 
          Notice that I have also changed the TagName of the shape (from "SAR" to "SAR1") to make it unique and distinguish it from the other shape being drawn on the chart by the second condition
          Repeat the same for the second condition. Note that in the second condition you will need to remove the else from the else if(T3Average<T3Average_1 &&...
          Alex

          Comment


          • #20
            Hi Alex,

            You've answered all my questions. Works great now.

            Thanks,
            Greg

            Comment

            Working...
            X