Announcement

Collapse
No announcement yet.

What am I doing wrong. Alert symbol does not always update.

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

  • What am I doing wrong. Alert symbol does not always update.

    When I change the active symbol on the charts, and I am running the custom MACD that I modified to give me alerts, sometimes the symbol displayed in the Triggered Alert List does not change.

    Runinng 10.5 RC.

    Below the init block in Main (should be executed every call) I have this statement:
    var curSymbol = getSymbol();

    Then I use this statement to activate the alert.

    Alert.addToList (Symbol,"MACDh turning down" + " " + curSymbol + " " + curInterval, Color.black, Color.red);

    Thanks for any help.
    jgr
    Last edited by jgr; 07-06-2009, 12:49 PM.

  • #2
    it looks like you are using "Symbol" as the first parameter of the Alert function. I don't see where this is a valid variable.

    Try changing Symbol to getSymbol() and see if it works.
    Brad Matheny
    eSignal Solution Provider since 2000

    Comment


    • #3
      Thanks,

      Symbol is defined but maybe not being updated.

      fpArray[x] = new FunctionParameter("Symbol", FunctionParameter.STRING);
      with(fpArray[x++]){
      setDefault();
      }


      if(bInit == false){
      if(Symbol == null) Symbol = getSymbol();

      So, does that statement in the bInit block, cause Symbol to be the value of getSymbol() or the function getSymbol() if Symbol is null?

      My understanding is that if I used getSymbol() there, I would not be able to set a Symbol different from that on the chart. BTW, I started with customMACD function for this so that Symbol stuff was already there.

      jgr

      Comment

      Working...
      X