NexusFi: Find Your Edge


Home Menu

 





R Square for Tradestation Conversion


Discussion in EasyLanguage Programming

Updated
    1. trending_up 4,923 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?
CME Launches Bitcoin Volatility Futures June 1 -- First …
Cryptocurrency
Beijing Summit Closes: Xi Pledges Hormuz Help -- $1.14B …
Prediction Markets & Event Contracts
US Prop Firms Race Inside the CFTC Perimeter -- Tradeify …
Funded Trading Evaluation Firms
Post-Summit Market Verdict: ES -1%, NQ -1.5%, 10-Year Yi …
Traders Hideout
Iran Forward Curve: June 30 at 56% vs June 15 at 28% -- …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
13 thanks
Darmok and Jalad at Tanagra
3 thanks
Big Mike in Ecuador
1 thanks
30 Sessions
1 thanks
  #2 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
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,577


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