Alpha Grid MT5:   Price Range Control

Alpha Grid MT5: Price Range Control

10 March 2024, 07:10
Aliaksandr Charkes
0
62

<<   Back to the General Section with a description of the settings

Settings for Limiting Trading By PRICES

This section describes the EA settings that allow you to trade based on control price points. 

To get quicker information on the desired setting, you can use the page search function. This is normally accessed by pressing F3 or Ctrl+F 

A brief description of the trading opportunities of this mode:

1. Trade only within a given price range

2. Expanding the grid of pending orders when approaching a given price

3. Trailing stop of the set price limits

4. Closing positions and deleting orders of a given type when going beyond the specified price limits

5. The ability to use this type of trade at the same time with any other types of trade that the adviser supports.



Information options:
  All the necessary data related to this type of trade is displayed in a separate information panel created specifically for this mode. Also, after the finalization of the trade, a separate message is displayed about this, which will be impossible not to notice and ignore.

Change settings on the fly:  Almost all settings for this mode can be adjusted even after it is activated. That is, you can, without problems, change the already set values at any time an unlimited number of times. At the same time, the adviser will constantly monitor the correctness of the entered settings, thereby helping to better adapt to the current trading situation.

Variety of strategies:  The trading (and informational) capabilities of this mode can be used not only for the operation of the current EA, but also for manual trading, and in some cases for controlling the work of other foreign Expert Advisors.

Technical details of available options >>


Some additional notes:

All trading in this mode is based on Bid values.

The initial deployment of the EA grid and the restoration of orders is triggered at the starting price.

The initial prices for the EA grid are not related to the price range of this mode in any way!




Description of Settings 

>>    Activation Mode of limiting trading by PRICES
Activation of the trading mode with tracking market prices. This setting enables or disables all other settings for this type of trade. That is, if <false> is set, the values of the other settings in this section do not matter (except for the possibility of displaying a special panel for this mode).

With this setting, you can also restart this trade after it ends. That is, if the market price has gone beyond the specified price range (trading is considered completed), and the trader wants to restart everything again without restarting the adviser, you need to turn off this mode, approve it and then turn it on again.

>>    Always show Panel for limiting trading by PRICES
For this type of trade, a separate information panel is created, which allows you to fully control all the specified conditions.

With its help, various useful information (related to the control of a given price range) is displayed on the chart, which allows you to better control the trading situation. The panel has its own color indicator of various events, which simultaneously serves as a button for minimizing and expanding the panel. The panel can be easily moved around the chart simply by dragging it with the mouse, and after the panel is collapsed, the remaining indicator button can be placed in any place convenient for you, for example, on the top panel. In this case, using the Shift + Left Mouse Click combination at any time, you can bring the panel (or its button) to the foreground.

When this trading mode is activated, this information panel will be enabled in any case (even if this setting is set to <false>). This is done in order to provide the maximum possible control (over this type of trade) by default. At the same time, in order to use the information capabilities of this panel even before starting this mode (for example, for a preliminary visual selection of settings or for manual trading), you need to set the value here to <true>, and then the panel will be displayed even if this trading mode is disabled.
  
The panel has its own separate zoom setting. It is also worth paying special attention to tooltips in some lines of the panel, which can convey additional information.
>>     Start Price (Bid) to start trading
Here you can set the price, upon touching which (the market value of Bid) the EA grid will be deployed (the EA will start its trading).

The starting price is the main trigger for the EA to start trading in this mode. If this price is not set (it will be equal to 0), then it will be generated automatically (depending on the other settings described below). If the value is -1, the current Bid value will be fixed as the starting price and trading will start immediately.

The starting price is logically in no way connected with the upper or lower limit of the specified price range. That is, it can be used even without defining these price limits. In this case, the EA will simply start its normal trading when the market Bid reaches the specified value (without any additional restrictions).

The fixed value of the starting price can always be viewed in the information panel. At the same time, the color marking of this line allows you to quickly determine whether the market price has already reached the starting price (trading in the active phase) or not yet.

>>    Upper Range Price (Bid)
The upper price of the specified price range, in which the EA is allowed to trade. The value of this setting can only be positive or equal to 0. If set to zero, the set range will not have an upper limit, and thus this setting will be ignored.

If the upper limit is set (its value must be higher than the current Bid value), a line will be displayed on the chart, which will allow you to visually track the specified limit relative to the price scale. At the same time, this line can be freely moved up or down with the mouse at any time, which allows you to quickly and visually adjust the price range without the need to open the general settings window. At the same time, after moving the price border with the mouse, the value and color(!) of the line with its digital display will change in the information panel (for this mode). This is done so that the trader understands at a glance at the panel that the actual value of the upper limit no longer matches the value set in the general settings (displayed in the tooltip).

This price can be the only one of all other price values for this mode. Read more about this and various other combinations of settings for this type of trading at the end of this page  >>

>>    Lower Range Price (Bid)
The lower price of the specified price range, in which the EA is allowed to trade. The value of this setting can only be positive or equal to 0. If set to zero, the lower limit for the specified range will not be, and thus this setting will simply be ignored.

