|
|
 |
10-12-2008, 09:38 AM
|
#1 (permalink)
|
|
Guest
|
[MT_E and I] Three Level TP - EA
I have tried to create this EA. The objective is to take specified profits at three different specified levels.
An another EA with magic# places a trade, we use that same magic#.
We key in the lot size of the initial trade.
We key in the lots and the TP that we want for each step. The total lots for the three steps must be equal to initial trade size.
The EA is then supposed to release the relevant lots at the given TP.
I have cut and pasted the logic from other EAs with some of my own thought process.
Appreciate if someone could look into the codes and see whether the EA is workable. Also if a better and more efficient coding can be introduced to achieve the given objective.
For now, I am looking to achieve the stated objective and nothing more.
I have looked into other trade managing EAs but they donot have the desired three step TPs,
Thanks
TF
|
|
|
|
10-12-2008, 09:38 AM
|
#2 (permalink)
|
|
Guest
|
Re: [MT_E and I] Three Level TP - EA
TF,
Try this one. I moved the logic to a function to make it easier to use in EAs.
*I also added code to check for 5 digit pricing and modified to close sell trades at ask price.
Robert
--- On Tue, 9/23/08, tradeforexfx (AT) gmail (DOT) com <tradeforexfx (AT) gmail (DOT) com> wrote:
From: tradeforexfx (AT) gmail (DOT) com <tradeforexfx (AT) gmail (DOT) com>
Subject: [MT_E and I] Three Level TP - EA
To: MetaTrader_Experts_and_Indicators (A...oups (DOT) com
Date: Tuesday, September 23, 2008, 10:47 AM
I have tried to create this EA. The objective is to take specified profits at three different specified levels.
*
An another EA with magic# places a trade,* we use that*same magic#.
We key in the lot size of the initial trade.
We key in the lots and the TP that we want for each step. The total lots for the three steps must be equal to initial trade size.
The EA is then supposed to release the relevant lots at the given TP.
*
*
I have cut and pasted the logic from other EAs with some of my own thought process.
*
Appreciate if someone could look into the codes and see whether the EA is workable. Also if a better and more efficient coding can be introduced to achieve the given objective.
*
For now, I am looking to achieve the stated objective and nothing more.
*
I have looked into other trade managing EAs but they donot have the desired three step TPs,
*
*
Thanks
*
TF
*
|
|
|
|
10-12-2008, 09:38 AM
|
#3 (permalink)
|
|
Guest
|
Re: [MT_E and I] Three Level TP - EA
Thanks Robert, will try it out.
TF
----- Original Message -----
From: Robert Hill
To: MetaTrader_Experts_and_Indicators (A...oups (DOT) com
Sent: Tuesday, September 23, 2008 2:51 PM
Subject: Re: [MT_E and I] Three Level TP - EA
TF,
Try this one. I moved the logic to a function to make it easier to use in EAs.
I also added code to check for 5 digit pricing and modified to close sell trades at ask price.
Robert
--- On Tue, 9/23/08, tradeforexfx (AT) gmail (DOT) com <tradeforexfx (AT) gmail (DOT) com> wrote:
From: tradeforexfx (AT) gmail (DOT) com <tradeforexfx (AT) gmail (DOT) com>
Subject: [MT_E and I] Three Level TP - EA
To: MetaTrader_Experts_and_Indicators (A...oups (DOT) com
Date: Tuesday, September 23, 2008, 10:47 AM
I have tried to create this EA. The objective is to take specified profits at three different specified levels.
An another EA with magic# places a trade, we use that same magic#.
We key in the lot size of the initial trade.
We key in the lots and the TP that we want for each step. The total lots for the three steps must be equal to initial trade size.
The EA is then supposed to release the relevant lots at the given TP.
I have cut and pasted the logic from other EAs with some of my own thought process.
Appreciate if someone could look into the codes and see whether the EA is workable. Also if a better and more efficient coding can be introduced to achieve the given objective.
For now, I am looking to achieve the stated objective and nothing more.
I have looked into other trade managing EAs but they donot have the desired three step TPs,
Thanks
TF
|
|
|
|
10-12-2008, 09:38 AM
|
#4 (permalink)
|
|
Guest
|
Re: [MT_E and I] Three Level TP - EA
I tried it out and it didn't seem to work for me.* I attached it as an expert and had a smiley face, but it did not close out any TPs for the trade I opened.* There is no way to designate in the EA whether it is a buy or sell order, so I assume you have to place a seperate order and then attach the EA to have it close it out?
--- On Tue, 9/23/08, tradeforexfx (AT) gmail (DOT) com <tradeforexfx (AT) gmail (DOT) com> wrote:
From: tradeforexfx (AT) gmail (DOT) com <tradeforexfx (AT) gmail (DOT) com>
Subject: Re: [MT_E and I] Three Level TP - EA
To: MetaTrader_Experts_and_Indicators (A...oups (DOT) com
Date: Tuesday, September 23, 2008, 3:34 PM
*
*
Thanks Robert, will try it out.
*
*
TF
*
*
*
*
----- Original Message -----
From: Robert Hill
To: MetaTrader_Experts_ and_Indicators@ yahoogroups. com
Sent: Tuesday, September 23, 2008 2:51 PM
Subject: Re: [MT_E and I] Three Level TP - EA
TF,
Try this one. I moved the logic to a function to make it easier to use in EAs.
*I also added code to check for 5 digit pricing and modified to close sell trades at ask price.
Robert
--- On Tue, 9/23/08, tradeforexfx@ gmail.com <tradeforexfx@ gmail.com> wrote:
From: tradeforexfx@ gmail.com <tradeforexfx@ gmail.com>
Subject: [MT_E and I] Three Level TP - EA
To: MetaTrader_Experts_ and_Indicators@ yahoogroups. com
Date: Tuesday, September 23, 2008, 10:47 AM
I have tried to create this EA. The objective is to take specified profits at three different specified levels.
*
An another EA with magic# places a trade,* we use that*same magic#.
We key in the lot size of the initial trade.
We key in the lots and the TP that we want for each step. The total lots for the three steps must be equal to initial trade size.
The EA is then supposed to release the relevant lots at the given TP.
*
*
I have cut and pasted the logic from other EAs with some of my own thought process.
*
Appreciate if someone could look into the codes and see whether the EA is workable. Also if a better and more efficient coding can be introduced to achieve the given objective.
*
For now, I am looking to achieve the stated objective and nothing more.
*
I have looked into other trade managing EAs but they donot have the desired three step TPs,
*
*
Thanks
*
TF
*
|
|
|
|
10-12-2008, 09:39 AM
|
#5 (permalink)
|
|
Guest
|
Re: [MT_E and I] Three Level TP - EA
Tad,
If you open a manual order the input to the three level ea has to have magic number set to 0 to match the trade.
Robert
--- On Tue, 9/23/08, tad smith <dontforgetthisemail2003 (AT) yahoo (DOT) com> wrote:
From: tad smith <dontforgetthisemail2003 (AT) yahoo (DOT) com>
Subject: Re: [MT_E and I] Three Level TP - EA
To: MetaTrader_Experts_and_Indicators (A...oups (DOT) com
Date: Tuesday, September 23, 2008, 12:50 PM
I tried it out and it didn't seem to work for me.* I attached it as an expert and had a smiley face, but it did not close out any TPs for the trade I opened.* There is no way to designate in the EA whether it is a buy or sell order, so I assume you have to place a seperate order and then attach the EA to have it close it out?
--- On Tue, 9/23/08, tradeforexfx@ gmail.com <tradeforexfx@ gmail.com> wrote:
From: tradeforexfx@ gmail.com <tradeforexfx@ gmail.com>
Subject: Re: [MT_E and I] Three Level TP - EA
To: MetaTrader_Experts_ and_Indicators@ yahoogroups. com
Date: Tuesday, September 23, 2008, 3:34 PM
*
*
Thanks Robert, will try it out.
*
*
TF
*
*
*
*
----- Original Message -----
From: Robert Hill
To: MetaTrader_Experts_ and_Indicators@ yahoogroups. com
Sent: Tuesday, September 23, 2008 2:51 PM
Subject: Re: [MT_E and I] Three Level TP - EA
TF,
Try this one. I moved the logic to a function to make it easier to use in EAs.
*I also added code to check for 5 digit pricing and modified to close sell trades at ask price.
Robert
--- On Tue, 9/23/08, tradeforexfx@ gmail.com <tradeforexfx@ gmail.com> wrote:
From: tradeforexfx@ gmail.com <tradeforexfx@ gmail.com>
Subject: [MT_E and I] Three Level TP - EA
To: MetaTrader_Experts_ and_Indicators@ yahoogroups. com
Date: Tuesday, September 23, 2008, 10:47 AM
I have tried to create this EA. The objective is to take specified profits at three different specified levels.
*
An another EA with magic# places a trade,* we use that*same magic#.
We key in the lot size of the initial trade.
We key in the lots and the TP that we want for each step. The total lots for the three steps must be equal to initial trade size.
The EA is then supposed to release the relevant lots at the given TP.
*
*
I have cut and pasted the logic from other EAs with some of my own thought process.
*
Appreciate if someone could look into the codes and see whether the EA is workable. Also if a better and more efficient coding can be introduced to achieve the given objective.
*
For now, I am looking to achieve the stated objective and nothing more.
*
I have looked into other trade managing EAs but they donot have the desired three step TPs,
*
*
Thanks
*
TF
*
|
|
|
|
10-12-2008, 09:39 AM
|
#6 (permalink)
|
|
Guest
|
Re: [MT_E and I] Three Level TP - EA
Ok. Thanks.* Would it be possible to add the ability to place a buy or sell OCO order within the EA so that one could just use the EA to open and close the same order?* It has a lot amount parameter but no buy or sell parameters.
--- On Tue, 9/23/08, Robert Hill <robydoby314 (AT) yahoo (DOT) com> wrote:
From: Robert Hill <robydoby314 (AT) yahoo (DOT) com>
Subject: Re: [MT_E and I] Three Level TP - EA
To: MetaTrader_Experts_and_Indicators (A...oups (DOT) com
Date: Tuesday, September 23, 2008, 5:16 PM
Tad,
If you open a manual order the input to the three level ea has to have magic number set to 0 to match the trade.
Robert
--- On Tue, 9/23/08, tad smith <dontforgetthisemail 2003 (AT) yahoo (DOT) com> wrote:
From: tad smith <dontforgetthisemail 2003 (AT) yahoo (DOT) com>
Subject: Re: [MT_E and I] Three Level TP - EA
To: MetaTrader_Experts_ and_Indicators@ yahoogroups. com
Date: Tuesday, September 23, 2008, 12:50 PM
I tried it out and it didn't seem to work for me.* I attached it as an expert and had a smiley face, but it did not close out any TPs for the trade I opened.* There is no way to designate in the EA whether it is a buy or sell order, so I assume you have to place a seperate order and then attach the EA to have it close it out?
--- On Tue, 9/23/08, tradeforexfx@ gmail.com <tradeforexfx@ gmail.com> wrote:
From: tradeforexfx@ gmail.com <tradeforexfx@ gmail.com>
Subject: Re: [MT_E and I] Three Level TP - EA
To: MetaTrader_Experts_ and_Indicators@ yahoogroups. com
Date: Tuesday, September 23, 2008, 3:34 PM
*
*
Thanks Robert, will try it out.
*
*
TF
*
*
*
*
----- Original Message -----
From: Robert Hill
To: MetaTrader_Experts_ and_Indicators@ yahoogroups. com
Sent: Tuesday, September 23, 2008 2:51 PM
Subject: Re: [MT_E and I] Three Level TP - EA
TF,
Try this one. I moved the logic to a function to make it easier to use in EAs.
*I also added code to check for 5 digit pricing and modified to close sell trades at ask price.
Robert
--- On Tue, 9/23/08, tradeforexfx@ gmail.com <tradeforexfx@ gmail.com> wrote:
From: tradeforexfx@ gmail.com <tradeforexfx@ gmail.com>
Subject: [MT_E and I] Three Level TP - EA
To: MetaTrader_Experts_ and_Indicators@ yahoogroups. com
Date: Tuesday, September 23, 2008, 10:47 AM
I have tried to create this EA. The objective is to take specified profits at three different specified levels.
*
An another EA with magic# places a trade,* we use that*same magic#.
We key in the lot size of the initial trade.
We key in the lots and the TP that we want for each step. The total lots for the three steps must be equal to initial trade size.
The EA is then supposed to release the relevant lots at the given TP.
*
*
I have cut and pasted the logic from other EAs with some of my own thought process.
*
Appreciate if someone could look into the codes and see whether the EA is workable. Also if a better and more efficient coding can be introduced to achieve the given objective.
*
For now, I am looking to achieve the stated objective and nothing more.
*
I have looked into other trade managing EAs but they donot have the desired three step TPs,
*
*
Thanks
*
TF
*
|
|
|
|
 |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|