Announcement

Collapse
No announcement yet.

postmain, How to tell if exit or just switching time?

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

  • postmain, How to tell if exit or just switching time?

    Hi,
    When using the postmain, how do you tell if you are exiting eSignal or switching stocks or switching time frames?

    Thanks
    Tom

  • #2
    Hello Tom,

    Try adding the following code to a test formula and it will alert you as to when postMain() gets called.

    PHP Code:
    function postMain() {
        
    Alert.playSound("train.wav");
        
    debugPrintln("interval was: " getInterval());    
        
    debugPrintln("symbol was: " getSymbol());
        
    debugPrintln("postMain executed!.");
        
    debugPrintln("  ");

    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
      Thank you Jason,

      I about had a heart attack, I had the volumn turned up when the "train.wav" sound played. lol

      It only tells me what the current symbol is and not what the next one is and not if I'm exiting eSignal. I can set a global variable and then tell if I changed symbols on entery. I think that will work.

      Tom

      Comment


      • #4
        Tom, you're most welcome. Glad to hear you didn't miss the train.

        The postMain() function can't be used to tell you what the next symbol or interval is. This function is the last thing executed by the formula before it get reinitialized for the new symbol or interval. Upon exiting or shutting down eSignal you should hear the audible alert however.
        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

        Working...
        X