If the lower limit is set (its value must be lower than the current Bid value), a line will be displayed on the chart, which will allow you to visually track the specified limit relative to the price scale. At the same time, this line can be freely moved up or down with the mouse at any time, which allows you to quickly and visually adjust the price range without the need to open the general settings window. At the same time, after moving the price border with the mouse, the value and color(!) of the line with its digital display will change in the information panel (for this mode). This is done in order for the trader to understand at a glance at the panel that the actual value of the lower limit no longer matches the value set in the general settings (displayed in a tooltip).

This price can be the only one of all other price values for this mode. Read more about this and various other combinations of settings for this type of trading at the end of this page  >>
>>    Trailing-Stop value for the UPPER  Limit (in points)
This setting allows you to enable automatic shifting of the upper price limit following the Bid market value (at the distance specified in this setting, expressed in points). Visually, this is displayed in the automatic movement of the upper limit line on the chart at the moments when this distance is greater than the specified one (same as in the classic Trailing-Stop mode for individual market positions).

The value can only be positive or equal to 0. If set to zero, the trailing stop will be disabled. A value greater than zero will mean the number of pips up to the market Bid value (DOWN).

This value can be the only one of all other values associated with price labels. That is, you can simply set the trailing stop value without setting any other fields, and then the upper limit will be generated automatically at a given distance and will shift in accordance with its algorithm. The starting price, in this case, will be the current Bid, and trading will begin immediately.

Activating this setting does not cancel the ability to move the upper price limit with the mouse (for example, in order to move it closer to the market Bid value, or move it further away again).
>>    Trailing-Stop value for the LOWER Limit (in points)
This setting allows you to enable automatic shifting of the lower price limit following the Bid market value (at the distance specified in this setting, expressed in points). Visually, this is displayed in the automatic movement of the lower limit line on the chart at the moments when this distance is greater than the specified one (same as in the classic Trailing-Stop mode for individual market positions).

The value can only be positive or equal to 0. If set to zero, the trailing stop will be disabled. A value greater than zero will mean the number of pips up to the market Bid value (UP).

This value can be the only one of all other values associated with price labels. That is, you can simply set the trailing stop value without setting other fields in any way, and then the lower border will be generated automatically at a given distance and will shift in accordance with its algorithm. The starting price, in this case, will be the current Bid, and trading will begin immediately.

Activating this setting does not cancel the ability to move the lower price limit with the mouse (for example, in order to move it closer to the market Bid value, or move it further away).
>>    Price Panel scale

Scaling the information panel for a given trading mode (increase or decrease).

>>    Selecting deletion mode if out of range (after start)
Using this setting, you can choose which market positions or pending orders should be closed or deleted after the Bid market value goes beyond the specified price limits. At the same time, the adviser will continue to do this until the trader turns off this mode, or unloads the adviser from the chart.

<  Do not Delete or Close anything  >
No actions with orders and positions are required. In this case, the EA will simply stop auto-updating its price levels.


<  ALL Expert's Pending Orders  > 

Deleting only pending orders of the Expert Advisor on the current currency instrument

<  ALL Expert's Market Positions  >

Closing only market positions of the adviser on the current currency instrument

<  ALL Expert's Orders AND Positions  >

Deleting all pending orders and market positions of the Expert Advisor on the current currency instrument


<  All Pending Orders of This Symbol  > 

Deleting all pending orders on the current currency instrument

<  All Market Positions of This Symbol  >

Closing all market positions on the current currency instrument

<  All Orders AND Positions of This Symbol  >

Deleting all pending orders and market positions on the current currency instrument


<  ALL Pending Orders of Account  >

Deleting all pending orders on the entire account

<  ALL Market Positions of Account  >

Closing all market positions on the current account on the entire account

<  All Orders AND Positions of Account  >

Deleting all pending orders and market positions on the entire account

Technical description of various combinations of settings

Set of settings:   If no values are set
Starting Price           = 0  or -1
Upper Range Price    = 0 
Lower Range Price    = 0 
UPPER Trailing-Stop  = 0
LOWER Trailing-Stop = 0

Result:   Alert  (there is no point in such settings)

Set of settings:  If there is NO starting price and only the UPPER limit is set
Starting Price           = 0 
Upper Range Price    > 0 (or = 0 and UPPER Trailing-Stop > 0)
Lower Range Price    = 0 
UPPER Trailing-Stop  = 0 (or > 0)

LOWER Trailing-Stop = 0

Result:   

If, at the time of the start, the market value of Bid is below than the declared upper limit ((and) or a Trailing-Stop of the upper limit is set), the starting price will be equal to the current Bid value, and the EAs grid will be deployed (if it is set in other settings) immediately. Closing of market positions and/or deletion of pending orders (if it is set for this mode) occurs, when the market Bid goes beyond the upper limit.

If, at the time of the start, the market value of Bid is higher than the declared upper limit, the starting price will be equal to the value of the upper limit, and the EA grid (if it is set in other settings) will be deployed, when the market Bid touches this starting price (upper limit). Closing of market positions and/or deletion of pending orders (if it is set for this mode) occurs, when the market Bid goes beyond the upper limit (after activation of the starting price).

