CloseAll_AllSymbols MQL4 is a Metatrader 4 Script that searches
through an account and closes out all open trades that match the
selected magic number. By default all trades are closed so this makes a
handy way to exit the market and get flat in a flash. The script
contains default values that will execute unless you manually edit the
code from within the MetaEditor.
// when MagicNumber = -1 then close all magic numbers
extern int MagicNumber = -1;
// pips of slippage to allow
extern int Slippage = 7;
If you wish to change the maximum allowance for slippage, you must
change the value in the code prior to executing the script on your
chart. Right-click on the navigator pane while selecting the script's
name, and choose Modify. This should open up the MetaEditor and load the
script into memory. Change the value as desired, then click the
"Compile" button at the top of the MetaEditor.
How to use CloseAll_AllSymbols.mq4
Download the file below and copy it into your "..\experts\scripts"
folder. After restarting Metatrader 4 so that it has a chance to compile
and find the script and place it in the Navigator pane. You should see
the script CloseAll_AllSymbols listed under "Scripts" if you copied the
file into the right location, and restarted your Metatrader. Be careful
because when you double click the MT4 script all trades on ALL selected
charts should close immediately!
You may post this MT4 script to other sites, but if you do, you must post a link to this page directly and you may not sell it or the source code. You are otherwise free to copy, use and distribute this MQL4 script for non-commercial use.
Note:
updated 11/11/2011 to eliminate a small bug that prevented the script
from unloading correctly, and reworked the for loop direction to take
all fill possibilities into account.
Updated 12/1/2012 to make script compatible with FIFO order exit rule.
Hey Ya'll,
ReplyDeleteBelow is a list of the highest ranking FOREX brokers:
1. Best Forex Broker
2. eToro - $50 minimum deposit.
Here is a list of top forex instruments:
1. ForexTrendy - Recommended Probability Software.
2. EA Builder - Custom Indicators Autotrading.
3. Fast FX Profit - Secret Forex Strategy.
I hope you find these lists helpful...
GPS robot [10x increase of the deposit sum]
ReplyDeleteI just got done with a webinar with Mark and his partner, Antony, two days ago and it was GREAT.
During the webinar Mark and Antony shared their secrets to success and answered questions about their new version of the GPS Forex Robot that IS COMING OUT TODAY!
70tradesis an innovative program capable of recognizing the safest continuation chart patterns. It scans through all the forex pairs, on all time frames and analyzes every prospective breakout.
ReplyDelete