Forex
Google
New signals service!

Go Back   Forex Trading > Downloads > Expert Advisors - Metatrader 4


Register in Forex TSD!
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time).
Click here to register and get more information

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-05-2007, 10:35 AM
Junior Member
 
Join Date: Nov 2006
Location: Australia
Posts: 10
kaaskop is on a distinguished road
Need SL & TP added to EA

I have been playing around with the attached Moving Average EA with interesting results but would like to limit the losses. I wonder if one of the expert programmers would be so kind and add variable SL and while they are at it also variable TP?

Thanks in advance
Attached Files
File Type: mq4 Moving Average.mq4 (4.6 KB, 23 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-05-2007, 02:35 PM
Member
 
Join Date: Sep 2006
Posts: 68
ra300z is on a distinguished road
Your check for Volume[0]>1 will not work because of the way tick data is processed.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-05-2007, 08:26 PM
Junior Member
 
Join Date: Nov 2006
Location: Australia
Posts: 10
kaaskop is on a distinguished road
Thanks ra300z for having a look at the EA, but because I don't know the lingo your comment does not mean anything to me. Could you expand a bit?

Regards
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-05-2007, 08:37 PM
Member
 
Join Date: Sep 2006
Posts: 68
ra300z is on a distinguished road
Quote:
Originally Posted by kaaskop
Thanks ra300z for having a look at the EA, but because I don't know the lingo your comment does not mean anything to me. Could you expand a bit?

Regards

Off the top of my head, I can't recall what the issue was. But this code is usually when someone wants to trade on a new open bar. If I recall, the code prevents execution all the time. But I don't remember why. It's better to use the time (hour) and compare to the hour of the previous bar (presuimg H1, H4)

PS any moving average EA won't work by itself. If you go with the moving average, you'll end up getting whipsawed. If you go against the moving average, you'll get squeezed.

Last edited by ra300z; 01-05-2007 at 08:39 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-10-2007, 03:34 AM
Junior Member
 
Join Date: Nov 2006
Location: Australia
Posts: 10
kaaskop is on a distinguished road
The basic question about adding SL and TP to this EA has not been touched yet. So I repeat my request to our experts to see if one of you is able to add those things. Would have thought that it is fairly simple to do but that opinion is not based on any knowledge.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-10-2007, 03:50 AM
davidke20's Avatar
Senior Member
 
Join Date: Sep 2006
Location: 38° 53′ 51.61″ N, 77° 2′ 11.58″ W
Posts: 1,398
davidke20 is on a distinguished road
Have not done any test yet, jut hop in and do some modification. Hope this help and wish you like it! Good trading

Regards,

David
Attached Files
File Type: mq4 Moving_Average_V1.0.mq4 (5.0 KB, 24 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 01-11-2007, 09:45 AM
Junior Member
 
Join Date: Nov 2006
Location: Australia
Posts: 10
kaaskop is on a distinguished road
Thnaks David,

I am trying it out.

Regards

kaaskop
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 01-13-2007, 10:08 AM
Junior Member
 
Join Date: Nov 2006
Location: Australia
Posts: 10
kaaskop is on a distinguished road
Back again,

Tried David's version but it does not trade life or in the strategy tester. Any modifications are welcome and will be tested by me.

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 01-13-2007, 11:08 AM
davidke20's Avatar
Senior Member
 
Join Date: Sep 2006
Location: 38° 53′ 51.61″ N, 77° 2′ 11.58″ W
Posts: 1,398
davidke20 is on a distinguished road
Quote:
Originally Posted by kaaskop
Back again,

Tried David's version but it does not trade life or in the strategy tester. Any modifications are welcome and will be tested by me.

Thanks
What is the error messege on the Journal tab or the Expert tab, let me know so I dont need to waste time on troubleshoot. Good trading

Regards,

David
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 01-14-2007, 10:27 AM
Junior Member
 
Join Date: Nov 2006
Location: Australia
Posts: 10
kaaskop is on a distinguished road
Hi David,

No error messages at all, just messages about being loaded ok and about the inputs.

Thank you for your interest.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump


All times are GMT. The time now is 01:34 AM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.