Tradestation Relative Strength - futures io
futures io futures trading



Tradestation Relative Strength


Discussion in EasyLanguage Programming

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




Welcome to futures io: the largest futures trading community on the planet, with well over 125,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
 

Tradestation Relative Strength

(login for full post details)
  #1 (permalink)
United Kingdom
 
 
Posts: 4 since Jun 2014
Thanks: 1 given, 0 received

Relative Strength

Hi,

I an new to TradeStation Easylanguage code.
Could you please correct the code below?
I do not know how to use the Array function in formulas
Or should this me a Function

I have attached MS Word copy of this note in case it gets corrupted in the internet
Also a screenshot to show what the Indicator should look like

Hoping you can oblige.
Thank you in advance

Derek

----------------------------*Code*-----------------------------------

Input: Period(20);

Vars:

f88(0), f90(0), f0(0),v4(0),v8 (0), vC(0), v10(0), v14(0), v18(0), v20(0),
f8(0), f10(0), f18 (0), f20(0), f28(0), f30(0), f38(0), f48(0), v1C(0),
f50(0), f58(0), f60(0), f68(0), f70(0), f78(0), f80(0), f40(0);
f90 = 1.0;
f0 = 0.0;

{

if ( Period-1 >= 5 )
f88 = Period-1.0;
else f88 = 5.0;
f8 = 100.0 * ((H[0]+L[0]+Close[0])/3);
f18 = 3.0 / (Period + 2.0);
f20 = 1.0 - f18;

//for ( i = 1; i < BarCount; i++ )
for i = 1 to 21
begin

{
if (f88 <= f90) f90 = f88 + 1; else f90 = f90 + 1;
f10 = f8;
f8 = 100*Close[i];
f8 = 100.0*((H[i]+L[i]+C[i])/3);
v8 = f8 - f10;
f28 = f20 * f28 + f18 * v8;
f30 = f18 * f28 + f20 * f30;
vC = f28 * 1.5 - f30 * 0.5;
f38 = f20 * f38 + f18 * vC;
f40 = f18 * f38 + f20 * f40;
v10 = f38 * 1.5 - f40 * 0.5;
f48 = f20 * f48 + f18 * v10;
f50 = f18 * f48 + f20 * f50;
v14 = f48 * 1.5 - f50 * 0.5;
f58 = f20 * f58 + f18 * abs (v8);
f60 = f18 * f58 + f20 * f60;
v18 = f58 * 1.5 - f60 * 0.5;
f68 = f20 * f68 + f18 * v18;

f70 = f18 * f68 + f20 * f70;
v1C = f68 * 1.5 - f70 * 0.5;
f78 = f20 * f78 + f18 * v1C;
f80 = f18 * f78 + f20 * f80;
v20 = f78 * 1.5 - f80 * 0.5;

if ((f88 >= f90) && (f8 != f10)) f0 = 1.0;
if ((f88 == f90) && (f0 == 0.0)) f90 = 0.0;
if ((f88 < f90) && (v20 > 0.0000000001))

v4 = (v14 / v20 + 1.0) * 50.0;
if (v4 > 100.0) v4 = 100.0;
if (v4 < 0.0) v4 = 0.0;
}
else
{
v4 = 50.0;
}

rsx[i] = v4;
}

// return rsx;
//}

// Plot1( rsx, "rsx", RED, default, 2 ) ;

--------------------------------------------------- */Code*-----------------------------------------------------------------------

Attached Thumbnails
Click image for larger version

Name:	RS.JPG
Views:	74
Size:	134.5 KB
ID:	150029  
Attached Files
Register to download File Type: doc Relative Strength.doc (372.0 KB, 23 views)
Reply With Quote

Can you help answer these questions
from other members on futures io?
Which kind of Blockvolume is visible? - order processing
Emini and Emicro Index
What blockvolume is visible? - order processing
NinjaTrader
Second Entry Indicator (Looking for testers/feedback)
NinjaTrader
SimplerOptions
Trading Reviews and Vendors
MACD line not plotting after change of plot order
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on futures io
Selling Options on Futures?
109 thanks
Battlestations: Show us your trading desks!
108 thanks
Rank your Futures vs Stocks trading priority
55 thanks
Want your NinjaTrader indicator created, free?
27 thanks
Whats this confusion with margins?
21 thanks
 
(login for full post details)
  #3 (permalink)
 
 
Posts: 2,230 since Apr 2013
Thanks: 409 given, 1,471 received


Derek,

