Trade Entry/Management EA - EASY ORDER Amended
- Darren
- Posts: 891
- Joined: 20 Nov 2012, 13:54
- 12
Re: Trade Entry/Management EA
I have amended the EasyOrder script so that it submits 2 orders, one with a TP at 1:1 and one without a TP. It also works out the risk correctly so that if you want a 1% risk trade you will get two positions of 0.5% each. The code is a little messy but it works!
Cheers.
Cheers.
You do not have the required permissions to view the files attached to this post.
- Darren
- Posts: 891
- Joined: 20 Nov 2012, 13:54
- 12
Re: Trade Entry/Management EA
I have added a few more scripts to the EasyOrder way of entering trades.
To use the new scripts you need to either select a Buy Stop or a Sell Stop as you would have done previously using the Easy Order box, you will then get the two lines. The blue line is the entry line, the red line is the stop loss.
If you entered a Buy Stop then you can run the "##BUYMoveLines" script and that will move the lines to the latest fractal high and low. If you want to place a PO on an inside bar then you can run the "#BUYLastBarMoveLines" and that will move the lines to the high and low of the previous bar (not the last inside bar!). When you run the scripts you will see a pop up box asking how many pips above and below the fractal or last bar that you want to place the order. By default this is set to 1.5 pips above and 1 pip below, but you can change it to what you want.
Sell orders are the same as Buy ones but you need the "##SELLMoveLines" and "#BUYLastBarMoveLines" scripts.
I have set up a hot key for each of the scripts so it is very fast to move the lines and set the PO's to where you want them.
Once the lines are where you want them press 'Submit' on the Easy Order window and the PO's will be submitted. If the risk is set to 1 percent then it will submit 2 orders of 0.5% each. If you don't want 2 orders then you can amend the code yourself, it is only 1 line that needs to be removed.
Make sure you put all of the scripts in the experts/scripts folder and the dll in the experts/libraries folder.
The source is open so change whatever you like to make life easier!
To use the new scripts you need to either select a Buy Stop or a Sell Stop as you would have done previously using the Easy Order box, you will then get the two lines. The blue line is the entry line, the red line is the stop loss.
If you entered a Buy Stop then you can run the "##BUYMoveLines" script and that will move the lines to the latest fractal high and low. If you want to place a PO on an inside bar then you can run the "#BUYLastBarMoveLines" and that will move the lines to the high and low of the previous bar (not the last inside bar!). When you run the scripts you will see a pop up box asking how many pips above and below the fractal or last bar that you want to place the order. By default this is set to 1.5 pips above and 1 pip below, but you can change it to what you want.
Sell orders are the same as Buy ones but you need the "##SELLMoveLines" and "#BUYLastBarMoveLines" scripts.
I have set up a hot key for each of the scripts so it is very fast to move the lines and set the PO's to where you want them.
Once the lines are where you want them press 'Submit' on the Easy Order window and the PO's will be submitted. If the risk is set to 1 percent then it will submit 2 orders of 0.5% each. If you don't want 2 orders then you can amend the code yourself, it is only 1 line that needs to be removed.
Make sure you put all of the scripts in the experts/scripts folder and the dll in the experts/libraries folder.
The source is open so change whatever you like to make life easier!
You do not have the required permissions to view the files attached to this post.
- Darren
- Posts: 891
- Joined: 20 Nov 2012, 13:54
- 12
Re: Trade Entry/Management EA
I have made a small amendment to make using the scripts a little easier. You now no longer need both the "##BUYMoveLines" and "##SELLMoveLines" scripts as they have been replaced by "##MoveLinesToLastFrac". It does exactly the same as before but works out if you are trying to place a buy order or a sell order by itself.
Equally, "#BUYLastBarMoveLines" and "#SELLLastBarMoveLines" scripts have been replaced by "#MoveLinesToLastBar". Again, it does exactly the same thing as the Buy and Sell scripts but now works out if you are placing a buy or a sell order and puts the order above and below the last bar.
Use hot keys in order to run the scripts quickly.
Cheers!
Equally, "#BUYLastBarMoveLines" and "#SELLLastBarMoveLines" scripts have been replaced by "#MoveLinesToLastBar". Again, it does exactly the same thing as the Buy and Sell scripts but now works out if you are placing a buy or a sell order and puts the order above and below the last bar.
Use hot keys in order to run the scripts quickly.
Cheers!
You do not have the required permissions to view the files attached to this post.
- Darren
- Posts: 891
- Joined: 20 Nov 2012, 13:54
- 12
Re: Trade Entry/Management EA
Another script has been added which moves the pending order lines to the top and bottom of the last inside bar. May be useful!
It is called "#MoveLinesToLastIB"
Cheers!
It is called "#MoveLinesToLastIB"
Cheers!
You do not have the required permissions to view the files attached to this post.
- Darren
- Posts: 891
- Joined: 20 Nov 2012, 13:54
- 12
Re: Trade Entry/Management EA
A few people have had trouble loading the EasyOrder Script. Make sure you options are the same as below as that may help if you are having trouble:
Also, you may need the Microsoft Visual C++ 2008 Redistributable Package installed on your PC if you don't have it. Or maybe you have it but it is corrupted or something:
http://www.microsoft.com/en-us/download ... aspx?id=29
Cheers.
Also, you may need the Microsoft Visual C++ 2008 Redistributable Package installed on your PC if you don't have it. Or maybe you have it but it is corrupted or something:
http://www.microsoft.com/en-us/download ... aspx?id=29
Cheers.

