Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

  • Welcome Guests

    Welcome. You are currently viewing the forum as a guest which does not give you access to all the great features at Traders Laboratory such as interacting with members, access to all forums, downloading attachments, and eligibility to win free giveaways. Registration is fast, simple and absolutely free. Create a FREE Traders Laboratory account here.

Recommended Posts

Easylanguage code for ATR Marker

 

This indicator prints the ATR range on the chart.

High ATR = previous bar Close + previous bar ATR value

Low ATR = previous bar Close - previous bar ATR value

 

there is an option to plot historical ATR lines.

 

 

attachment.php?attachmentid=9933&stc=1&d=1238068600

ATR_Marker.gif.195fd94a306fe7d897a81c8438363bd5.gif

ATR_Marker_w_Lines.txt

Edited by Tams

Share this post


Link to post
Share on other sites

Hi Tams,

 

Could you help me a little bit by modifying your indicator into a so called "Chandeliers Exit"?

 

For example by plotting lines representing:

 

 

Line 1: todays high minus 3 * a ten days exponential moving average ATR, and

Line 2: todays low plus 3 * a ten days exponential moving average ATR.

 

It would be useful if the factor 3 is a variable as well as the 10 day period.

 

I read about this exit in the book of Dr. K. Van Tharp - Trade Your Way to Financial Freedom, and it looks like a good exit methodology to me.

 

Thanks for your help in advance.

 

Fredd

Share this post


Link to post
Share on other sites

Note that a price will never reach an ATR target because they are linked

 

Better to leave a yesterday target like in the code of TAMS

 

 

// ATR Marker with the option to plot the historical ATR lines

// version: 1.1

// author: TAMS

// date: 20090325

// license: public use

// description: this indicator prints the ATR value on the chart

// High ATR = C[1] + ATR[1]

// Low ATR = C[1] - ATR[1]

//

//

 

input:

Show.lines(true),

x.ATR(3),

ATR.Period(10),

text.color(black),

decimal(2);

 

vars:

id.txt.HighAtr(-1),

id.txt.LowAtr(-1),

Atr(0),

HighATR(0),

LowATR(0);

 

Atr = AvgTrueRange(ATR.Period);

 

HighATR = h[1] + x.ATR * ATR[1];

LowATR = l[1] - x.ATR * ATR[1];

 

if currentbar = 1 then

begin

id.txt.HighAtr = Text_New(Date, Time, HighATR, "High ATR");

id.txt.LowAtr = Text_New(Date, Time, LowATR, "Low ATR");

text_Setcolor(id.txt.HighAtr, text.color);

text_Setcolor(id.txt.LowAtr, text.color);

text_Setstyle(id.txt.HighAtr, 0, 2);

text_Setstyle(id.txt.LowAtr, 0, 2);

end;

 

text_SetLocation(id.txt.HighAtr,date, time, HighATR);

text_SetLocation(id.txt.LowAtr,date, time, LowATR);

 

text_SetString(id.txt.HighAtr ," < "+NumToStr(HighATR,decimal)+" High ATR");

text_SetString(id.txt.LowAtr, " < "+NumToStr(LowATR,decimal)+" Low ATR");

 

if Show.lines then

begin

plot1[1](HighATR, "HighATR");

plot2[1](LowATR, "LowATR");

end;

Share this post


Link to post
Share on other sites

rather than have the decimals manual i changed it to

 

input:

Decimal( Log(PriceScale) / Log(10) ),

 

which has now set the number of decimals according to the price!!

 

This is good if you trade a bit of everyting and are lazy :)

 

Thanks for the code!

Share this post


Link to post
Share on other sites
looking for ATR in minutes. Website suggestions anyone?

 

 

this is the third time you are asking...

have you done any leg work ?

 

what kind of site you are looking for?

paid? freebie?

 

what instrument you are looking for?

Forex?

stocks?

futures ????

 

have you tried G-O-O-G-L-E ???

what did you learn? care to share your finding ?

Edited by Tams

Share this post


Link to post
Share on other sites
this is the third time you are asking...

have you done any leg work ?

 

what kind of site you are looking for?

paid? freebie?

 

what instrument you are looking for?

Forex?

stocks?

futures ????

 

have you tried G-O-O-G-L-E ???

what did you learn? care to share your finding ?

 

 

I was looking for a free website for stocks. Stockcharts.com has it for daily and weekly for free, my guess is if yousubscribe you can get it for 1,2,5 minutes...

 

I just started using QuoteTracker and they have it. :)

 

Take care,

 

label

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.