Hi All,
These are the scripts I use to place market orders. They are fully functional with money management, auto TP and SL settings, market orders or pending orders, and also records execution speed and slippage on market orders. Use with hotkeys for convenience.
Instructions:
rooicol - Buy and rooicol - Sell:
For market orders, leave "Distance" and "Price" as zero.
For a pending order, enter the distance in pips you want the order to be entered at from current price in the "Distance" field. Positive number for above current price, negative number for below current price. Or you can enter the price you want the order to be placed at by entering this in the "Price" field.
Enter the number of pips you want the stop loss to be placed at from the entry price in the SL field. Or enter the price you want the SL to be placed at in the SLPrice field. Leave SL and SLPrice as 0 if you don't want to place a stop loss.
Enter the number of pips you want the take profit to be placed at from the entry price in the TP field. Or enter the price you want the TP to be placed at in the TPPrice field. Leave TP and TPPrice as 0 if you don't want to place a take profit.
In the RiskPercent filed enter the percentage of your account equity that will be risked over the number of pips to the SL order (if no stop loss is placed the position size calculation will risk the input percentage over 10 pips).
Lot size can be entered in the Lots field, or left as 0 and then the lots will be calculated based on the RiskPercent input value and the distance to the input SL.
CommissionPerLot: this is your commission fee, expressed in account currency for trading 1 lot, this is for the lot size and risk calculation.
rooicol - Close:
CloseNumber: This is the number of positions you want to close.
PercentClose: must be a number form 1-100. This is the percentage of the order lots you want to close.
ExceptMagicNumber: Enter the magic number of a trade you don't want to close while closing multiple others.
rooicol - Close will also delete pending orders.
Execution Log:
Execution speed and slippage is calculated, this is shown in the experts tab of the terminal, and also recorded in a csv log file.
For the log file to be created you will first need to create a new folder called "Execution Log", and put it in your "Drive_C/Program Files/MT4/Experts/files/" directory, the log file will be written into this folder, a new folder is created for each account.
The scripts will write to the log file:
A: Acccount number
B: Ticket Number
C: Date
D: Time
E: Pair
F: Type
G: Direction
H: Volume
I: Clicked price
J: Filled Price
K: Slippage (in pips)
L: Execution time (in Milliseconds)
These are the scripts I use to place market orders. They are fully functional with money management, auto TP and SL settings, market orders or pending orders, and also records execution speed and slippage on market orders. Use with hotkeys for convenience.
Instructions:
rooicol - Buy and rooicol - Sell:
For market orders, leave "Distance" and "Price" as zero.
For a pending order, enter the distance in pips you want the order to be entered at from current price in the "Distance" field. Positive number for above current price, negative number for below current price. Or you can enter the price you want the order to be placed at by entering this in the "Price" field.
Enter the number of pips you want the stop loss to be placed at from the entry price in the SL field. Or enter the price you want the SL to be placed at in the SLPrice field. Leave SL and SLPrice as 0 if you don't want to place a stop loss.
Enter the number of pips you want the take profit to be placed at from the entry price in the TP field. Or enter the price you want the TP to be placed at in the TPPrice field. Leave TP and TPPrice as 0 if you don't want to place a take profit.
In the RiskPercent filed enter the percentage of your account equity that will be risked over the number of pips to the SL order (if no stop loss is placed the position size calculation will risk the input percentage over 10 pips).
Lot size can be entered in the Lots field, or left as 0 and then the lots will be calculated based on the RiskPercent input value and the distance to the input SL.
CommissionPerLot: this is your commission fee, expressed in account currency for trading 1 lot, this is for the lot size and risk calculation.
rooicol - Close:
CloseNumber: This is the number of positions you want to close.
PercentClose: must be a number form 1-100. This is the percentage of the order lots you want to close.
ExceptMagicNumber: Enter the magic number of a trade you don't want to close while closing multiple others.
rooicol - Close will also delete pending orders.
Execution Log:
Execution speed and slippage is calculated, this is shown in the experts tab of the terminal, and also recorded in a csv log file.
For the log file to be created you will first need to create a new folder called "Execution Log", and put it in your "Drive_C/Program Files/MT4/Experts/files/" directory, the log file will be written into this folder, a new folder is created for each account.
The scripts will write to the log file:
A: Acccount number
B: Ticket Number
C: Date
D: Time
E: Pair
F: Type
G: Direction
H: Volume
I: Clicked price
J: Filled Price
K: Slippage (in pips)
L: Execution time (in Milliseconds)
Attached File(s)
rooicol - Buy.ex4
8 KB
|
1,047 downloads
|
Uploaded May 12, 2012 5:45am
rooicol - Close.ex4
5 KB
|
829 downloads
|
Uploaded May 12, 2012 5:45am
rooicol - Sell.ex4
8 KB
|
849 downloads
|
Uploaded May 12, 2012 5:45am