• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 4:08pm
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 4:08pm
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

ATR Trailing stop loss indicator 25 replies

Looking for Trailing Stop EA like default MT4 trailing stop 7 replies

ATR Trailing Stop Volatility Based 1 reply

ATR Trailing Stop (With Modifications) 3 replies

To Trailing Stop or Not To Trailing Stop.... 36 replies

  • Platform Tech
  • /
  • Reply to Thread
  • Subscribe
  • 4
Attachments: trailing stop ea using ATR
Exit Attachments

trailing stop ea using ATR

  • Last Post
  •  
  • Page 1 2
  • Page 1 2
  •  
  • Post #1
  • Quote
  • First Post: Nov 3, 2008 1:39am Nov 3, 2008 1:39am
  •  cupofjoe
  • | Joined Jul 2008 | Status: Member | 6 Posts
How easy would it be to adapt or create a trailing stop EA to set the trailing stop to the previous candle ATR value (based on ATRstops_v1.1). Ideally at the end of each candle, the ea would check and move the stop if necessary.

I would love to have this as an EA that I could set and forget after creating a trade.

Any advice would be appreciate and anyone willing to program it would have deity status in my house.

Cheers
  • Post #2
  • Quote
  • Nov 3, 2008 9:59am Nov 3, 2008 9:59am
  •  livingFX
  • | Joined Oct 2008 | Status: Member | 115 Posts
excuse me for my question but what's a trailing stop? is it one of function of MT4? can you explain me..
 
 
  • Post #3
  • Quote
  • Nov 3, 2008 10:28am Nov 3, 2008 10:28am
  •  cupofjoe
  • | Joined Jul 2008 | Status: Member | 6 Posts
A trailing stop is a stop loss that follows your market order by a preset distance (ie 20 pips). When the price reverses and retraces back by 20+ pips, your trailing stop will be triggered and your order will be closed. It allows you to secure your profits as the trade goes further in a positive direction.

Cheers
 
 
  • Post #4
  • Quote
  • Nov 3, 2008 3:29pm Nov 3, 2008 3:29pm
  •  the Guru
  • | Additional Username | Joined Nov 2008 | 35 Posts
Quoting cupofjoe
Disliked
How easy would it be to adapt or create a trailing stop EA to set the trailing stop to the previous candle ATR value (based on ATRstops_v1.1). Ideally at the end of each candle, the ea would check and move the stop if necessary.

I would love to have this as an EA that I could set and forget after creating a trade.

Any advice would be appreciate and anyone willing to program it would have deity status in my house.

Cheers
Ignored
Piece of cake. The issue would be what trades would it work on and what trades would it not.

If you want it to work on ALL trades then it is very simple, otherwise I could code the EA to require an order number (but that would then mean needing multiple charts if you have multiple trades)

Let me know which is preferred and I will code something up for you
 
 
  • Post #5
  • Quote
  • Nov 3, 2008 4:31pm Nov 3, 2008 4:31pm
  •  cupofjoe
  • | Joined Jul 2008 | Status: Member | 6 Posts
Thanks for your reply Mr Guru,

If you could set it up by order number that would be perfect. Also if you could code in an option so that the parameters for the ATR stop could be change that would be sweet. The parameters (inputs) are Length, ATR period and KV.

Thanks so much!!

Cheers
 
 
  • Post #6
  • Quote
  • Nov 3, 2008 4:41pm Nov 3, 2008 4:41pm
  •  the Guru
  • | Additional Username | Joined Nov 2008 | 35 Posts
No probs. I'll get on to this now.
 
 
  • Post #7
  • Quote
  • Nov 3, 2008 4:47pm Nov 3, 2008 4:47pm
  •  the Guru
  • | Additional Username | Joined Nov 2008 | 35 Posts
Quoting cupofjoe
Disliked
The parameters (inputs) are Length, ATR period and KV.
Ignored
Quick question. I am looking at the ATR function and there is only the one parameter - period.

Can you please tell me what the other ones are for and how they affect the ATR? Thanks
 
 
  • Post #8
  • Quote
  • Nov 3, 2008 4:59pm Nov 3, 2008 4:59pm
  •  cupofjoe
  • | Joined Jul 2008 | Status: Member | 6 Posts
I am not an expert on indicators, so I don't know how they affect the atr value. However, I use the attached ATR indicator (ARTstops_v1.1) and it has those parameters built in. So if you could use that indicator as the basis for the value of the stop that would be awesome.

Cheers
Attached File
File Type: mq4 ATRStops_v1.1.mq4   3 KB | 3,247 downloads
 
 
  • Post #9
  • Quote
  • Nov 3, 2008 9:46pm Nov 3, 2008 9:46pm
  •  the Guru
  • | Additional Username | Joined Nov 2008 | 35 Posts
Try this ... but please remember to test it on a demo account first to ensure you are happy with how it works.

I have shown the SL price as a comment so you could compare the price calculated by the EA to the level shown with the indicator.
Attached File
File Type: ex4 FXGuru_ATR Trailing Stop Management.ex4   6 KB | 4,279 downloads
 
 
  • Post #10
  • Quote
  • Nov 3, 2008 10:00pm Nov 3, 2008 10:00pm
  •  cupofjoe
  • | Joined Jul 2008 | Status: Member | 6 Posts
Mr Guru,

I will give it a go, and let u know the results.

Very much appreciated.