You do not have the required permissions to view the files attached to this post.
- Darren
- Posts: 891
- Joined: 20 Nov 2012, 13:54
- 12
Re: Trade Entry/Management EA - EASY ORDER Amended
I changed the easy order script that I uploaded to the forum so that the maximum risk I could take is 1%. This was deliberate as I didn't want to enter a 10% trade by accident and not notice! It was more of a fail safe measure. However, a couple of Aimster's have contacted me as they don't want that restriction so here are the instructions to remove it:
Open up MetaEditor from your MT4 platform as shown:
and then open up the EasyOrder_Submit script within MetaEditor, search for some code as shown below and then delete all of it:
if (risk > 1){
Alert("Risk is too large!");
return(0);}
Alternatively you can change the code to as follows, then it won't open an order if risk is greater than 3%:
if (risk > 3){
Alert("Risk is too large!");
return(0);}
Once you have either deleted the code or changed the risk amount press the 'Compile' button at the top of MetaEditor and you will then be able to enter a larger risk trade. Close down MetaEditor after it has been compiled.
Cheers.
Open up MetaEditor from your MT4 platform as shown:
and then open up the EasyOrder_Submit script within MetaEditor, search for some code as shown below and then delete all of it:
if (risk > 1){
Alert("Risk is too large!");
return(0);}
Alternatively you can change the code to as follows, then it won't open an order if risk is greater than 3%:
if (risk > 3){
Alert("Risk is too large!");
return(0);}
Once you have either deleted the code or changed the risk amount press the 'Compile' button at the top of MetaEditor and you will then be able to enter a larger risk trade. Close down MetaEditor after it has been compiled.
Cheers.
You do not have the required permissions to view the files attached to this post.
- Darren
- Posts: 891
- Joined: 20 Nov 2012, 13:54
- 12
Re: Trade Entry/Management EA - EASY ORDER Amended
I have noticed a slight bug with the EasyOrder script and have fixed it on my version. However, my version has been highly adapted so if you want the fix you will have to apply it yourself! If you ever come across the error message "Invalid Trade Volume" when you press submit then you may have to apply this fix.
Open up MetaEditor as shown in the post above and then open up the "EasyOrder_Submit" script within MetaEditor. You then need to find the line of code as shown below and remove "/2" from the end of the line as shown:
You then need to insert a new line and add the code "lot = lot/2;" as shown below:
Once you have made the change then you will need to compile the change by clicking on the 'Compile' button at the top of MetaEditor.
EDIT: This change has now been made to the version in the first post of the new topic:
http://www.itradeaims.net/forum/viewtop ... =56&t=1203
Open up MetaEditor as shown in the post above and then open up the "EasyOrder_Submit" script within MetaEditor. You then need to find the line of code as shown below and remove "/2" from the end of the line as shown:
You then need to insert a new line and add the code "lot = lot/2;" as shown below:
Once you have made the change then you will need to compile the change by clicking on the 'Compile' button at the top of MetaEditor.
EDIT: This change has now been made to the version in the first post of the new topic:
http://www.itradeaims.net/forum/viewtop ... =56&t=1203
You do not have the required permissions to view the files attached to this post.
Last edited by Darren on 13 Aug 2014, 11:29, edited 1 time in total.
- immy
- Founder
- Posts: 9654
- Joined: 22 Nov 2010, 16:46
- 14
Re: Trade Entry/Management EA - EASY ORDER Amended
Hi DarrenDarren wrote:I have noticed a slight bug with the EasyOrder script and have fixed it on my version. However, my version has been highly adapted so if you want the fix you will have to apply it yourself! If you ever come across the error message "Invalid Trade Volume" when you press submit then you may have to apply this fix.
Open up MetaEditor as shown in the post above and then open up the "EasyOrder_Submit" script within MetaEditor. You then need to find the line of code as shown below and remove "/2" from the end of the line as shown:
You then need to insert a new line and add the code "lot = lot/2;" as shown below:
Once you have made the change then you will need to compile the change by clicking on the 'Compile' button at the top of MetaEditor.
Thank you for your help and support. This is a great tool and works fine. However in order for people to find it and keep updated I suggest we start a new topi in this section. If you start the topic you will have access to the first post and will be able to keep the updated versions in the first post. As its is common in most forums indicator/fiels etc are kept updated in the first post which makees it easier for users to download and stay updated.
Suggested Topic Name: EASY ORDER Trade Management EA by Darren

