NexusFi: Find Your Edge


Home Menu

 





R Square for Tradestation Conversion


Discussion in EasyLanguage Programming

Updated
    1. trending_up 4,947 views
    2. thumb_up 2 thanks given
    3. group 1 followers
    1. forum 2 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
madeinnyc
Highland Park, TX
 
Posts: 36 since Jan 2020
Thanks Given: 17
Thanks Received: 20

Hi All

I came across an indicator on ThinkorSwim. This is based on a weighted moving average (wma)

This indicator does not seem to lag as much as others I use. I want to convert this over to Easy Language for use as an upper study. I'm green at Easy Language, but did miserably attempt to convert it myself before giving up!

It's suppose to plot as a line. If someone can offer help, I will post the code here....it's only a few lines


UPDATE: Got it done!


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Memorandum Watch: How the 60-Day MOU Framework Makes May …
Prediction Markets & Event Contracts
Warsh Drops Easing Bias, December Hike Now Above 50% -- …
Prediction Markets & Event Contracts
$500M Riding on World Cup 2026: France/Spain Co-Favored …
Prediction Markets & Event Contracts
Warsh Rate Hike at 40%, Iran June 15 Expires Tonight at …
Prediction Markets & Event Contracts
I Have a Thing Called Iran -- Trump Stays in DC as Airsp …
Prediction Markets & Event Contracts
 
  #2 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 R.I.P. 1977-2026 
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,669 since Jun 2009
Thanks Given: 33,669
Thanks Received: 102,580


madeinnyc View Post
UPDATE: Got it done!

Could you please share the code?




We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on X Visit my NexusFi Trade Journal Reply With Quote
  #3 (permalink)
madeinnyc
Highland Park, TX
 
Posts: 36 since Jan 2020
Thanks Given: 17
Thanks Received: 20



Big Mike View Post
Could you please share the code?

I did some research online and found a post that had the Tradestation R-Square Code. It is meant to used along with a lower Linear Regression Slope study. Together, they seem to work well. I'm interested to learn how others are using R-Square as part of their setups and on what chart types.


Here's the code:

 
Code
Input: Length(50); 
 
Variables:CriticalLine(0); 
 
CriticalLine = (10/Length)*.4; 
 
Plot1(RSquared2000i(Length),"R Squared"); 
Plot2(CriticalLine,"CriticalLine"); 
  
	 
If RSquared2000i(Length)[1] <= CriticalLine AND RSquared2000i(Length) > CriticalLine Then 
	Begin 
	SetPlotColor[1](1, tool_White); 
	SetPlotWidth[1](1, 1); 
 
	End; 
 
If RSquared2000i(Length)>=.95 then 
	Begin 
	SetPlotColor[1](1, tool_Red); 
	SetPlotWidth[1](1, 1); 
End;


Reply With Quote
Thanked by:




Last Updated on June 18, 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