Study as Input instead of Price - futures io
futures io futures trading



Study as Input instead of Price


Discussion in ThinkOrSwim

Updated by Lancer
    1. trending_up 356 views
    2. thumb_up 2 thanks given
    3. group 2 followers
    1. forum 2 replies
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 100,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

Study as Input instead of Price

(login for full post details)
  #1 (permalink)
Seattle, USA
 
Experience: Intermediate
Platform: NT7, NT8, TOS
Broker: NinjaTrader / CQG / TDA
Trading: NQ, YM, CL, GC
 
Lancer's Avatar
 
Posts: 20 since Jul 2016
Thanks: 11 given, 2 received

When a new study uses an existing study as the data input instead of price, how is that coded? Is there a reference guide with code examples for this somewhere in TOS docs?

For example, how does a LinRegCurve use a CCI input instead of price?

From the standard study list, the LinRegCurve code is:
input displace = 0;
input length = 9;
input price = close;
plot LinReg = Inertia(price[-displace], length);
LinReg.setDefaultColor(GetColor(1));

To replace the price data input with a CCI(14), how is the code changed?

Would only the "plot" line need to be modified? For example: plot LinReg = Inertia(CCI(), 14);

Thanks!

Reply With Quote

Can you help answer these questions
from other members on futures io?
Looking freelancer for MT4 Indicator
Platforms and Indicators
OPEN_CLOSE_DOTS
ThinkOrSwim
Horizontal Line Indicator
Platforms and Indicators
IB Bracker Order
Platforms and Indicators
DLL with webrequest function for MC
MultiCharts
 
 
(login for full post details)
  #2 (permalink)
Washington DC
 
 
Posts: 2 since Jan 2018
Thanks: 0 given, 3 received

Declare Lower;

input displace = 0;
input length = 9;

plot LinReg = Inertia(CCI(14)[-displace], length);
LinReg.SetDefaultColor(GetColor(1));

Reply With Quote
The following 2 users say Thank You to k6webhm for this post:
 
(login for full post details)
  #3 (permalink)
Seattle, USA
 
Experience: Intermediate
Platform: NT7, NT8, TOS
Broker: NinjaTrader / CQG / TDA
Trading: NQ, YM, CL, GC
 
Lancer's Avatar
 
Posts: 20 since Jul 2016
Thanks: 11 given, 2 received


Thanks k6webhm. I added the following to an existing CCI script, and it worked:

#Add inputs
input cciLength = 14;
input LinRegLength = 50;

#Add plots
plot CCI = CCI(length = cciLength);
plot LinReg = Inertia(CCI, LinRegLength);

#Add properties
LinReg.setDefaultColor(Color.Green);
LinReg.SetLineWeight(2);


In TOS docs, I did not find a reference guide or code examples showing for other studies how a second study is used as in input instead of price, so this is just one example using these two studies. Probably for other study pairs, the code approach is similar, but this is the only example I found.

Reply With Quote


futures io Trading Community Platforms and Indicators ThinkOrSwim > Study as Input instead of Price


September 10, 2019


Upcoming Webinars and Events
     



Copyright © 2020 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts