Announcement

Collapse
No announcement yet.

Is it possible to trigger e-mail from EFS script?

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

  • Is it possible to trigger e-mail from EFS script?

    I was wondering if it is possible to trigger an e-mail from efs script

    I wouldn't need anything fancy, even a 'check charts' headline would be all I would need

  • #2
    swtrader
    Yes it is possible
    Alex

    Comment


    • #3
      Originally posted by Alexis C. Montenegro
      swtrader
      Yes it is possible
      Alex
      thanks - do you have any code examples?

      Comment


      • #4
        swtrader
        Here is a very basic example of an efs that will send an email at every change of hour. You can run it in Tick Replay to test it
        Alex

        PHP Code:
        function preMain() {
            
        setPriceStudy(true);
            
        setStudyTitle("sample");
            
        setShowCursorLabel(false);
        }

        var 
        Sent false;

        function 
        main() {

        if(
        getBarState()==BARSTATE_NEWBAR){
        Sent false;
        }

        if(
        getHour()!=getHour(-1)&&Sent==false){
        Alert.email("Check charts","Test email");
        Sent true;
        }

        return;

        Comment


        • #5
          Thanks, Alexis

          is there more code required for creation of the e-mail object?

          I don't see any place to bind the e-mail address to the object


          Originally posted by Alexis C. Montenegro
          swtrader
          Here is a very basic example of an efs that will send an email at every change of hour. You can run it in Tick Replay to test it
          Alex

          PHP Code:
          function preMain() {
              
          setPriceStudy(true);
              
          setStudyTitle("sample");
              
          setShowCursorLabel(false);


          var 
          Sent false;

          function 
          main() {

          if(
          getBarState()==BARSTATE_NEWBAR){
          Sent false;
          }

          if(
          getHour()!=getHour(-1)&&Sent==false){
          Alert.email("Check charts","Test email");
          Sent true;
          }

          return;

          Comment


          • #6
            swtrader
            No further code is required. The settings are the same ones used for the Alerts (see View->Alerts in the main menu).
            For more information on how to configure the email settings see this article in the eSignal KnowledgeBase
            Alex

            Comment

            Working...
            X