Announcement

Collapse
No announcement yet.

getSymbol() Limitations?

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

  • getSymbol() Limitations?

    Anyone,

    Is there a way I can get the base of a symbol. ie: YM #F, YM H7 would just report YM. I want the study to exit if it is not being run on the YM or $PLAYBACK but I dont want to have to type in all the possibile expiration date combinations.

    Thanks as always!

  • #2
    glay
    You can do that by using the charAt() method of the string object and determine if the first two characters of the string returned by the getSymbol() function are the letters "Y" and "M"
    Alex

    Comment


    • #3
      thanks! worked like a charm

      Comment

      Working...
      X