VirtualTradePad or VTP - control panel for basic orders in MetaTrader 4 \ 5:
buy, sell, buystop, buylimit, sellstop, selllimit, close, delete, modify, trailing stop, reverse, lock, Grid,
Virtual Stops, Profit and loss closing.
Trade in 1 click from the terminal graph.
Trade with the keyboard.
The program for scalping and manual trading on Forex.
- Positions tab - Work with positions. Including: the opening of BUY and SELL, closing, flipping, locking, changing stop-loss and take-profit, modifying, including trailing stop, closing only profitable positions, closing only loss-making positions.
- Orders tab - Work with Pending and Limit Orders. Including: installation, removal, сreating grid of pending orders, work with a distance. And also work with the magic button, which allows you to set pending orders on the chart and fix a StopLoss TakeProfit at your levels and lines.
- Signals Tab - Tab showing signals from 10 standard indicators and 8 timeframes. The tab also shows the cumulative percentage of signals in the BUY SELL directions. It is also possible to open the position automatically when the aggregate signal is exceeded.
- INFO tab - Information tab showing the current specification of the selected symbol, current stop loss and take profit goals, as well as profit for today, yesterday, week, month.
- CLP tab - Work with the function of closing on the total profit or loss. Allows you to set the size of profit and loss in points, dollars, percent. Closing separately in the directions BUY SELL, Include virtual stoploss and take profit and check separately each position. Also in this tab is available the option of Trailing the received profit.
Among the features of the program:
- Works on any type of account, any broker.
- Does not require special training skills
- Easy and intuitive interface
- Only the most important functions
- Quick response to any team
- Value Point = Points of your broker.
- If you have a 5 \ 3 digit broker, then 1 point = 0.00001 \ 0.001
- If you have a 4 \ 2 digit broker, then 1 point = 0.0001 \ 0.01
Tabs for trading in 1 click:
This version was developed for trade orders BUY, SELL. And also support functions, such as: Modification Stop-loss, Take-profit, Trailing stop, Position reversal, Closing position.
- At the top of the tab, you can see: the name of the currency pair, the current type and the lot of the aggregate position on the account for this currency pair and the magic numbers, as well as the current aggregate profit.
- On the button BUY - shows the current price of ASK on which you can buy the lot.
- On the button SELL - the current BID price is displayed on which you can sell the lot.
- Lots field is the object of lot management. When you press the "+" buttons, the lots will increase in increments of the minimum available lot on the server. The lot does not fall below the lot minimum allowed on the server. The increment of the lot can be adjusted in the settings. You can also include a dynamic lot as a percentage of the balance, as well as from the StopLoss. Then in the Lot field - you specify the interest;
- BUY - opening a position to buy (Ask price at the top);
- SELL - opening a position for sell (the Bid price at the top);
- REVERSE - function of reverse positions. StopLoss and TakeProfit sets a new one from the StopLoss and TakeProfit fields. For example: Buy positions are opened, when you click on Reverse - all BUY positions are closed and the SELL position opens. If there is a BUY and SELL position in the trade, then using the Reverse button - all positions will be reversed;
- LOCK - Lock positions. For example: If you open BUY positions with lot 0.3 and / or SELL position with lot 0.1, then when you use the LOCK button, the expert advisor will open the SELL position with lot 0.2 and remove all stop-loss and take-profit from all positions. (BUY 0.3 + SELL 0.1 = SELL 0.2)
- CLOSE - closing the entire position;
- LOSS - closing of all positions that are in loss, that is, profit position is less than 0.
- PROFIT - closing of all positions that are in profit, that is, profit position is greater than 0.
- Takeprofit / Stoploss - the Take-Profit and Stop-loss for the position. When you press the "+" buttons, the take profit / stop loss will increase in steps of 1 point (the step can be adjusted in the settings). Take Profit / Stop Loss does not go below 0 or the minimum available on the server. From the zero value, when you click on "+" Take Profit immediately takes the lowest possible value on the server. If Take Profit / Stop Loss = 0, its value is displayed in red. If Take Profit / Stop Loss is not 0, its value is displayed in green;
- CheckBox Takeprofit / Stoploss enables or disables the use of Takeprofit / Stoploss
- MODIFY - urgent modification of positions with a specified TakeProfit / StopLoss. Here you can reset stop levels to 0 or change them;
- Trailing stop - selection of tracking an open position using the standard Trailingstop;
- ON button - Turn Trailing Stop on. Enabled for the currently selected pair. To turn off, you must press OFF. The Trailing Stop distance is determined by the following field.
- The field for entering the distance of the Trailingstop . It is installed in points. Set the distance to start the trailing stop. For example = 100, the expert advisor modifies the stop loss to 0 (the opening price) when the position gains 100 points of profit. Next stoploss will be tightened for the price. With an increase in profit of 110 points, stop-loss is modified to +10 points from the opening price. The step of increasing stoploss can be adjusted in the settings.
- BE - Set stop-loss to breakeven for all profitable positions. On the Positions tab, the BE button
is added - Set stop loss to lossless for all profitable positions.
This function sets break-even only for the current positions once. The break-even calculation also uses swaps and a commission.
This is a manual stop-loss in a break-even position for the current positions, which have a profit!
This version was developed to trade orders Buy Stop, Buy Limit, Sell Stop and Sell Limit, as well as
support functions, such as Stop Loss, Take Profit, order distance, setting order grid, deleting orders.
- Distance - the distance in points for indentation when placing a pending order. As with Take Profit / Stop Loss, this value can not be set less than the minimum allowed on the server. The step of changing the distance can be adjusted in the expert advisor's settings;
- TakeProfit - an indent of Take Profit for a pending order in points;
- StopLoss - an indent of Stop Loss for a pending order in points;
- Lots - trading volume (in lots or in percentage, depending on external settings) for a pending order;
- Block PLACE - options for opening: Buy Stop, Sell Stop, Buy Limit, Sell Limit;
- Block DELETE - options for deleting pending orders: Buy Stop, Sell Stop, Buy Limit, Sell Limit;
- GRIDs - the number of opened orders. If there is more than 1, then the grid of pending orders is opened at a Distance points from each other. The lot increment can be adjusted in the external settings.
A magic button for setting a pending order or position on the chart, by specifying installation levels with the cursor.
- When you point the cursor on the current bars - the advisor will set a pending or limit order, depending on the selected StopLoss and TakeProfit settings.
- If you hover the cursor above the current price - the Expert Advisor can only install BUYSTOP or SELLIMIT (depending on the subsequent installation of StopLoss / TakeProfit)
- If you are hovering below the current price - the Expert Advisor can only install SELLSTOP or BUYLIMIT (depending on the subsequent installation of StopLoss / TakeProfit)
- If a Stop Loss and Take Profit is not set - the Expert Advisor can only set BUYSTOP (above the current price) or SELLSTOP (below the current price)
- When you move the cursor to the future (beyond the current bars), the advisor will set the BUY or SELL position, but you can specify the stop loss / take-profit levels on the chart, using the lines.
- When Grids parameter is greater than 1, the Expert Advisor will set the grid of pending orders, with the initial price indicated by the cursor.
- Place - activates and sets the specified pending order or position
- Cancel - Cancels the current preset levels
- To exit the MagicTarget mode - just press the MagicTarget button again
- MagicTarget_Button_KEY = BUTTON_O - Activation of the Magic Target, by default O. The tab on Orders automatically changes!
- MagicTarget_Place_KEY = BUTTON_P - Set the order for the displayed levels, according to P.
- MagicTarget_Cancel_KEY = BUTTON_I - Cancel by the displayed levels, according to I.
- Added the ability to drag an entire order on a chart using MagicTarget:
- When installing lines, you can change line levels by dragging lines on the chart.
- Added the ability to drag the entire order, holding down the SHIFT button and dragging the main line of the opening price.
In order to trade from the keyboard, you need to enable the corresponding option in the KeyBoardTrade = true panel settings:
- input bool KeyBoardTrade = false;
- input keycode Buy_KEY = BUTTON_D;
- input keycode Sell_KEY = BUTTON_A;
- input keycode Close_KEY = BUTTON_X;
- input keycode LossCLOSE_KEY = NONE;
- input keycode ProfitCLOSE_KEY = NONE;
- input keycode Reverse_KEY = BUTTON_Q;
- input keycode Lock_KEY = BUTTON_E;
- input keycode MagicTarget_Button_KEY = BUTTON_O;
- input keycode MagicTarget_Place_KEY = BUTTON_P;
- input keycode MagicTarget_Cancel_KEY = BUTTON_I;
Also the window from which you will trade should be active!
Attention! The deal will be opened from the panel whose chart window is now active!
This tab is informational in nature. Analyzing the main trading strategies for 10 indicators and 8 TF, the Panel displays the direction of the indicator signal graphically.
The percentage of signal strength for BUY and SELL is also indicated.
Also, you can include the possibility of an automatic opening of positions on excess of interest.
The percentage at which the position is opened or the signal is notified - can be configured in external settings.
All the parameters of the indicators can be configured in the external settings.
The signal calculation bar can be adjusted in external settings.
Added new features:
Change TF when you click on the object:
If you click on the name of the timeframe, then this timeframe will be applied to the current chart.
Only for mt5:
When you click on the indicator name, this indicator (with parameters from external settings) will be added to the current chart window.
Clicking on the arrow will open Time Frame and add indicator.
- x - no signal;
- Arrow up - signal BUY;
- The down arrow is the SELL signal.
- The name of the currency pair, the presence of an open position for the symbol, its type and size of the lot.
- Profitability of the current position in dollars, points and percent of the current deposit.
- Current spread (if the spread is floating, the name is (F)).
- The current minimum indent for stop orders and pending orders.
- Swap short and long positions.
- Type of execution of positions .
- The cost of 1 point of price movement in the deposit currency to the current set lot in the terminal at this position.
- Distance to stop loss in points and dollars.
- Distance to take profit in points and dollars.
- The daily profit or loss for this currency pair is currently in dollars, in the deposit currency, as well as in percentage of the current balance.
- Weekly profit or loss for this currency pair for the current week in dollars, in the deposit currency, as well as in percentage of the current balance.
- The monthly profit or loss for this currency pair for the current month in dollars, in the deposit currency, as well as in percentage of the current balance.
- The annual profit or loss for this currency pair for the current year in dollars, in the currency of the deposit, as well as in percentage of the current balance.
- All history profit or loss for this currency pair in dollars, in the deposit currency, as well as in percentage of the current balance.
The control panel closes by the general profit or loss in dollars, pips and % of the balance. The panel can be used as a virtual stop loss or take profit. There is also an emergency button - Close ALL.
Added the ability to profit trailing.
If you see a green indicator, then the function is turned on and working.
- The panel works on the symbol that is set (Current Symbol), or considers the total profit or loss for all symbols (All symbols).
- The panel can be used as a virtual stop loss or take profit. To do this, set profit and loss and tick off Separate Orders. The EA will close positions separately from each other, according to the set profit and loss values in points, dollars, percentages
- In the panel, you can choose the type of closing: for profit in dollars, in pips or in% of balance, as well as for loss in dollars, in pips or in% of balance.
- Also there is a button "CLOSE ALL", which closes the position of the symbol or all positions (depending on the choice) instantly.
- Directly on the panel displays information about the current state of your positions for the selected methods of closing.
- Profit can be set only above 0. If you set 0 - the field will flash red. This means that the set value with an error and this field will not work with the Expert Advisor. If YOU set a value with a minus, the EA will automatically move the field to a positive value (for example -100 = 100)
- The loss can only be set to below 0. If you set 0, the field will flash red. This means that the set value with an error and this field will not work with the Expert Advisor. If YOU set a value with a plus, the EA will automatically move the field to the minus value (for example 100 = -100)
- Place the panel on your currency pair.
- Depending on how you want to close positions (for all characters or for the current one), select the corresponding option on the panel itself.
- In order for the check box to select the type of closure to be active, you need to enter parameter values other than 0, with a positive value for profit, and negative for a loss, for example: -100.
- Check the boxes opposite the items you want to use when closing (Profit \ Loss in points \ dollars \ percents).
- Enable the Close if Profit or Loss button, it should turn blue. This means that the EA is involved in the work.
- As soon as the profit or loss of your positions crosses the mark of the established levels, the deals will be closed.
- The emergency button CLOSE ALL is designed to close all positions instantly.
- All Symbols - includes closing on all symbols.
- XXXXXX only - includes closing only on the current currency pair on which the advisor is installed.
- Separate BuySell - includes a separate closing for positions BUY and SELL.
- Separate Order - includes a separate closing for each item separately.
- Profit $ - Enables / disables closing on the total profit in dollars or in the deposit currency.
- Profit p - Enables / disables the closing of the total profit in points.
- Profit% - Enables / disables closing on the total profit as a percentage of the current balance.
- Loss $ - Turns on / off the closing for the total loss in dollars or in the deposit currency.
- Loss p - Enables / disables the closing of the total loss in points.
- Loss% - Enables / disables the closing of the total loss in percent of the current balance.
- Close if Profit or Loss ON - The closing function for total profit or loss is ON
- Close if Profit or Loss OFF - The closing function for total profit or loss is OFF
The function of profit trailing at set values.
This function includes trailing profits (floating profit) at closing.
Those, in this case, the profit is closed not fixed, but with the trailing of the specified value. Those. as soon as the profit has reached the specified value, the EA remembers the current value of profit and then tightens this value after the profit.
For example :
If you set the close at profit 10 dollars:
Profit $ - close in plus.
Profit $ - how much to close in plus.
TrailingProfit - distance from Profit $, at which achievement the trailing of profit is included.
When you set Profit $ to 10, and for TrailingProfit to 5, the trailing profit line is set to $ 5. The advisor, when passing the $ 10 mark, will include the profit trailing function and will pull the closing mark after the profit. In the log, the records of the current position of profit will be displayed.
After the total profit falls below the last fixed level - TrailingProfit, the advisor will close all deals forcibly.
The option works for all types of closing: All symbols, Current symbol, Separate direction BUY and SELL, Each order is separate.
Also, the expert advisor shows approximate closing prices for total profit or loss.
Parameter Show_Future_BE_TP_SL - showing lines of the future closing of positions for total profit or loss.
Caution: Only works on the current symbol and when the SEPARATE Orders mode is off.
Lines are shown separately for Buy and Sell positions, or a common line.
If the line is not shown, then the positions form a lock, which can not be closed by the total profit or loss.
Note: Line and price data may not be accurate on the floating spreadsheet.
Remember! SELL is closed by ASK, and BUY is closed by BID
|GeneralSize||resize the panel
GeneralSize default = 12, Increasing the size of the panel.
Last panel size with GeneralSize = 10!
|SymbolToTradeCustom||Variable indication of the currency pair for the panel operation:
This makes it possible to trade on offline charts (Ticks, Renko ..).
Caution: Be careful when writing a title. The name must fully match the name in the Market Review!
EurUSD - Wrong!
EURUSD - That's right!
If this parameter is not set, the Expert Advisor works on the currency pair on which it is installed!
|bool Show_Future_Line = false||Enables / disables the display of the virtual lines of the future position. Works only on the Position tab. If this option is enabled on the terminal graph, the advisor will draw the opening price, stop-loss, and take-profit lines. Will show information about the lot, stop loss and take-profit in the deposit currency, Will show the price levels of the installation of stoploss and take-profit.|
|ShowInfoPosition||Show on the chart information about open positions and their Stop Loss / Take Profits. The information is shown in the form of text labels.|
|Show_Prices_on_Tab_Position||Show information about price changes and direction of change on the BUY SELL buttons of the Positions tab|
|roundingType Rounding = 0||Rounding of all prices when opening and modifying orders and positions.
Choices: No rounding, rounding up to 1 digit, Rounding up to 2 digits.
The option is designed for Gold and Silver, as well as for accurately setting the level of pending orders, as well as for brokers, where a certain accuracy of ticks is specified.
Order setting price = 1.12345
Rounding to 1 digit = 1.12340
Rounding up to 2 digits = 1.12300
|int MagicNumber = 777||
Magic number for positions and orders, Set when opening. Used in determining the positions and orders for My or someone
- Added MultiMagic. Parameter MagicNumber updated: the first digit is intended to indicate the magic number for opening
positions and escorts. You can also specify several magic numbers to accompany;
|bool UseAllMagicFromAllAccount= true||Allows you to take into account all positions opened in the terminal for this currency pair.
UseAllMagicFromAllAccount = true
then all positions with any magic number will be taken into account when opening, closing, modifying, overturning, information .....
UseAllMagicFromAllAccount = false
The expert advisor takes into account only those deals that have the MagicNumber
|bool VirtualSLTPUse = false||Use virtual levels stoploss/takeprofit when opening positions.
When this option is enabled, the real stop-loss and take-profit will be hidden from the broker. The Expert Advisor will store the levels of stops in the array.
Attention: Virtual Stoploss and TakeProfit work only when the terminal is on.
|digitstype Digitss = 2;||The number of decimal places in the display on the Position tab on the BUY SELL buttons
Choices of choice: Show_for_4_digits and Show_for_5_digits
|string CommentOrders = ""||A comment that will be added to the position or order comment when opened.
CommentOrders = "Super"
Position comment: Super VirtualTradePad Extra
|Trade from Keyboard options|
|bool KeyBoardTrade = false||Using the keyboard as a trade in one click|
|Buy_KEY = BUTTON_D||Open the BUY position with the D key|
|Sell_KEY = BUTTON_A||Opening the SELL position with the A button|
|Close_KEY = BUTTON_X||Closing positions with the X button|
|LossCLOSE_KEY = NONE||Closing only loss-making positions is not established|
|ProfitCLOSE_KEY = NONE||Closing only profitable positions is not established|
|Reverse_KEY = BUTTON_Q||Flipping positions with the Q button|
|Lock_KEY = BUTTON_E||Lock positions with the E button|
|bool DynamicLotStopLoss = false||Enabling the dynamic calculation of the lot from the established stoploss as a percentage of the free margin.
When the position is closed on the stop-loss, the loss of this position is equal to the fixed percentage of the free margin.
DynamicLotStopLoss = true
field Lots = 2
field Stoploss = 500
Free margin = 9999
Possible loss = $ 200
Calculated lot = 0.39
|bool DynamicLotAuto = false||Enabling dynamic lot calculation in percent of free margin and other factors.
Calculation of our autolot.
|double RiskRate = 0||RiskRate - the rate of your currency against the dollar.
By default, RiskRate = 0 - means that the Expert Advisor will try to find the correct rate in the Market Review.
In order for Autolot to work adequately with all currency pairs, you need to include the "Show all currency pairs" in the Market Review.
|double CoefLotForGridOrders= 1;||multiply the next lot in the grid of pending orders when used on the Orders tab
CoefLotForGridOrders = 2, Grid = 5, then the lots will open like this: 0.1, 0.2, 0.4, 0.8, 0.16
|double AddLotForGridOrders= 0;||Additional lot for each element of the grid of pending orders when used on the Orders tab.
AddLotForGridOrders = 0.1, Grid = 5, then the lots will open like this: 0.1, 0.2, 0.3, 0.4, 0.5
|MaxLotToOpen||Maximum lot that can be set when calculating functions DynamicLotStopLoss and DynamicLotAuto|
|double Step_Lots = 0.01||The step of changing the LOTS field when using + -|
|int Step_StopLoss = 1||Step of changing the StopLoss field when using + -|
|int Step_TrailingStop = 1||The step of changing the trailing stop in the modification of positions.
It is installed to work with the TrailingStop function.
Step_TrailingStop = 1
With a trailing stop, the stoploss changes in steps of 1 point:
1.12345, 1.12346, 1.12347, ......
Step_TrailingStop = 15
With a trailing stop, the stoploss changes in 15-point increments:
1.12345, 1.12360, 1.12375, ......
|MovingInWLUSE = false||Enable the break-even function.
The function modifies the stop loss in LevelWLoss points when the position reached the LevelProfit of the profit items.
LevelWLoss = 50 LevelProfit = 200
As soon as the position accumulates 200 points of profit, StopLoss of the position will be modified to the opening price of the position (+ spread) + 50 points
LevelWLoss = 0 LevelProfit = 100
As soon as the position accumulates 100 points of profit, StopLoss of the position will be modified to the opening price of the position (+ spread)
|int LevelWLoss = 0||The level of stop-loss in the positive zone in points|
|int LevelProfit = 0||The number of points of profit that a position must pass for the lossless function to modify the stop-loss.
|Close by total profit or loss options|
Show break-even and profit and loss levels on the current chart. The price of lines is calculated on the basis of the entered
values in the fields Profit and Loss in points \ dollars \ percents.
Important : Remember that the price of one item can change with the quotations of other currency pairs.
For example, the price of 1 point of the EURJPY currency pair and the currency of the deposit is the dollar, the USDJPY rate changes affect. The cost of 1 point = 0.01 JPY. If your account is in dollars or rubles, then the cost of the item is constantly changing. This means that the line of future profit or loss can change. And the exact level of closure can not be predicted. + The level of future profit or loss can be influenced by commission and swaps. And also at closing.
|double CLP_TralOptionsStep= 0||The step of changing the level of profit when trailing profits are conventional units (points, deposit currency,
When the Trailing Profit function is in operation, the Expert Advisor remembers the profit level of each 1 conventional unit.
CLP_TralOptionsStep = 1
The fixation of the level of profit occurs every 1 unit
CLP_TralOptionsStep = 15
The profit level is fixed every 15 units
|bool CLP_DeleteStopOrders= false||Delete pending orders when "closing on the total profit or loss"|
|bool Use_Lots_in_CLP_Points = false||When calculating points of profit or loss, the advisor will also take into account the lot of these positions. This option is
useful when trading on a hedge account with different lots.
Open 2 positions SELL for EURUSD
SELL 0.01 with a profit of 20 points and $ 0.2
SELL 0.02 with a loss of -12 points and -0.24 dollars
-When Use_Lots_in_CLP_Points = false, the Expert Advisor will calculate the "clean" items.
in this case, the profit will be: -0.04 dollars or 8 points.
As we see, the position (Deal) gained profit, but in dollars it is a loss.
-When using_Lots_in_CLP_Points = true, the Expert Advisor will calculate the items taking into account the Lots.
in this case, the profit will be: -0.04 dollars or -4 points.
When calculating the profit in points and including the option "Include lots in the calculation of profits,"
the EA finds the minimum lot from the presented positions and, proceeding from this lot, calculates Points.
Minimum position 0.01, 1 "clean" item = 1 point,
If a position with lot 0.02 is opened, then 1 net point = 2 points including the lot.
If the position with lot 0.05 is opened, then 1 net point = 5 points including the lot.
|bool AutoCorrect_LevelCLP = true||In the loss field, you can now enter only minus values, if the user entered +10, then the system will automatically translate
In the profit field, you can now enter only positive values, if the user entered -10, then the system will automatically translate to +10.
CLP_TralOptions, you can enter only a positive value, otherwise the Expert Advisor will return an error.
|bool CPL_AlerT = false||Issue closing message on profit or loss on terminal graph|
|bool CPL_Mail = false||Issue a message of closing on profit or loss to the established mail|
|bool CPL_Push = false||Issue a closing message on profit or loss to the phone in the form of a PUSH notification|
|bool CPL_CloseTerminalAfterClose= false||Closing the terminal after all positions have been closed|
|CPL_AUTOOFF_AfterClose||automatic shutdown of the button "Closing on the total profit or loss" after the closing of all positions.
Disconnect occurs only when ALL! positions are closed.
The Magic number specified in the Expert Advisor is taken into account, as well as the symbol for closing.
If you choose to close only 1 currency. In this case, the parameter CPL_AUTOOFF_AfterClose is enabled, then the EA waits until all positions for this currency are closed and only after this the EA can turn off the button.
|int Signals_Percent = 0||Signals Percent, if the total signal in the Signals tab is exceeded, the set value is in percentage.
0 - disabled
|Percent_difference_Signals||Percentage difference between two signals to perform an action (Alert, Open Positions)
Signals_Percent = 40% Percent_difference_Signals = 10%:
A signal to BUY can only be when the total signal for the direction BUY is> 40%, the total signal is SELL <30%
The signal on the SELL can only be when the total signal for the direction SELL is> 40%, the total signal BUY is <30%
|bool AutoTrade_by_Signals = false||Automatically open a position when the aggregate signal level has exceeded
Signals_Alert_After_Percent = 70
AutoTrade_by_Signals = true
When the BUY total signal level exceeds 70%, then the EA opens the BUY position
When the level of the aggregate SELL signal exceeds 70%, then the EA will open the SELL position
|Alert_by_Signals||Added a separate variable to display a message on the screen when the conditions for the general signal are met.
Alert_by_Signals - Enables or disables the display of an alert on the screen.
|bool Shift = 0||Bar number for signal Article on signal bars|
|Signals_M1 - Signals_W1||Enable or disable the display of information on signals for the selected TF|
|Signals_BARS - Signals_ALI||Enable or disable the display of information by signals for the selected indicators|
|Other MT5 options|
|filling TypeFilling = Auto||The type of fill positions and orders.
Used for MT5 terminal.
In AUTO mode, the Expert Advisor tries to determine the fill type automatically. But, in some situations, you need to set the fill type yourself.
If you get an error when opening a position
The unspecified type of execution of the remainder order is indicated
Set the type of fill that your broker indicates.
This execution policy means that the order can be executed only in the specified amount. If the market currently does not have a sufficient amount of a financial instrument, then the order will not be executed. The required volume can be made up of several offers available at the moment in the market.
It means the agreement to make a deal on the maximum available volume on the market within the limits specified in the warrant. In case of impossibility of full execution, the order will be executed for an accessible volume, and the executed order volume will be canceled.
This mode is used for market, limit and stop-limit orders, and only in the modes "Market Execution" and "Stock Execution". In case of partial execution, a market or limit order with a residual volume is not withdrawn, but continues to operate.
For stop-limit orders, the corresponding limit order with the execution type Return will be created upon activation.
|int DayToExpiration = 0||variable for selecting the expiration date of the pending order when trading on FORTS:
- 0: ORDER_TIME_GTC - No expiration date
- 1: ORDER_TIME_DAY - Expiration of the pending order until the end of the current day
- 2: ORDER_TIME_SPECIFIED_DAY- The number of days for the expiration of the pending order. The starting point from the current day.