what is the origin of the code? Did you try to translate it from a different language?

Regards,
ABCTG

Follow me on Twitter Reply With Quote
 
(login for full post details)
  #4 (permalink)
United Kingdom
 
 
Posts: 4 since Jun 2014
Thanks: 1 given, 0 received

Hello,


Thank you for your reply to my question.

The code was originally posted as Amibroker Code on the wisestocktrader...

There is a paste and copy friendly tab on the wisestocktrader web site

( I do not know how to add the Blue tag "Code " in to put the code into a panel. _


Thank you for your help,

Best regards,

Derek


 
Code
 

-----------------      Original Amibroker Code ------------------------------------------------------------

/*

Turbo_JRSX : a better RSI ?


*/

SetChartOptions (0, 0, chartGrid20 | chartGrid50 | chartGrid80);

Len = Param ( "Periods", 12, 1, 200, 1 );


function JRSX ( Period )
{

	f88 = 0; f90 = 0; f0 = 0; v4 = 0; 	v8 = 0; vC = 0; v10 = 0; v14 = 0; v18 = 0; v20 = 0;
	f8 = 0; f10 = 0; f18 = 0; f20 = 0; f28 = 0; f30 = 0; f38 = 0; f48 = 0; v1C = 0;
	f50 = 0; f58 = 0; f60 = 0; f68 = 0; f70 = 0; f78 = 0; f80 = 0; f40 = 0;

	f90 = 1.0;
	f0  = 0.0;

	if ( Period-1 >= 5 )
		f88 = Period-1.0;
	else
		f88 = 5.0;

	f8 = 100.0 * ((H[0]+L[0]+Close[0])/3);
	f18 = 3.0 / (Period + 2.0);
	f20 = 1.0 - f18;

   for ( i = 1; i < BarCount; i++ )
	{
		if (f88 <= f90) f90 = f88 + 1; else f90 = f90 + 1;
		f10 = f8;
 //    f8 = 100*Close[i];
		f8 = 100.0*((H[i]+L[i]+C[i])/3);
		v8 = f8 - f10;
		f28 = f20 * f28 + f18 * v8;
		f30 = f18 * f28 + f20 * f30;
		vC = f28 * 1.5 - f30 * 0.5;
		f38 = f20 * f38 + f18 * vC;
		f40 = f18 * f38 + f20 * f40;
		v10 = f38 * 1.5 - f40 * 0.5;
		f48 = f20 * f48 + f18 * v10;
		f50 = f18 * f48 + f20 * f50;
		v14 = f48 * 1.5 - f50 * 0.5;
		f58 = f20 * f58 + f18 * abs (v8);
		f60 = f18 * f58 + f20 * f60;
		v18 = f58 * 1.5 - f60 * 0.5;
		f68 = f20 * f68 + f18 * v18;

		f70 = f18 * f68 + f20 * f70;
		v1C = f68 * 1.5 - f70 * 0.5;
		f78 = f20 * f78 + f18 * v1C;
		f80 = f18 * f78 + f20 * f80;
		v20 = f78 * 1.5 - f80 * 0.5;

		if ((f88 >= f90) && (f8 != f10)) f0 = 1.0;
		if ((f88 == f90) && (f0 == 0.0)) f90 = 0.0;
		if ((f88 < f90) && (v20 > 0.0000000001))
		{
			v4 = (v14 / v20 + 1.0) * 50.0;
			if (v4 > 100.0) v4 = 100.0;
			if (v4 < 0.0) v4 = 0.0;
		}
		else
		{
			v4 = 50.0;
		}

		rsx[i] = v4;
	}

	return rsx;
}


Plot ( JRSX(Len), "Turbo JRSX", ParamColor ( "Color", colorCycle ), ParamStyle ("Style"), 0, 100 );


------------------------     End of Code     ------------------------------------------------------------

Reply With Quote
 
(login for full post details)
  #5 (permalink)
United Kingdom
 
 
Posts: 4 since Jun 2014
Thanks: 1 given, 0 received

Hello,

I was not allowed to post the HTTP link as I had insufficient previous posts ( less than 5 posts)

Best regards

Derek

Reply With Quote


futures io Trading Community Platforms and Indicators EasyLanguage Programming > Tradestation Relative Strength


Last Updated on June 30, 2014


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Battlestations! Show us your trading desk - $1,500 in prizes!

March
 

Importance of Finding Your Own Way w/Adam Grimes

Elite only
 

Journal Challenge w/Jigsaw

April
     



Copyright © 2021 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