You are not logged in.

#1 06-09-2011 08:54:29

Admin & Trader
From: Paris - France
Registered: 21-12-2009
Posts: 3091

Some useful scripts to manage trades on MetaTrader 4

Some useful scripts to manage trades on MetaTrader 4

To take a position buy or sell.
TP, SL and position size are adjustable and automatically added.

Simple buy
Simple sell

To add a predefined TP or SL to a pending position.
Stop loss
Take profit

Close all open orders or pending orders.
Close all
Delete pending trades

Arrow Download MT4 scripts (Unpack the archive into the MT4/experts/scripts folder)

Now, before today, I didn't know a damn thing about scripts, but here's what it is and here's what you do (assuming you're using MetaTrader!):
1. Download the MT4 scripts (Unpack the files and copy them into the MT4/experts/scripts folder).
2. Relaunch MT4.
3. On the upper menu bar, click on View + Navigator.
4. Make sure the Expert Advisors button is pushed in in the upper menu bar.
5. On your left, double-click on Scripts.
6. Now, let's say you want to make a buy order, rather than doing it the usual way, you're going to launch the order by double-clicking on the Simple Buy command in the left menu. A window will pop up. By default the first position is set at .01, SL=29, TP=30. Simply click on the "ok" button and your first order is launched and your SL and TP will be set perfectly, you won't have to go back manually to set them!
7. If you're happy with the above default values, skip to 8. If you want to change the parameters (ex: I'm at Instaforex, which uses 5 decimal values, my SL and TP needed to be set at 290 and 300 respectively), you need to EDIT the scripts. To do this, from the upper menu click on Tools + MetaQuotes Language Editor + on the right side of screen select the script you want to change, then modify the 1-3 parameters at the top and save. When you RELAUNCH MetaTrader they should work. Repeat as necessary with any other script you wish to modify.
8. If you have a pending buy or sell order setup and want to set your SL and TP points easily without having to calculate them the old way, highlight the pending order and then double-click on the stop loss script on the left side of the screen. In a few seconds your SL will be set. Do the same for the take profit.
9. Voila!

"Anything worth having is worth going for - all the way." - J.R. Ewing



Board footer