Voodoo Trading Russian Language
Main page Scripts Indicators Experts

The list of scripts:


AutoSL_TP
Close&DeleteALL
CloseALL
CloseAtTimeOrder
CloseAtTimeALLOrders
CloseBy
DeleteALL
DrawHistoryOrders
EventsOfOrders
ExitMartingale
ExportMarketInfo to CSV
FindHoles
HiddenPendingOrder
HiddenStopLoss
LimiteTimeOrder
LimiteTimeALLOrder
LotsOptimizedLoss
LotsOptimizedMargin
MoveToBE
OneCancelOther
OpenAfterExecute
OpenAtTime
OpenBUY
OpenSELL
SystemTwoOrders
TrailingStopMA
TrailingStopPeak

Script LotsOptimizedMargin

The description of action:
     For currency pair of chart to which it is attached, calculates the size of lots borrowing the specified interest of the current free margin. The result is shown in MessageBox and after manual confirmation keeps in a global variable "Scripts: Lots" for further use in scripts OpenBUY and OpenSELL. Is possible to run script in test-mode for see that is a values will calculated at various size of balance. The results of test-mode is save to CSV-file.

Assignment:
     The script allows to automate the mathematical calculations concerning the optimum size of an opened position.

Parameters:
     Global variable "Scripts: MM RiskPercent" = interest of the current free margin used for opening a position; value should be more than 0 and less than 100, probably fractional value.
     Global variable "Scripts: MM Method" = the code of base that used for calculation a size of lots. Possible values: 0 - FreeMargin, 1 - Balance, 2 - Equity.
     Global variable "Scripts: MM ShowMessageBox" = enable/disable to show window MessageBox with result of calculations. Possible values: 0 - don't show window, 1 - to show window.

     Global variable "Scripts: MM Test" = enable/disable the test-mode of calculations. Possible values: 0 - test-mode is disabled, 1 - test-mode is enabled.
     Global variable "Scripts: MM Test FreeMargin First" = the first value of FreeMargin. This is parameter for test-mode.
     Global variable "Scripts: MM Test FreeMargin Step" = the step for modify value of FreeMargin. This is parameter for test-mode.
     Global variable "Scripts: MM Test FreeMargin Last" = the last value of FreeMargin. This is parameter for test-mode.
     Global variable "Scripts: MM Test RiskPercent First" = the first value of RiskPercent. This is parameter for test-mode.
     Global variable "Scripts: MM Test RiskPercent Step" = the step for modify value of RiskPercent. This is parameter for test-mode.
     Global variable "Scripts: MM Test RiskPercent Last" = the last value of RiskPercent. This is parameter for test-mode.

     At the first start of a script 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, MetaTrader 5.

To download the full version for MT4 To download the full version for MT5

See also these scripts:
LotsOptimizedLoss
- calculate the optimum size of lots, being based on the possible loss.
OpenBUY
- open a long position.
OpenSELL
- open a short position.


Frequently asked questions:
How I can run a script ?
How I can determine that the script works ?
What is the global variables ?

At occurrence of questions or offers write on Serega.Lykov@gmail.com, Sergey Lykov.
I can create the scripts, indicators and advisers of "MetaTrader 4" for a payment.
The partial or full reprint is supposed only referring to a source.
The site is designed and created by Sergey Lykov, Copyright © 2008-2024.

Hosted by uCoz