Set of settings:  If there is NO starting price and only the LOWER limit is set
Starting Price           = 0 
Upper Range Price    = 0
Lower Range Price    > 0 (or = 0 and LOWER Trailing-Stop > 0)
UPPER Trailing-Stop  = 0 

LOWER Trailing-Stop = 0 (or > 0)

Result:   

If, at the time of the start, the market value of Bid is higher than the declared lower limit ((and) or a Trailing-Stop of the lower limit is set), the starting price will be equal to the current Bid value, and the EAs grid will be deployed (if it is set in other settings) immediately. Closing of market positions and/or deletion of pending orders (if it is set for this mode) occurs, when the market Bid goes beyond the lower limit.

If, at the time of the start, the market value of Bid is lower than the declared lower limit, the starting price will be equal to the value of the lower limit, and the EA grid (if it is set in other settings) will be deployed, when the market Bid touches this starting price (lower limit). Closing of market positions and/or deletion of pending orders (if it is set for this mode) occurs, when the market Bid goes beyond the lower limit (after activation of the starting price).

Set of settings:  If there is NO starting price and BOTH price limits are set
Starting Price           = 0 
Upper Range Price    > 0 (or = 0 and UPPER Trailing-Stop > 0)
Lower Range Price    > 0 (or = 0 and LOWER Trailing-Stop > 0)
UPPER Trailing-Stop  = 0 (or > 0)

LOWER Trailing-Stop = 0 (or > 0)

Result:   

If, at the time of the start, the market value of Bid is within the specified price range, the starting price will be equal to the current Bid value, and the EA grid will be deployed (if it is set in other settings) immediately. Closing of market positions and/or deletion of pending orders (if it is set for this mode) occurs, when the market Bid goes beyond the upper or lower limit.

If, at the time of the start, the market value of Bid is higher than the declared upper limit, the starting price will be equal to the value of the upper limit, and the EA grid (if it is set in other settings) will be deployed, when the market Bid touches this starting price (upper limit). Closing of market positions and/or deletion of pending orders (if it is set for this mode) occurs, when the market Bid goes beyond the upper limit (after activation of the starting price).

If, at the time of the start, the market value of Bid is lower than the declared lower limit, the starting price will be equal to the value of the lower limit, and the EA grid (if it is set in other settings) will be deployed, when the market Bid touches this starting price (lower limit). Closing of market positions and/or deletion of pending orders (if it is set for this mode) occurs, when the market Bid goes beyond the lower limit (after activation of the starting price).

Set of settings:  If there is a starting price, but there are NO price limits
Starting Price           > 0 
Upper Range Price    = 0 
Lower Range Price    = 0 
UPPER Trailing-Stop  = 0 

LOWER Trailing-Stop = 0 

Result:   

The EA grid will be deployed, when the market Bid touches the starting price set in the settings. Automatic closing of market positions and/or deletion of pending orders (for this mode) is not available, since the boundaries for the end of trading are not defined.

Set of settings:  If there is a starting price and only the UPPER limit is set
Starting Price           > 0 
Upper Range Price    > 0 (or = 0 and UPPER Trailing-Stop > 0)
Lower Range Price    = 0 
UPPER Trailing-Stop  = 0 (or > 0)

LOWER Trailing-Stop = 0

Result:   

If the starting price is set ABOVE the upper limit:   Alert

If the starting price is set UNDER the upper limit, the EA grid will be deployed (if it is set in other settings), when the market Bid touches the starting price. Closing of market positions and/or deletion of pending orders (if it is set for this mode) occurs, when the market Bid goes beyond the upper limit (after activation of the starting price).

Set of settings:  If there is a starting price and only the LOWER limit is set
Starting Price           > 0 
Upper Range Price    = 0 
Lower Range Price    > 0 (or = 0 and LOWER Trailing-Stop > 0)  
UPPER Trailing-Stop  = 0 

LOWER Trailing-Stop = 0 (or > 0)

Result:   

If the starting price is set UNDER the lower limit:   Alert

If the starting price is set ABOVE the lower limit, the EA grid will be deployed (if it is set in other settings), when the market Bid touches the starting price. Closing of market positions and/or deletion of pending orders (if it is set for this mode) occurs, when the market Bid goes beyond the lower limit (after activation of the starting price).

Set of settings:  If there is a starting price and BOTH price limits are set
Starting Price           > 0 
Upper Range Price    > 0 (or = 0 and UPPER Trailing-Stop > 0)
Lower Range Price    > 0 (or = 0 and LOWER Trailing-Stop > 0)  
UPPER Trailing-Stop  = 0 (or > 0)

LOWER Trailing-Stop = 0 (or > 0)

Result:   

If the starting price is set ABOVE the Upper limit:   Alert

If the starting price is set UNDER the Lower limit:   Alert

If the starting price is set within the specified range, the EA grid will be deployed (if it is set in other settings), when the market Bid touches the starting price. Closing of market positions and/or deletion of pending orders (if it is set for this mode) occurs, when the market Bid goes beyond the upper or lower limit (after activation of the starting price).

Share it with friends: