EasyLanguage SuperTrend indicator - EasyLanguage Programming | futures io social day trading
futures io futures trading


EasyLanguage SuperTrend indicator
Updated: Views / Replies:55,645 / 79
Created: by Big Mike Attachments:9

Welcome to futures io.

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

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

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

Reply
 9  
 
Thread Tools Search this Thread
 

EasyLanguage SuperTrend indicator

  #1 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,237 since Jun 2009
Thanks: 29,350 given, 83,160 received

EasyLanguage SuperTrend indicator

Here is my version of a TradeStation/MultiCharts EasyLanguage SuperTrend indicator.

I made it a function so it could be called easily from a strategy.

Function:
 
Code
                            
// SuperTrend function 
// March 25 2010
// Big Mike https://futures.io

inputs
ATRLength(NumericSimple), ATRMult(NumericSimple), Strength(NumericSimple), STrend(NumericRef);

vars
ATR(0), 
avg(0), 
dn(0), 
up(0), 
trend(1), 
flag(0), 
flagh(0), 
ST(0),
hl(0); 


hl Highest(HighATRLength) - Lowest(LowATRLength);
ATR XAverage(hlATRLength);
avg = (XAverage(highStrength) + XAverage(lowStrength))/2;
up avg ATR
dn avg ATR

if 
up[1] and Highest(HighStrength)[1then
trend 
1
else if dn[1] and Lowest(LowStrength)[1then
trend 
= -1;


if 
trend and trend[1] > 0 then flag=else flag=0
if 
trend and trend[1] < 0 then flagh else flagh 0

if 
trend and dn dn[1then dn=dn[1];
if 
trend and up up[1then up=up[1];

if 
flag 1 then up avg ATR
if 
flagh 1 then dn avg ATR

if 
trend 1 then ST dn else ST up;
SuperTrend ST;
STrend trend
Please note, on my version I use personally, the line "avg = (XAverage(high, Strength) + XAverage(low, Strength))/2;" from above function uses a Jurik-like phased moving average, not XAverage(EMA). But I haven't posted that yet, so I just made this use XAverage instead. Replace with your favorite MA.

Indicator:
 
Code
                            
// SuperTrend indicator
// March 25 2010
// Big Mike https://futures.io 

inputs
ATRLength(9), ATRMult(1), Strength(9);

vars
strend(0),
st(0);

st SuperTrend(ATRLengthATRMultStrengthstrend);

Plot1(st,"Up");
Plot2(st,"Down");
Plot3(st,"SuperTrend",iff(strend 1,GetPlotColor(1),GetPlotColor(2))); 
To get the desired Indicator effect and control over plot colors that I wanted, I made Plot1 and Plot2 a real plot so you could precisely control the RGB color. You need to mark these plots as invisible once you setup the indicator! I will provide a screen shot below as an example.

Plot3 is the real plot, and it will be colored based on if trend is up or down.

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


Here are some example screenshots:

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Member
Omaha, NE
 
Futures Experience: Intermediate
Platform: OpenECry Trader
Broker/Data: InfinityAT/OEC
Favorite Futures: Forex Futures
 
daedalus's Avatar
 
Posts: 46 since Nov 2009
Thanks: 15 given, 25 received


Is the name of the function "SuperTrend"?

In OEC we have to combine functions and indicator code into the same file and call the functions manually. Can't get her to compile using SuperTrend as the function name.... is this correct?

Reply With Quote
 
  #4 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,237 since Jun 2009
Thanks: 29,350 given, 83,160 received


daedalus View Post
Is the name of the function "SuperTrend"?

In OEC we have to combine functions and indicator code into the same file and call the functions manually. Can't get her to compile using SuperTrend as the function name.... is this correct?

Yes, function name is SuperTrend.

I'm not sure about OEC sorry. If you have to combine them, try taking the function code but using the indicator inputs, then add the plots.. more or less.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
 
  #5 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,237 since Jun 2009
Thanks: 29,350 given, 83,160 received

Attached is a MultiCharts pla which includes the SuperTrend function, SuperTrend indicator, at the Hull Moving Average I was using. You can replace the Mov Avg (jtHMA) with whatever floats your boat.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Attached Files
Register to download File Type: pla BMT SuperTrend.pla (9.3 KB, 730 views)
Reply With Quote
The following 12 users say Thank You to Big Mike for this post:
 
  #6 (permalink)
Just starting out...
 
Futures Experience: Master
Platform: ...
 
Posts: 1 since Feb 2010
Thanks: 1 given, 0 received

[...]
[...]
[...]
[...]


Last edited by frathom; April 4th, 2010 at 07:00 AM.
Reply With Quote
 
  #7 (permalink)
Just starting out...
clifton, nj
 
Futures Experience: Intermediate
Platform: TOS, Infinity
Favorite Futures: ES, 6E
 
Posts: 2 since Jul 2010
Thanks: 1 given, 2 received

Mike-

when does the ATR Mult come into play?



thanks

-Steve

Reply With Quote
The following user says Thank You to factory15 for this post:
 
  #8 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,237 since Jun 2009
Thanks: 29,350 given, 83,160 received


factory15 View Post
Mike-

when does the ATR Mult come into play?



thanks

-Steve

It doesn't, was a bug in the code I listed above. You just need to modify:
 
Code
                            
up avg + (ATR*ATRMult); 

dn avg - (ATR*ATRMult); 
If you want to add it.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
The following user says Thank You to Big Mike for this post:
 
  #9 (permalink)
Just starting out...
clifton, nj
 
Futures Experience: Intermediate
Platform: TOS, Infinity
Favorite Futures: ES, 6E
 
Posts: 2 since Jul 2010
Thanks: 1 given, 2 received

Thanks Mike...

if you dont mind me asking- as a CL guy, what numbers do you plug in for ATRLength and Strength typically? Do you find it works pretty well?

I converted this over to thinkscript and I think I've got it working...anxious to see it in action.

thanks again

Reply With Quote
The following user says Thank You to factory15 for this post:
 
  #10 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,237 since Jun 2009
Thanks: 29,350 given, 83,160 received



factory15 View Post
Thanks Mike...

if you dont mind me asking- as a CL guy, what numbers do you plug in for ATRLength and Strength typically? Do you find it works pretty well?

I converted this over to thinkscript and I think I've got it working...anxious to see it in action.

thanks again

I don't use indicators in my trading, sorry. But the defaults of the script were probably what I used when I wrote it.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
The following 4 users say Thank You to Big Mike for this post:

Reply



futures io > > > > > EasyLanguage SuperTrend indicator

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

Dec 7

Linda Bradford Raschke: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
EasyLanguage ADXVMA Indicator Big Mike EasyLanguage Programming 15 October 29th, 2014 10:51 PM
Error with recoded Supertrend Line for EasyLanguage DarrenH EasyLanguage Programming 3 February 5th, 2011 01:05 PM
NinjaTrader indicator SuperTrend + audio alerts ojwright NinjaTrader 6 July 29th, 2010 02:54 AM
EasyLanguage ZeroLagEMA indicator Big Mike EasyLanguage Programming 1 April 10th, 2010 02:16 PM
EasyLanguage ZeroLagWMA indicator Big Mike EasyLanguage Programming 1 April 10th, 2010 02:09 PM


All times are GMT -4. The time now is 11:45 AM.

Copyright © 2017 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
Page generated 2017-11-20 in 0.11 seconds with 20 queries on phoenix via your IP 54.145.117.60