Regards
What is the Secret of Successful Trading?
The Consistent Pursuit of DS1
The thing that makes me money in trading is when I "Objectively Follow my Trading Plan".
I understand that I can't catch all the moves or all the signals but my objective is to catch THE VALID SIGNALS & ONLY the Valid Signals.
My Deathbed Advice "5:1 Reward to Risk Ratio".
Yo, banana boy!
The Consistent Pursuit of DS1

The thing that makes me money in trading is when I "Objectively Follow my Trading Plan".
I understand that I can't catch all the moves or all the signals but my objective is to catch THE VALID SIGNALS & ONLY the Valid Signals.
My Deathbed Advice "5:1 Reward to Risk Ratio".
Yo, banana boy!
- Darren
- Posts: 891
- Joined: 20 Nov 2012, 13:54
- 12
Re: Trade Entry/Management EA - EASY ORDER Amended
Good plan Immy. I have updated the latest version with that little fix and applied it to the zip file in the first post:immy wrote:Darren wrote:I have noticed a slight bug with the EasyOrder script and have fixed it on my version. However, my version has been highly adapted so if you want the fix you will have to apply it yourself! If you ever come across the error message "Invalid Trade Volume" when you press submit then you may have to apply this fix.
Open up MetaEditor as shown in the post above and then open up the "EasyOrder_Submit" script within MetaEditor. You then need to find the line of code as shown below and remove "/2" from the end of the line as shown:
You then need to insert a new line and add the code "lot = lot/2;" as shown below:
Once you have made the change then you will need to compile the change by clicking on the 'Compile' button at the top of MetaEditor.
Hi Darren
Thank you for your help and support. This is a great tool and works fine. However in order for people to find it and keep updated I suggest we start a new topi in this section. If you start the topic you will have access to the first post and will be able to keep the updated versions in the first post. As its is common in most forums indicator/fiels etc are kept updated in the first post which makees it easier for users to download and stay updated.
Suggested Topic Name: EASY ORDER Trade Management EA by Darren![]()
Regards
http://www.itradeaims.net/forum/viewtop ... =56&t=1203