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


EasyLanguage SuperTrend indicator
Updated: Views / Replies:53,775 / 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

  #31 (permalink)
Elite Member
Stockholm
 
Futures Experience: Intermediate
Platform: Nanotrader/ tradestaion
Broker/Data: WHS / TS
Favorite Futures: EC / SI / ES / BP
 
Posts: 19 since Mar 2011
Thanks: 8 given, 5 received

indicator or Strategy

Hello, is this the EL for the indicator or the strategy?
I see 2 diffrent, do they belong together or are they 2 separate indicators or strategy's?

Lamboo

Reply With Quote
 
  #32 (permalink)
Elite Member
NJ
 
Futures Experience: Beginner
Platform: NinjaTrader
 
Posts: 7 since May 2010
Thanks: 2 given, 21 received

Hi Lamboo,

1st one is indicator code, 2nd one is for _anaMovingMedian function used by the indicator.
All you need is copy and paste the code in EasyLanguage Editor (File -> New).

Hope this helps.

Reply With Quote
 
  #33 (permalink)
Elite Member
Quebec
 
Futures Experience: Intermediate
Platform: Multicharts 64 +VolProfile
Broker/Data: AMP Trading / CQG
Favorite Futures: Ym, Es
 
Serger's Avatar
 
Posts: 72 since Oct 2010
Thanks: 64 given, 22 received


Changwin,
I import, compile code and indic .. but one problem ..
I have make :subgraph1 ...same as instrument but just one red line at 0.001
Have you one idea why?
Thank you

Attached Thumbnails
EasyLanguage SuperTrend indicator-anasupertrendm1.png  
Reply With Quote
 
  #34 (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,007 since Jun 2009
Thanks: 29,168 given, 82,169 received


chtangwin View Post
Thanks Mike. futures.io (formerly BMT) is the greatest forum I ever know. Certainly glad I can contribute. I am new to EL and trading. Having programming background, writing code is easy, but learning trading is hard.

Feel free to let me know if there is any programming need, could be a good exercise for me.

Please check here for requests:
https://futures.io/elite-circle/11130-want-your-easylanguage-indicator-created-free.html

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
 
  #35 (permalink)
Trading Apprentice
New York
 
Futures Experience: Advanced
Platform: TradeStation
Favorite Futures: ES
 
Posts: 44 since May 2011
Thanks: 12 given, 28 received


chtangwin View Post
I converted the anaSuperTrendM1 indicator (also from futures.io (formerly BMT)) to Easy Language.

Please let me know if any issues.

Function: _anaMovingMedian

 
Code
Inputs:
    PriceValue( numericseries ), 
    Period(NumericSimple);
 
variables:
    medianIndex(0),
    priorIndex(0),
    even(false),
    sPeriod(0),
    idx(0),
    val(0),
    initialized(false);
 
array:
    mArray[](0);
 
{ OnStartUp }    
if initialized = false then begin
    initialized = true;
    array_setmaxindex(mArray, Period);
    fill_array(mArray, 0.0);
    if mod(Period, 2) = 0 then begin
        even = true;
        medianIndex = floor(Period/2);
        priorIndex = medianIndex - 1;
    end
    else begin
        even = false;
        medianIndex = floor((Period - 1)/2);
    end;
end;
 
{ OnUpdate }
if currentbar < Period then begin
    sPeriod = currentbar;
    for idx = 1 to sPeriod begin
        mArray[idx] = PriceValue[idx-1];
    end;
    array_sort(mArray, 1, sPeriod, true);
    if mod(sPeriod, 2) = 0 then begin
        idx = floor(sPeriod/2);
        val = 0.5 * (mArray[Period - idx] + mArray[Period - idx + 1]);
    end
    else begin
        idx = floor((1 + sPeriod)/2);
        val = mArray[Period - idx + 1];
    end;
end
else begin
    for idx = 1 to Period begin
        mArray[idx] = PriceValue[idx-1];
    end;
    array_sort(mArray, 1, Period, true);
    if even then
        val = 0.5 * (mArray[medianIndex] + mArray[priorIndex])
    else
        val = mArray[medianIndex];
end;
 
_anaMovingMedian = val;

hello, getting an error that fill_array is not defined in the function. Thanks

{ OnStartUp }
if initialized = false then begin
initialized = true;
array_setmaxindex(mArray, Period);
fill_array(mArray, 0.0);
if mod(Period, 2) = 0 then begin
even = true;

Reply With Quote
The following user says Thank You to cedar for this post:
 
  #36 (permalink)
Elite Member
Quebec
 
Futures Experience: Intermediate
Platform: Multicharts 64 +VolProfile
Broker/Data: AMP Trading / CQG
Favorite Futures: Ym, Es
 
