Alpha Grid MT5:   Profit and Loss tracking

Alpha Grid MT5: Profit and Loss tracking

10 March 2024, 07:10
Aliaksandr Charkes
0
122

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

Description of settings related to Profit and Loss Tracking

This section describes the EA abilitys to finalize trade upon reaching the specified Profit or Loss level.

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 

The upper level is treated as a take profit, the lower one as a stop loss. At the same time, the use of at least one of these levels in this trading mode is mandatory! The values for them are set in money (not in points!), and the calculation of profit takes into account already closed positions since the start of trading (not only for existing positions).

After reaching any of the specified limits, the EA stops auto-updating its price levels. Also, mass closing of market positions or deletion of pending orders in various combinations can be carried out. 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.

To restart this mode, just turn it off and on again, or configure the automatic restart mode  >>

This type of trading can be used simultaneously with any other trading types supported by the EA.



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.



Description of Settings 

>>    Activation Mode of limiting trading by PROFIT
Activation of the trading mode with profit tracking. 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 specified limit has been reached, 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 Profit
For this mode, a separate information panel is created, which allows you to fully control all the specified conditions.

With its help, various useful information is displayed on the chart (related to profit tracking), 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 (with this type of trade) by default. And 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, and its color settings can be used to quickly visually separate a running EA while using it on different charts. It is also worth paying special attention to tooltips in some lines of the panel, which can convey important additional information with various auxiliary calculations.

>>    Profit Type for Limiting Trading
This setting determines the type of profit that the EA starts tracking from the start of this mode.

Several types of profit tracking are supported:

< Account Equity > 

Profit tracking mode based on the value that is displayed in the status bar of the terminal called "Equity". Equity is ALL free funds for the TOTAL ACCOUNT at the current moment. That is, it is this value, in real time, that shows the free funds available for withdrawal. This mode can be used and combined with manual trading and trading with other Expert Advisors.

< Full_Profit_for_EA_Magic_From_Start_Time >  

Profit tracking mode only for EA market positions (with the same magic number) and only on the current currency instrument. 

< Full_Profit_for_ThisSymbol_From_Start_Time > 

Profit tracking mode for ALL market positions, but only for the CURRENT currency instrument (on which the EA trades). This mode can be used or combined with manual trading and trading with other Expert Advisors.

>>    Type of Start Time for limiting trading by Profit

This setting allows you to define the type of start time for the selected profit tracking mode.

< Current_Server_Time >

Instant start of the profit tracking mode (after turning it on) with automatic fixation of the current SERVER time as a reference point.

< Selected_Server_Time >  

The start time will be set manually using the additional setting (line below).

>>    Start Time, if you choose:  <<  SELECTED Server's Time  >>
This setting will only work in manual start time selection mode (if < Selected_Server_Time > is selected in the setting above)

Here you can set any time to start tracking profits. Moreover, this time can be chosen not only in the future, but also in the past. In the first case, the profit will be taken into account only from the moment of the start time, and in the second case, the profit of already closed positions (from the specified time) will be taken into account.

>>    Allow use Take-Profit value (above current profit level)
This setting enables or disables the very ability to track a given Take-Profit (in the deposit currency for a given type of profit). It is needed because the take profit can be not only positive, but also zero and negative. This makes it possible to set a given limit even in cases where the trader just wants to exit the trade with minimal losses.
>>    Allow use Stop-Loss value (below current profit level)
This setting enables or disables the ability to track the specified Stop-Loss (in the deposit currency for the specified profit type). It is needed because the stop loss can be not only negative (to limit losses), but also zero and positive. This makes it possible to fix the already accumulated profit at the moments of its decrease, and also allows using a trailing stop (which is set in the settings below).
>>    Take-Profit for Full Profit value (in account currency)
The Take-Profit value for this mode, expressed in the deposit currency. In other words, this is the UPPER limit of the money range, which must initially be set ABOVE the current level of the selected type of profit.

At the same time, Take-Profit can be not only positive, but also zero and negative. This makes it possible to set a given limit even in cases where the trader just wants to exit the trade with minimal losses.

If Take-Profit control is disabled, the value in this setting does not affect anything.
>>    Stop-Loss for Full Profit value (in account currency)
Stop-Loss value for this mode, expressed in the deposit currency. In other words, this is the LOWER limit of the money range, which must initially be set under the current level of the selected type of profit.

At the same time, Stop-Loss can be not only negative, but also zero and positive. This makes it possible to fix the already accumulated profit at the moments of its decrease, and also allows using the Trailing-Stop.

If Stop-Loss control is disabled, the value in this setting does not affect anything.

>>    Trailing Stop Mode
Trailing-Stop, like all other levels, is set in money (not in points!). And it can move the lower limit of the money range at a specified (in the settings) distance from the current profit level.

Dictionary:

Full (current) profit - the total amount of the selected type of profit, calculated for the current moment

Net profit - net profit calculated at the current moment (zero is the boundary after which the value of net profit is considered positive)

Trailing value - Trailing-Stop value in the settings (in the deposit currency). The value can NOT be negative.




