Script OpenBUY
The description of action:
Open a long position on currency pair to which chart it is attached. Thus in case of fast change of quotations the script repeats requests until the position will be open.
Assignment:
The script allows to open a long position quickly.
Parameters:
Global variable "Scripts: Lots" = the size of an opened position; value should be not less minimal and not more than maximal allowable size of lots.
Global variable "Scripts: StopLoss (pips)" = level stoploss (in pips) from the open price of a position; value should be not less the minimal allowable distance from the open price of the order, value a 0 means open a position without stoploss.
Global variable "Scripts: TakeProfit (pips)" = level takeprofit (in pips) from the open price of a position; value should be not less the minimal allowable distance from the open price of the order, value a 0 means open a position without takeprofit.
Global variable "Scripts: Slippage (pips)" = slippage (in pips), default value = 3 pips.
Global variable "Scripts: MagicNumber" = magic number for order, default value = 0 (manual trade).
Global variable "Scripts: ColorBuy" = color for arrow on chart at open price of order, default value = Blue.
Global variable "Scripts: PlaySoundAtOpenOrder" = enable/disable play sound file "alert.wav" at open order, default value = 1 (to play). Value 0 = don't play sound file.
Global variable "Scripts: HiddenLevels" = enable/disable hidden levels s/l and t/p, default value = 0 (don't hide levels). Value 1 = don't set levels for order but wait for closing order by market when level s/l or t/p will reached.
At the first start of script the global variables will be created. For change of their values press F3 in a window of the terminal.
The status: Free-of-charge, it is possible to download the full version.
Platform: MetaTrader 4.
See also these scripts:
- open a short position.
- calculate the optimum size of lots, being based on the possible loss.
- calculate the optimum size of lots, being based on the used margin.
Frequently asked questions:
How I can run a script ?
How I can determine that the script works ?
What is the global variables ?
|