Cheers
 
 
  • Post #11
  • Quote
  • Apr 16, 2009 12:21pm Apr 16, 2009 12:21pm
  •  josh1856
  • | Joined Apr 2009 | Status: Member | 11 Posts
Quoting the Guru
Disliked
Try this ... but please remember to test it on a demo account first to ensure you are happy with how it works.

I have shown the SL price as a comment so you could compare the price calculated by the EA to the level shown with the indicator.
Ignored

would you be willing to share the source for this file? or make some adjustments?

jp
 
 
  • Post #12
  • Quote
  • Aug 8, 2010 8:36am Aug 8, 2010 8:36am
  •  campco
  • | Joined Jul 2009 | Status: Member | 140 Posts
Quoting cupofjoe
Disliked
Mr Guru,

I will give it a go, and let u know the results.

Very much appreciated.

Cheers
Ignored

Hi cupofjoe,

How were your results after testing? Please share it with us!

Regards,

Ben
 
 
  • Post #13
  • Quote
  • Jan 12, 2011 7:40pm Jan 12, 2011 7:40pm
  •  Emiddio
  • | Joined Jan 2011 | Status: Junior Member | 1 Post
Quoting the Guru
Disliked
Try this ... but please remember to test it on a demo account first to ensure you are happy with how it works.

I have shown the SL price as a comment so you could compare the price calculated by the EA to the level shown with the indicator.
Ignored
I have loaded the EA but there is a message at the top left of the MT4 screen The message is: invalid order ticket; can you please let me know how to solve this?.

Sincerely,
Emiddio
 
 
  • Post #14
  • Quote
  • Edited at 10:03am Jan 17, 2011 9:34am | Edited at 10:03am
  •  Pooler
  • | Joined Jan 2011 | Status: Member | 37 Posts
Thanks for this. I'm a newbie--can you give me short instruction on how to load this on my MT4 platform. I've loaded it under Indicators so it shows under Expert Advisers. I've copied it onto the chart--question is what now? What will it do? At what level will it set the trailing stop and how is that determined (and where will I see that?)

Thanks

PS I've got the same problem as Emiddio. There is a message at the top left of the MT4 screen " invalid order ticket". Does this mean its not operating?
 
 
  • Post #15
  • Quote
  • Edited at 2:54pm Oct 13, 2011 2:43pm | Edited at 2:54pm
  •  Diesel 10
  • | Joined Dec 2010 | Status: Member | 11 Posts
Quoting the Guru
Disliked
Try this ... but please remember to test it on a demo account first to ensure you are happy with how it works.

I have shown the SL price as a comment so you could compare the price calculated by the EA to the level shown with the indicator.
Ignored
Can you please make this so the order number is optional? I want to apply it to a chart and have it automatically manage any open orders in that currency.
Thanks.

Diesel10
 
 
  • Post #16
  • Quote
  • Nov 25, 2013 9:47pm Nov 25, 2013 9:47pm
  •  fxdaytrader_
  • Joined Jan 2011 | Status: UberTroll | 1,847 Posts
maybe you'd like to try that one (if you cannot find another) -> http://www.forexfactory.com/showthre...47#post7113747
PM me with coding requests and I'll probably put you on my ignore list
 
 
  • Post #17
  • Quote
  • May 26, 2016 7:28am May 26, 2016 7:28am
  •  willthare
  • | Joined Jan 2015 | Status: Member | 13 Posts
http://www.forexfactory.com/showthread.php?t=318772
 
 
  • Post #18
  • Quote
  • Jan 11, 2017 5:00pm Jan 11, 2017 5:00pm
  •  Bigpipin13
  • | Joined Aug 2016 | Status: Member | 85 Posts
Quoting the Guru
Disliked
Try this ... but please remember to test it on a demo account first to ensure you are happy with how it works. I have shown the SL price as a comment so you could compare the price calculated by the EA to the level shown with the indicator. {file}
Ignored
Hey GURU,
ARe you still around?
Cause I had an idea which could optimize that ATR EA you worked on years ago. lol
Thanks!
 
 
  • Post #19
  • Quote
  • Jan 11, 2017 6:03pm Jan 11, 2017 6:03pm
  •  MathTrader7
  • Joined Aug 2014 | Status: Trading | 2,145 Posts
Here is a Trailing Stop EA based on ATR indicator...
Attached File
File Type: ex4 MT7_ATRTrailingStopEA.ex4   45 KB | 2,062 downloads
Trading is the hardest way to make easy money...
 
 
  • Post #20
  • Quote
  • Jan 11, 2017 6:06pm Jan 11, 2017 6:06pm
  •  Bigpipin13
  • | Joined Aug 2016 | Status: Member | 85 Posts
Quoting MathTrader7
Disliked
Here is a Trailing Stop EA based on ATR indicator... {file}
Ignored
Thanks Mathtrader,
Do you code?
I had a few ideas on how to make an ATR EA based on the opening time of
markets.
 
 
  • Platform Tech
  • /
  • trailing stop ea using ATR
  • Reply to Thread
    • Page 1 2
    • Page 1 2
0 traders viewing now
  • More
Top of Page
  • Facebook
  • Twitter
About FF
  • Mission
  • Products
  • User Guide
  • Media Kit
  • Blog
  • Contact
FF Products
  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer
FF Website
  • Homepage
  • Search
  • Members
  • Report a Bug
Follow FF
  • Facebook
  • Twitter

FF Sister Sites:

  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Forex Factory® is a brand of Fair Economy, Inc.

Terms of Service / ©2022