<  Trailing Stop OFF  >

Trailing Stop mode disabled



<  Start when (NET Profit - Trailing value) will be Positive  >  (this mode is only available for MT5 versions)

Trailing-Stop start signal:

Trailing-Stop is enabled only if the difference  (NET profit - trailing value) is positive 

Algorithm for Shifting the lower border after the start of the Trailing-Stop:

If (NET profit - trailing value) > already fixed value

Signal to End trading after the start of the Trailing-Stop:

End of trading by Trailing-Stop or Take-Profit



<  Start when (Full Profit - Trailing value) will be Positive  > 

Trailing-Stop start signal:

Trailing-Stop is enabled only if the difference  (NET profit - trailing value) is positive 

Algorithm for Shifting the lower border after the start of the Trailing-Stop:

If (FULL profit - trailing value) > already fixed value

Signal to End trading after the start of the Trailing-Stop:

End of trading by Trailing-Stop or Take-Profit



<  Start from Any value of Full Profit  > 

Trailing-Stop start signal:

Trailing-Stop is activated immediately when this mode is enabled

Algorithm for Shifting the lower border after the start of the Trailing-Stop:

If (FULL profit - trailing value) > already fixed value

Signal to End trading after the start of the Trailing-Stop:

End of trading by Trailing-Stop or Take-Profit



<  Start when declared Take-Profit value reached  > 

Trailing-Stop start signal:

Trailing-Stop is activated when the Take Profit-level specified in the settings is reached

Algorithm for Shifting the lower border after the start of the Trailing-Stop:

If (FULL profit - trailing value) > already fixed value

Signal to End trading after the start of the Trailing-Stop:

End of trading only by Trailing-Stop



<  Start after reaching the declared TakeProfit + Trailing  >

Trailing-Stop start signal:

Trailing-Stop is activated when the Take-Profit level specified in the settings + the specified Trailing value is reached

Algorithm for Shifting the lower border after the start of the Trailing-Stop:

If (FULL profit - trailing value) > already fixed value

Signal to End trading after the start of the Trailing-Stop:

End of trading only by Trailing-Stop



<  Trailing after TakeProfit or TakeProfit if Full Profit back  >

Trailing-Stop start signal:

Trailing-Stop is activated when the Take-Profit level specified in the settings + the specified Trailing value is reached

Algorithm for Shifting the lower border after the start of the Trailing-Stop:

If (FULL profit - trailing value) > already fixed value

Signal to End trading after the start of the Trailing-Stop:

End of trading by Trailing-Stop or Take-Profit, if the profit decreases again to Take-Profit, after it passes

>>    Trailing Stop Value  (in account currency)
Numeric value of the Trailing-Stop for this mode, expressed in the deposit currency. That is, the distance at which the lower limit of the money range (Stop-Loss) will begin to move behind the current level of the selected profit type is set here.

This value can only be positive.

If Trailing Stop is disabled, the value in this setting has no effect.

>>     Control Panel scale 
Scaling the information panel for a given trading mode (increase or decrease)
>>    Panel title text color 
Panel header background color
>>    Panel header background color
Information panel header background color for this trading mode
>>    Panel main background color
The color of the main background of the information panel for this trading mode

>>    Selecting deletion mode after reaching the limit
With this setting, you can choose which market positions or pending orders should be closed or deleted after reaching the specified profit level. At the same time, the EA will continue to do this until the trader turns off this mode, or unloads the EA 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 EA Orders AND Positions  >
Deleting all pending orders and market positions of the Expert Advisor for the current currency instrument

<  EA Market Positions Total  >
Closing only market positions of the  Expert Advisor for the current currency instrument

<  EA Pending Orders Total  >  

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

<  EA BUY Market Positions Only  >

Closing only market positions of the BUY type EA for the current instrument

<  EA SELL Market Positions Only  >
Closing only market positions of the SELL type EA for the current instrument


<  ALL SYMBOL Orders AND Positions  >
Deleting all pending orders and market positions for the current currency INSTRUMENT

<  SYMBOL Market Positions Total  >
Closing all market positions for the current currency INSTRUMENT

<  SYMBOL Pending Orders Total  > 

Deleting all pending orders for the current currency INSTRUMENT

<  SYMBOL BUY Market Positions Only  >

Closing only market positions of the BUY type for the current INSTRUMENT

 SYMBOL SELL Market Positions Only  >
Closing only market positions of the SELL type for the current INSTRUMENT


<  ALL ACCOUNT Orders AND Positions  >

Deleting all pending orders and market positions for the entire ACCOUNT

<  ACCOUNT Market Positions Total  >
Closing all market positions on the current account for the entire ACCOUNT

<  ACCOUNT Pending Orders Total  >

Deleting all pending orders for the entire ACCOUNT

<  ACCOUNT BUY Market Positions Only  >

Closing only market positions of the BUY type for the entire ACCOUNT

 ACCOUNT SELL Market Positions Only  >
Closing only market positions of the SELL type for the entire ACCOUNT