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 6,500 views
    2. thumb_up 0 thanks given
    3. group 4 followers
    1. forum 4 posts
    2. attach_file 0 attachments




 
Search this Thread

getsymbol() issue. Need help

  #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?
What broker to use for trading palladium futures
Commodities
ZombieSqueeze
Platforms and Indicators
Better Renko Gaps
The Elite Circle
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
REcommedations for programming help
Sierra Chart
 
  #2 (permalink)
tangerine
albuquerque nm/usa
 
Posts: 29 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


© 2024 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 - Privacy Policy - Downloads - Top
no new posts