Announcement

Collapse
No announcement yet.

addToList Question

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

  • addToList Question

    Spent sometime in the last week looking at options and what I can and connot do (some because I just dont have the knowledge yet)

    My question is; what is and how does it work, addToList

    I have played with many alerts this week. I have looked at many posts and none seem to have helped me.

  • #2
    PATRADER
    Alert.addToList() opens the Triggered Alert List window which provides the information you have set up in the parameters (see enclosed mage). Try the sample code below which will trigger an alert if on the prior bar the close is greater than the open
    Alex

    PHP Code:
    function main(){
        if(
    getBarState()==BARSTATE_NEWBAR){
            if(
    close(-1)>open(-1)){
                
    Alert.addToList(getSymbol()+","+getInterval(),"Prior bar closed up",Color.black,Color.blue);
            }
        }
        return 
    null;

    Comment


    • #3
      GREAT!!

      THANK YOU!!!! This may be great.

      Looks like I'll have to leave work early to try this....


      I used the wizard to start my scripts then then the editor to make changes.
      I assume I can change the way the script looks, like this below. Which means I may have 3-4 expression and the expression are listed first (then give onAction) for each then after all expressions, list each action. Should I move all conditions and actions together as below or doesnt really matter. I just thought it looked easier your way then what you get after using wizard.


      New way????
      PHP:

      function main(){
      if(getBarState()==BARSTATE_NEWBAR){
      if(close(-1)>open(-1)){
      Alert.addToList(getSymbol()+","+getInterval(),"Pri or bar closed up",Color.black,Color.blue);
      }

      ///second condition or expression
      if(getBarState()==BARSTATE_NEWBAR){
      if(close(-2)>open(-2)){
      Alert.addToList(getSymbol()+","+getInterval(),"Nex t bar closed up",Color.black,Color.blue);
      }
      }
      return null;
      }


      --------where would I put the return then???

      Comment


      • #4
        PATRADER
        You are most welcome.
        Which return are you referring to? In the examples you posted I did not seen anything being returned to the chart.
        Alex

        Comment


        • #5
          Return Null at the end

          do I put this at the end?

          return null;
          }


          does the this window open for each symbol (I may several alerts at the same time, does teh window open each time for each chart (pick) and does it just keep adding to it...??

          Comment


          • #6
            PATRADER

            do I put this at the end?
            return null;
            Yes if you are not returning anything to the chart.

            does the this window open for each symbol (I may several alerts at the same time, does teh window open each time for each chart (pick) and does it just keep adding to it...??
            Run the sample code I provided and you will see what it does
            Alex

            Comment


            • #7
              No Window

              I pasted what you have below into the editor and loaded the efs and no window pop up???

              Is there something else I must do??

              Comment


              • #8
                PATRADER
                Make sure that the Triggered Alert Window is set to pop up on alert. To do this select Tools-> EFS-> Alerts from the main menu. This will open the Triggered Alert List window. Right click it and make sure that there is a check in Popup on Alert.
                Alex

                Comment


                • #9
                  Worked Great

                  Thanks - got it to work, works nicely!!!

                  Comment


                  • #10
                    Future Questions

                    The popup window works great.

                    Is there a way I can make something in that window active so that if I click on that it will load that symbol to a default graph??

                    I don't need to view all those graphs anymore unless they have meet condition (this has helped alot)!!


                    Future Capabilities if Esignal??
                    It would be Great if I could use the Quote window, load the efs, and add a column to the quote window (that I can select one or more scripts and have that column alert me somehow if it meet that criteria, almost identical to the poupwindow.

                    Comment


                    • #11
                      PATRADER

                      Is there a way I can make something in that window active so that if I click on that it will load that symbol to a default graph??
                      Not that I am aware of.
                      To submit a suggestion you can send an email to [email protected] or select Customer Support-> Make a Suggestion in the main menu of eSignal
                      Alex

                      Comment

                      Working...
                      X