Announcement

Collapse
No announcement yet.

Alert.addToList

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

  • Alert.addToList

    Hi Jason/Alex:

    does that command only avails itself on the last bar? i.e., barindex = 0?

    Is there anyway to post messages on Alertlist during processing historical bars?

    Thanks.

  • #2
    Hello z11,

    You are correct. The Alert object's alerts will only be executed in real time, not on historical bars during the loading process. There isn't a method for populating the Alert list during the loading process. You could print the information to a file or to the formula output window as an alternative.
    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


    • #3
      thanks for the confirmation...after many attempts I ended up with debugPrintln as the closest (visual) alternative but just wanted to make sure...

      Comment


      • #4
        Thanks for confirming that behavior Jason.

        I think that it would be useful to have that sort of information in the help file as well. For each function it would be a great help to be able to see:

        Available in:
        main() (only while receiving ticks on current bar)

        Not available in:
        preMain()
        postMain()

        etc.

        It would save a lot of time and remove the need to come to the Bulletin Board and search for the info. It would also save time trying to use the function in a context that it was not meant to be used (for the programmer) as well as answer questions such as these (for you).

        Thanks.
        Standing on the shoulders of giants.

        Comment


        • #5
          Originally posted by z11
          thanks for the confirmation...after many attempts I ended up with debugPrintln as the closest (visual) alternative but just wanted to make sure...
          z11: If the symbol that you want initial alerts on is updated frequently enough then the following work around might help you:

          Call
          AppendAlert("some alert text");
          with your alert.

          And then call
          ShowPendingAlerts();
          on each tick.

          This can also be modified by using the time functions to show alerts only at specific times and to queue them until then.

          PHP Code:
          var _bPendingAlerts false;
          var 
          _sPendingAlerts = new Array();
          function 
          ShowPendingAlerts() {
              if(
          _bPendingAlerts) {
                  var 
          i;
                  for(
          i=0i<_sPendingAlerts.lengthi++) {
                      
          Alert.addToList(getSymbol(), _sPendingAlerts[i], Color.whiteColor.red);
                  }
                  
          _sPendingAlerts = new Array();
                  
          _bPendingAlerts false;
              }
          }

          function 
          AppendAlert(alertString) {
              
          debugPrintln(alertString);
              
          _sPendingAlerts.push(alertString);
              
          _bPendingAlerts true;

          Standing on the shoulders of giants.

          Comment


          • #6
            Hi Alex/Jason:

            in EFS1, I am trying to get atr of a symbol with a "D" interval from a chart running at 15 minute interval (or any other interval for that matter):
            var a1 = atr(14, getSymbol(), "D");

            I am not getting the right value from that call to atr? Please help.

            As always, thank you very much.

            Comment


            • #7
              ok Gentlemen, I did not articulate my question correctly:

              in EFS1, is there a way to retrieve ATR of daily frequency within a script running in a 15 minute chart?

              I tried:

              var atr1 = new ATRStudy(14, getSymbol()+", D");
              var atr1v = atr1.getValue(ATRStudy.ATR);

              ...and atr1v returns atr(14) of the 15 minute time frame, instead of "D". Any thoughts?

              ziggy

              Comment


              • #8
                ziggy
                You cannot use external symbols (and/or intervals) with efs1 builtin studies
                Alex

                Comment

                Working...
                X