Forex



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
 
Thread Tools Display Modes
  #11 (permalink)  
Old 05-11-2007, 11:25 PM
matrixebiz's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 1,215
matrixebiz is on a distinguished road
Quote:
Originally Posted by ryanklefas
Set "ManageBy_Symbol" to true and apply it to the symbol you want it to manage, and I think it'll do what you're looking for. Also, could you post these other EAs you're talking about. I'm curious to know what they are like.
There are some here: http://www.forex-tsd.com/99084-post3.html but they don't look at individual trades and handle then independently.
I use the I attached and need to attach to different charts and setup different Magic numbers in it according to what I set magic numbers too in the Trade EA. not really what I wanted either but can manage with it by setting different Magic numbers and set the Trade EA to only make one trade at a time per currency. I was looking for an EA that I can attach to a chart and it will look at each trade, no matter what currency and treat it as an individual and monitor it with a TS, SL and TP. I'll have to read your attached pdf and try and understand if yours will do what I want.
EG: Trade EA opens trades, 2X Aud$, 3X Eur$ 5X $cad throughout the day. Now if I don't trust the trade EA to close each order at my specific SL or TP which I've had happen, I want to attach a backup EA to monitor the open trades also, so if one 1X Eur$ trade gets to the set SL or TP it will close it for me instead of waiting for the Trade EA to close it. Maybe I'm just confusing you Don't mean to.
Attached Files
File Type: mq4 MultiPositionExpert_v2.mq4 (6.0 KB, 1041 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #12 (permalink)  
Old 05-11-2007, 11:42 PM
ryanklefas's Avatar
Senior Member
 
Join Date: Apr 2006
Location: USA
Posts: 438
ryanklefas is on a distinguished road
Quote:
Originally Posted by matrixebiz
There are some here: http://www.forex-tsd.com/99084-post3.html but they don't look at individual trades and handle then independently.
I use the I attached and need to attach to different charts and setup different Magic numbers in it according to what I set magic numbers too in the Trade EA. not really what I wanted either but can manage with it by setting different Magic numbers and set the Trade EA to only make one trade at a time per currency. I was looking for an EA that I can attach to a chart and it will look at each trade, no matter what currency and treat it as an individual and monitor it with a TS, SL and TP. I'll have to read your attached pdf and try and understand if yours will do what I want.
EG: Trade EA opens trades, 2X Aud$, 3X Eur$ 5X $cad throughout the day. Now if I don't trust the trade EA to close each order at my specific SL or TP which I've had happen, I want to attach a backup EA to monitor the open trades also, so if one 1X Eur$ trade gets to the set SL or TP it will close it for me instead of waiting for the Trade EA to close it. Maybe I'm just confusing you Don't mean to.
Yeah, you did confuse me, but thanks for the EA. I will look at it.
__________________
"Don't work harder, work smarter." -- my Java professor

Advertise on The All New FireCell Network
"Where online investing makes sense"

Coder for Hire:
http://firecell.info
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #13 (permalink)  
Old 05-12-2007, 02:27 AM
ryanklefas's Avatar
Senior Member
 
Join Date: Apr 2006
Location: USA
Posts: 438
ryanklefas is on a distinguished road
New version available. Added lots of nice close out options.
__________________
"Don't work harder, work smarter." -- my Java professor

Advertise on The All New FireCell Network
"Where online investing makes sense"

Coder for Hire:
http://firecell.info
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #14 (permalink)  
Old 05-12-2007, 10:23 PM
Mr.Marketz's Avatar
Senior Member
 
Join Date: Feb 2006
Posts: 350
Mr.Marketz is on a distinguished road
Thanks

Ryan,

Some really great work here. Nice job.

P.S.

What do you think about having an option to 'hedge'. In other words, if 'hedge' is set to true, the EA will place a trade to hedge the open positions instead of closing them.

EX:

Separate open SELL orders: 1 GBP/USD mini, 2 GBP/USD minis, .5 GBP/USD minis.

'Hedge' is set to TRUE, and AMOUNT is set to $300 (or could be based on equity loss percentage).

When the account equity falls to the specified AMOUNT value, the EA places a BUY order of 3.5 mini lots to hedge the cumulative opened SELL orders mentioned above. So to add to the following features: CloseByTime; CloseByTotalProfit; CloseByTotalLoss; CloseByDrawdown; - HedgeByDrawdown


Just a thought, I figured it would help this already great EA become more encompassing... like the Swiss Army knife. (Nice name by the way... very fitting).

All the best,
MM
__________________
F*CK your market analysis.

Last edited by Mr.Marketz; 05-13-2007 at 12:37 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #15 (permalink)  
Old 05-13-2007, 12:26 AM
fxgrm's Avatar
Senior Member
 
Join Date: Mar 2007
Posts: 114
fxgrm is on a distinguished road
Hi Ryan:

Do I attach this EA to a duplicate chart of the pairs I am trading or attach it to the working chart I am running with the other EA? (no conflict?)

The other EA is the Bless FifthElement EA

Also, after it closes the trades, will it stop trading until I reset it? (This is what I want)

Will it do this?

Thanx ryan
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #16 (permalink)  
Old 05-13-2007, 02:45 AM
Member
 
Join Date: Apr 2006
Posts: 62
COTtrader is on a distinguished road
Here is one suggested my ND that is niffty!!!

The following was written by Stockwet ---


Manage Take Profit

The expert works by taking profit out of a trade at various take profit levels. You have the ability to customize the following parameters:

First_Target: This is the first take profit target, in pips, that you specify.

Target_Increment: Once the first profit target is reached, the next target will increment by the amount specified by the target increment variable.

Close_Lots: This is how many lots you want to take out at each target. For example, if you have 10 lots, you can take 1 lot out at each of 10 profit targets, or 5 lots out at each of two targets. It's up to you.

Move_Stops: Set to true if you want the expert to move stops based on the First_Stop and Stop_Differential parameters. Otherwise, set to false if you don't want stops moved automatically.

First_Stop: This will move your stoploss when a target, in pips, is reached.

Stop_Differential: This is the number of pips away from the original order entry price to set the new stop. By default, it's set to 0 but can be positive or negative.

Use_Max_Loss: Set to true if you want to input your own stoploss and hide your stop value from your broker. This is the maximum loss you'll risk on the trade. It's irrelevant if Move_Stops is set to true AND Move_Stops was triggered.

Max_Loss: example parameters that can be set for the expert. I'll explain each one with a scenario. Assume you place a 1 lot sell order for EURUSD at 1.2100 (1.2103/1.2100 - ask/bid). (Assume a 3 pip spread.)
The expert will take .1 lots ("Close_Lots"), or 1/10th of this scenario's order, out at +10 pips ("First_Target"), or 1.2090/1.2087.
After that, the next profit target will increment 8 pips ("Target_Increment") to 1.2082/1.2079. and another .1 lots will be taken out at that level. The expert continues to increment the preceding profit target by 8 pips until the original order is closed. In this example, the maximum pips gained would be 10 + (8*9), or 82 pips. (First target pips + increment pips * number of times to increment, which would vary depending on the original order size and the "Close_Lots" parameter.)
When the trade reaches +15 pips ("First_Stop"), the original stop loss will be moved to -5 pips ("Stop_Differential") from the order entry price. In this case, the order entry price was 1.2100, so the new price would be 1.2105. This means that you would lose 5 pips if the trade turned. Set the "Stop_Differential" parameter to "0" in order to move stops to breakeven (1.2100). If this parameter were, for example, set to 5, then the stop loss would be moved to 1.2095, and you would have a 5 pip increase if the move turned against you and stopped you out.

If you don't want the expert to move the order's stop loss, then set the "Move_Stops" parameter to "false". I think this works, but haven't fully tested it.
I must warn everyone that I am not a sophisticated MQ4 programmer. Use this at your own risk. If one of you crack programmers can improve it, please feel free to do so.

Also, in case you're wondering, the reason I wrote this is so that I didn't have to place 5 different stop loss orders in order to manage different take profit levels. Since I don't want to sit in front of the computer all the time, waiting for these levels to hit and I take out a portion of the order, I figured an expert would do just the thing.

Regards,

stockwet

(COTtrader)
Attached Files
File Type: mq4 ManageTPv2-1.mq4 (5.3 KB, 1019 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #17 (permalink)  
Old 05-13-2007, 04:43 PM
ryanklefas's Avatar
Senior Member
 
Join Date: Apr 2006
Location: USA
Posts: 438
ryanklefas is on a distinguished road
Quote:
Originally Posted by Mr.Marketz
Ryan,

Some really great work here. Nice job.

P.S.

What do you think about having an option to 'hedge'. In other words, if 'hedge' is set to true, the EA will place a trade to hedge the open positions instead of closing them.

EX:

Separate open SELL orders: 1 GBP/USD mini, 2 GBP/USD minis, .5 GBP/USD minis.

'Hedge' is set to TRUE, and AMOUNT is set to $300 (or could be based on equity loss percentage).

When the account equity falls to the specified AMOUNT value, the EA places a BUY order of 3.5 mini lots to hedge the cumulative opened SELL orders mentioned above. So to add to the following features: CloseByTime; CloseByTotalProfit; CloseByTotalLoss; CloseByDrawdown; - HedgeByDrawdown


Just a thought, I figured it would help this already great EA become more encompassing... like the Swiss Army knife. (Nice name by the way... very fitting).

All the best,
MM
Thanks, Mr. Marketz. I'm really glad that you like it. And I like the hedging idea you have; I'll try to get it into the next version.
__________________
"Don't work harder, work smarter." -- my Java professor

Advertise on The All New FireCell Network
"Where online investing makes sense"

Coder for Hire:
http://firecell.info
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #18 (permalink)  
Old 05-14-2007, 01:14 AM
fxgrm's Avatar
Senior Member
 
Join Date: Mar 2007
Posts: 114
fxgrm is on a distinguished road
Thumbs up Awesome!

Ryan:

One more question:

Can your EA monitor just my floating profit/loss and start a trailing stop once it reaches a specified profit target?

Thanx

Last edited by fxgrm; 05-14-2007 at 03:46 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #19 (permalink)  
Old 05-14-2007, 04:00 PM
ryanklefas's Avatar
Senior Member
 
Join Date: Apr 2006
Location: USA
Posts: 438
ryanklefas is on a distinguished road
Quote:
Originally Posted by fxgrm
Ryan:

One more question:

Can your EA monitor just my floating profit/loss and start a trailing stop once it reaches a specified profit target?

Thanx
No, it currently applies trailing stops at whenever it is enabled. You can however make it only begin trailing when an order is profitable by setting "OnlyTrailAfterProfit" to true and selecting the amount you want it to trail.
__________________
"Don't work harder, work smarter." -- my Java professor

Advertise on The All New FireCell Network
"Where online investing makes sense"

Coder for Hire:
http://firecell.info
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #20 (permalink)  
Old 05-14-2007, 04:08 PM
fxgrm's Avatar
Senior Member
 
Join Date: Mar 2007
Posts: 114
fxgrm is on a distinguished road
Thanks Ryan

I actually need an EA that can trail the profit in my floating P/L because I have several orders open at once. This way when they are collectively in profit it will close all trades even if there are a few negative trades open still and not one at a time.

Does this make sense?

Quote:
Originally Posted by ryanklefas
No, it currently applies trailing stops at whenever it is enabled. You can however make it only begin trailing when an order is profitable by setting "OnlyTrailAfterProfit" to true and selecting the amount you want it to trail.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks

Tags
"swiss army ea", ea swiss army, forex, forex swiss army, manage take profit, metatrader order management, swiss, swiss army, swiss army ea, swiss army ea forex, swiss army ea mq4, Swiss Army EA v1.51, swiss army expert, swiss army expert advisor, swiss army forex, swiss army knife, swiss army knife ea, swiss army knife forex, swiss army knife mq4, swiss army mq4, swiss army mt4, swiss EA, swissarmy, swissarmy ea, take profit ea, trade management, trade management ea

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatic Order exec fotovat Metatrader 4 9 05-16-2009 03:15 AM
Forex-Swiss Boker hellkas Metatrader brokers 10 03-12-2009 04:48 PM
Problem with my EA Strategic Swiss Alex.Piech.FinGeR Suggestions for Trading Systems 12 09-05-2008 03:49 AM
Order Management Kurka Fund Expert Advisors - Metatrader 4 10 12-06-2006 04:28 AM
Swiss Ephemeris .dll Akuma99 Indicators - Metatrader 4 1 08-31-2006 07:36 AM


All times are GMT. The time now is 02:32 AM.



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