Serger's Avatar
 
Posts: 72 since Oct 2010
Thanks: 64 given, 22 received

and Work fine ,,
Thank you so much !!

Reply With Quote
 
  #37 (permalink)
Elite Member
NJ
 
Futures Experience: Beginner
Platform: NinjaTrader
 
Posts: 7 since May 2010
Thanks: 2 given, 21 received

TS file attached. Some minor changes to MC code below.

 
Code
inputs:
	PriceValue(NumericSeries), 
	Period(NumericSimple);

variables:
	medianIndex(0),
	priorIndex(0),
	even(true),
	sPeriod(0),
	idx(0),
	val(0),
	initialized(false);
	
array:
	mArray[](0);

{ OnStartUp }	
if initialized = false then begin
	initialized = true;
	array_setmaxindex(mArray, Period);
	fill_array(mArray, 0.0);
	if mod(Period, 2) = 0 then begin
		even = true;
		medianIndex = floor(Period/2);
		priorIndex = medianIndex - 1;
	end
	else begin
		even = false;
		medianIndex = floor((Period - 1)/2);
	end;
end;

{ OnUpdate }
if currentbar <= Period then begin
	sPeriod = currentbar;
	for idx = 1 to sPeriod begin
		mArray[idx] = PriceValue[idx-1];
	end;
	array_sort(mArray, 1, sPeriod, true);
	if mod(sPeriod, 2) <> 0 then begin
		idx = floor(sPeriod/2);
		val = 0.5 * (mArray[Period - idx] + mArray[Period - idx + 1]);
	end
	else begin
		idx = sPeriod/2;
		val = mArray[Period - idx];
	end;
end
else begin
	for idx = 1 to Period begin
		mArray[idx] = PriceValue[idx-1];
	end;
	array_sort(mArray, 1, Period, true);
	if even then
		val = 0.5 * (mArray[medianIndex] + mArray[priorIndex])
	else
		val = mArray[medianIndex];
end;

_anaMovingMedian = val;

Attached Files
Register to download File Type: eld ANASUPERTREND.ELD (12.2 KB, 393 views)
Reply With Quote
The following 13 users say Thank You to chtangwin for this post:
 
  #38 (permalink)
Elite Member
Stockholm
 
Futures Experience: Intermediate
Platform: Nanotrader/ tradestaion
Broker/Data: WHS / TS
Favorite Futures: EC / SI / ES / BP
 
Posts: 19 since Mar 2011
Thanks: 8 given, 5 received

Thank you so much!!!!

Reply With Quote
 
  #39 (permalink)
Trading Apprentice
New York
 
Futures Experience: Advanced
Platform: TradeStation
Favorite Futures: ES
 
Posts: 44 since May 2011
Thanks: 12 given, 28 received


chtangwin View Post
TS file attached.

thank you chtangwin, I appreciate you taking the time to do this.

Reply With Quote
 
  #40 (permalink)
Trading Apprentice
New York
 
Futures Experience: Advanced
Platform: TradeStation
Favorite Futures: ES
 
Posts: 44 since May 2011
Thanks: 12 given, 28 received


While one will go broke taking every signal, I find the various forms of superTrend are great as a trend 'filter'. Can be easily used in strategies.

So once Trend is identified, take signals(some other method) in the direction of SuperTrend.

A slight modification to the anaSuperTrend code. The following will generate just one line and switch colors.

 
Code
 
{if currentUpTrend = true  then begin
 plot1(stopDot, "UpStopDot");
end;
if currentUpTrend = false then begin
 plot2(stopDot, "DnStopDot");
end;}
 
Plot1(stopDot);
 
If close > stopDot Then 
SetPlotColor(1,Green)else 
  SetPlotColor(1,magenta);

Attached Thumbnails
EasyLanguage SuperTrend indicator-nov-4.bmp  
Reply With Quote
The following 2 users say Thank You to cedar 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)

July Journal Challenge w/$1100 in prizes from TopstepTrader

July
 

An Afternoon with FIO member Softsoap

Elite only

Battlestations: Show us your trading desks and win $750 in prizes

August
 

Extended Ask Me Anything w/Brett Steenbarger

Elite only

Prototyping Python Strategies (part 3) w/Ran Aroussi

Elite only

Brannigan Barrett w/Axia Futures

Elite only

Introduction to Phillip Capital futures brokerage services

Aug TBD

How Monte Carlo Analysis Can Help Your Trading w/Kevin Davey

Elite only
     

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


All times are GMT -4. The time now is 10:59 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-07-23 in 0.11 seconds with 20 queries on phoenix via your IP 54.156.65.91