NexusFi: Find Your Edge


Home Menu

 





thinkscript reference


Discussion in ThinkOrSwim

Updated
    1. trending_up 8,181 views
    2. thumb_up 6 thanks given
    3. group 2 followers
    1. forum 3 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
situhold
calgary ab/canada
 
Posts: 3 since Aug 2014
Thanks Given: 1
Thanks Received: 0

hi,

can someone help me out on this following question?
I like to create a new thinkscript indicator adding a reference to one of my custom indicator. can you show me how to do that if thinkorswim allow me to do so?

thanks


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
My Rant with AMP Futures
Trading Reviews and Vendors
EA
Platforms and Indicators
Trump Media to sell instant access to market-moving soci …
Traders Hideout
No book, only a stair: journaling fills where price move …
Cryptocurrency
requesting .nrd replay files from 2026 spy and qqq
The Elite Circle
 
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)
 
Massive l's Avatar
 Massive l 
OR/USA
Legendary /NQ Trader
 
Experience: None
Posts: 2,129 since Mar 2011
Thanks Given: 1,859
Thanks Received: 5,109

I believe you type in the indicator name and then () after it


Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #3 (permalink)
situhold
calgary ab/canada
 
Posts: 3 since Aug 2014
Thanks Given: 1
Thanks Received: 0


Hi,
There must something wrong I type in the code, it shows high-light red on "myindicator1"
Def test=reference myindicator1();
Please correct me.
Thanks


Reply With Quote
  #4 (permalink)
 
Massive l's Avatar
 Massive l 
OR/USA
Legendary /NQ Trader
 
Experience: None
Posts: 2,129 since Mar 2011
Thanks Given: 1,859
Thanks Received: 5,109

Referencing Pre-Defined Studies
thinkScript allows you to reference studies that are already available on the Charts tab in your code. You use the reference keyword to do this.
plot SMA = reference simplemovingavg;
or
plot SMA = simplemovingavg();
will plot a simple moving average with the default parameters of that study. So long as the study name is followed by parentheses, you don't need to include the word 'reference'. You can change the parameters of the study within reference by inputting them between parentheses.
plot SMA = simplemovingavg(price = volume, length = 20);
will plot a 20 day moving average of the volume. To see the input parameters of a particular study, click on that study in the 'Edit Studies' section of the Charts tab. You will see the available parameters listed in the study properties section.

By default, the first plot of a study is always referenced. However, you can specify the plot you want to reference, as well.
plot bear = reference ElderRay."BearPower"

plot bear = ElderRay(length = 6)."BearPower"


Visit my NexusFi Trade Journal Reply With Quote




Last Updated on September 12, 2014


© 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