NexusFi: Find Your Edge


Home Menu

 





getsymbol() issue. Need help


Discussion in ThinkOrSwim

Updated
      Top Posters
    1. looks_one joysync with 2 posts (0 thanks)
    2. looks_two sgbaum88 with 1 posts (0 thanks)
    3. looks_3 tangerine with 1 posts (0 thanks)
    4. looks_4 AB0654 with 1 posts (0 thanks)
    1. trending_up 7,351 views
    2. thumb_up 0 thanks given
    3. group 4 followers
    1. forum 4 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
 joysync 
Toronto Canada
 
Experience: Intermediate
Platform: thinkorswim, NT
Trading: Emini ES NQ
Posts: 5 since Nov 2014
Thanks Given: 9
Thanks Received: 0

I try to write some study on particular stock only such as AAPL. I use getsymbol()== "aapl" to test, but I always get false result on AAPL chart. I can't figure out where is wrong. Hope somebody can help. thanks.


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
After $87M Settles NO: Irans Nuclear Redline Sets Up the …
Prediction Markets & Event Contracts
Rubios Good News Within Hours and the 30-Day Math: Why H …
Prediction Markets & Event Contracts
May 26 Deadline Dies at 7.5% as US Strikes Iran During C …
Prediction Markets & Event Contracts
Iran Fired a Missile at Israel Last Night. The $8M June …
Prediction Markets & Event Contracts
Czechia Live at 52.5% as England Rides 4-2 Wave to Co-Fa …
Prediction Markets & Event Contracts
 
  #2 (permalink)
tangerine
albuquerque nm/usa
 
Posts: 27 since Aug 2015
Thanks Given: 3
Thanks Received: 9


joysync View Post
I try to write some study on particular stock only such as AAPL. I use getsymbol()== "aapl" to test, but I always get false result on AAPL chart. I can't figure out where is wrong. Hope somebody can help. thanks.

Are you comparing AAPL to another stock? Simplest way using a lower study for that is
 
Code
def goldilocks1 = close("AAPL");
OR from TOS Manual...
 
Code
declare lower;
plot Diff = close(GetSymbol()) - close("IBM");
This example script plots the difference between Close prices of currently selected symbol and IBM.


Reply With Quote
  #3 (permalink)
 joysync 
Toronto Canada
 
Experience: Intermediate
Platform: thinkorswim, NT
Trading: Emini ES NQ
Posts: 5 since Nov 2014
Thanks Given: 9
Thanks Received: 0



tangerine View Post
Are you comparing AAPL to another stock? Simplest way using a lower study for that is
 
Code
def goldilocks1 = close("AAPL");
OR from TOS Manual...
 
Code
declare lower;
plot Diff = close(GetSymbol()) - close("IBM");
This example script plots the difference between Close prices of currently selected symbol and IBM.

Thanks Tangerine, Maybe it is not very clear.
I want to write study only show on AAPL chart, And it will not show on other stock. So I use the getsymbol() == "AAPL" to test current chart is AAPL or not . But the return of getsymbol() always false . I can't find anything wrong. Please help. thanks


Started this thread Reply With Quote
  #4 (permalink)
sgbaum88
Minneapolis MN
 
Posts: 1 since Mar 2013
Thanks Given: 0
Thanks Received: 0

Try this

input symbol = yes;

plot 'plot name' = if symbol then 'formula' else Double.nan;


Reply With Quote
  #5 (permalink)
AB0654
New York
 
Posts: 1 since May 2020
Thanks Given: 0
Thanks Received: 0


joysync View Post
I try to write some study on particular stock only such as AAPL. I use getsymbol()== "aapl" to test, but I always get false result on AAPL chart. I can't figure out where is wrong. Hope somebody can help. thanks.


Use uppercase AAPL.

 
Code
GetSymbol() == "AAPL"


Reply With Quote




Last Updated on May 2, 2020


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts