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 AB0654 with 1 posts (0 thanks)
    3. looks_3 sgbaum88 with 1 posts (0 thanks)
    4. looks_4 tangerine with 1 posts (0 thanks)
    1. trending_up 7,459 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?
No book, only a stair: journaling fills where price move …
Cryptocurrency
Datafeed for Atas
Platforms and Indicators
Trump Media to sell instant access to market-moving soci …
Traders Hideout
My Rant with AMP Futures
Trading Reviews and Vendors
EA
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Mes vs MNQ
6 thanks
NexusFi site changelog and issues/problem reporting
5 thanks
BERN ALGOS algo trading journal
3 thanks
Johnnys Journal
2 thanks
TopStep Trader disappointment
2 thanks
  #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