Hi all! I'm posting my own trade manager that have helped me a lot, maybe it will be helpfull for someone else. It helps with getting a trade to BE, and managing a trade in profit. The EA is done by me and for my own requirements, if you have requests och questions, post them here and I'll see what I can do.
To use the EA, the trade that you want to manage needs to have a comment and this comment is added like in the picture below, and remember that the comment needs to be added before you confirm the trade. This is so you can manage more than one trade at the same time by giving the trades different comments, and to do that you need to put the EA on each of the charts that you want to manage. If you want to manage 2 trades on the same pair, you open 2 charts and put the EA on each of the charts with different comments. If you only have one trade that you want to manage, then you don't need to put in any comment.
In the inputs for the EA, you need to put the same comment in the "commentOrder". Leave this blank if you haven't any comment in the trade.
If there's a trade that is running that has the same comment as the comment chosen in the EA, the EA will show among other things the lots that is going to be closed based on you choice of percentCloseAtBE.
-----------------------------------------------------------------
BreakEven managment
This is done so u can have a so called "free trade", described here.
BEorTP: must be "false"
BEpips: how many pips in profit when you wan to get BE.
percentCloseAtBE: percent of the lots you have now that you want to close
rewardRiskRatio: what the total RRR that you want from this trade
commentOrder: see description above
-----------------------------------------------------------------
Trade management
If you choose TPaboveBelow as true or false depends on what you are looking to do and whether the trade is a sell or buy.
Buy
If the trade is in profit, then you can choose to take of part of the trade at a certain price. If that price is above the current price choose "true", otherwise choose "false".
Sell
If the trade is in profit, then choose "false" if you want to take part of the trade at a price that is below current price, otherwise choose "true".
So basically, "true" for TP above current price, and "false" for TP below current price.
BEorTP: must be "true"
percentCloseAtBE: percent of the lots you have now that you want to close (100% means that you want to close the entire trade, but then you could just put a TP in the trade instead)
TPaboveBelow: true or false (read above)
priceTP: the price where the trade is managed by closing the percent according to your choise above
commentOrder: see description above
-----------------------------------------------------------------
This EA is for a broker who allows a minimum of minilots. If your broker allows microlots you need to change line 49 in the code:
lotsClose = MathCeil(OrderLots()*percentCloseAtBE/10)/10;
to this:
lotsClose = MathCeil(OrderLots()*percentCloseAtBE)/100;
To use the EA, the trade that you want to manage needs to have a comment and this comment is added like in the picture below, and remember that the comment needs to be added before you confirm the trade. This is so you can manage more than one trade at the same time by giving the trades different comments, and to do that you need to put the EA on each of the charts that you want to manage. If you want to manage 2 trades on the same pair, you open 2 charts and put the EA on each of the charts with different comments. If you only have one trade that you want to manage, then you don't need to put in any comment.
In the inputs for the EA, you need to put the same comment in the "commentOrder". Leave this blank if you haven't any comment in the trade.
If there's a trade that is running that has the same comment as the comment chosen in the EA, the EA will show among other things the lots that is going to be closed based on you choice of percentCloseAtBE.
-----------------------------------------------------------------
BreakEven managment
This is done so u can have a so called "free trade", described here.
BEorTP: must be "false"
BEpips: how many pips in profit when you wan to get BE.
percentCloseAtBE: percent of the lots you have now that you want to close
rewardRiskRatio: what the total RRR that you want from this trade
commentOrder: see description above
-----------------------------------------------------------------
Trade management
If you choose TPaboveBelow as true or false depends on what you are looking to do and whether the trade is a sell or buy.
Buy
If the trade is in profit, then you can choose to take of part of the trade at a certain price. If that price is above the current price choose "true", otherwise choose "false".
Sell
If the trade is in profit, then choose "false" if you want to take part of the trade at a price that is below current price, otherwise choose "true".
So basically, "true" for TP above current price, and "false" for TP below current price.
BEorTP: must be "true"
percentCloseAtBE: percent of the lots you have now that you want to close (100% means that you want to close the entire trade, but then you could just put a TP in the trade instead)
TPaboveBelow: true or false (read above)
priceTP: the price where the trade is managed by closing the percent according to your choise above
commentOrder: see description above
-----------------------------------------------------------------
This EA is for a broker who allows a minimum of minilots. If your broker allows microlots you need to change line 49 in the code:
lotsClose = MathCeil(OrderLots()*percentCloseAtBE/10)/10;
to this:
lotsClose = MathCeil(OrderLots()*percentCloseAtBE)/100;
Attached Image
Attached File(s)
My Trade Manager.mq4
9 KB
|
1,133 downloads