Instructions and description AW_Turtles_EA

Instructions and description AW_Turtles_EA

16 November 2023, 21:22
AW Trading Software Limited
0
382

AW_Turtles_EA is a fully automated trading system that works according to the "AW_Turtles" indicator strategy. Signals to enter a position   at the moment of breakdown of the support or resistance level. The advisor has the ability to average, the function of closing the first and last orders of the basket, and the function of automatic lot calculation. There are different scenarios for exiting a position using several StopLoss, Traling and TakeProfit options.


Buy the advisor "AW_Turtles_EA":

MT4 version

👉 https://www.mql5.com/en/market/product/107027


Attention! Indicator elements are visible only if the free AW Turtles indicator is running.  

AW Turtles EA   uses trading functions and accesses the built-in indicator to obtain data for trading , the product does not display indicator elements. If you want to see indicator labels, then you need to separately load the indicator onto the chart.

When using an advisor and an indicator, you must separately configure the indicator built into the advisor and the external indicator.

Download the free indicator "AW_Turtles":

MT4 version

👉 https://www.mql5.com/en/market/product/60307

MT5 version

👉 https://www.mql5.com/en/market/product/27568


- - -

1) Opening orders

This product allows you to open orders using several averaging options or work without averaging.  

Available work options:
  • Without_averaging - When choosing this option, the advisor will not use the averaging strategy. That is, only one order will be opened.
  • Fixed_Step - This option will allow you to use a fixed step between opened orders, the adviser will use an averaging strategy.

When choosing the "Fixed_Step" option, in the "Step_strategy" variable, enter the value for the distance between opened orders in one direction, in the "Fixed_step_(if_used)" variable, the step is calculated in points.

You can adjust the step between orders. The pitch is measured in points. This allows you to make your grid strategy more or less aggressive. The smaller the step, the more often the advisor's orders will be opened.

  • Step_by_ATR - When choosing this option, the advisor will calculate the distance between orders in the basket based on the volatility calculated by the ATR indicator. This option uses an averaging strategy.

When selecting " Step_by_ATR" enter the coefficient value for the ATR indicator in the variable "Step_ATR_K".

The recommended distance value is at least every 0.5 ATR.  

For example, the value on the selected ATR period is 600, when using "Step_ATR_K" equal to 0.5, the distance will be calculated as follows: 600 × 0.5 = 300, the step between orders will be 300 points. This value is dynamic and changes depending on the current volatility.


In order to select one of the described work options, use the variable "Step_strategy", in the "AVERAGING_SETTINGS" section


  • An order basket can be opened with orders of the same size, or the multiplication function can be used for the orders in the basket.

If "Multiplier" = 1.00, then do not use a multiplier. If "Multiplier" > 1.00, use the multiplication strategy, that is, increase the volume of each subsequent order in the basket.

Using a multiplier will increase the volume of each subsequent order by the coefficient that you set in the input variables. This variable allows you to adjust the volume of opened orders.


The "Multiplier_for_volume" variable is located in the input settings in the "AVERAGING SETTINGS" section .


Attention! If you work on highly volatile instruments, then do not set a small step between orders and a large volume multiplier, as this can lead to significant losses on your deposit in the event of prolonged unidirectional market movements.


- - -

2) Closing orders

This advisor has different options for working with TakeProfit, StopLoss and the Trailing function.

  • TakeProfit - the advisor has a built-in virtual type TakeProfit, this TakeProfit is used not for each individual order, but for a basket of orders in the same direction from the breakeven price. Virtual TakeProfit is not visible to the broker.

TakeProfit is measured in points, make sure that the size TakeProfit was greater than the spread on the instrument used. The lower the value, the faster the advisor will be able to close open positions, but the smaller the profit from each closing.

When deleting an advisor from the chart, the virtual TakeProfit is deleted along with the advisor, since it is part of the advisor. Virtual TakeProfit is visually visible only on the chart to which the advisor is attached, that is, it will not be displayed in a mobile terminal, or in a terminal running in another location.

TakeProfit   when using order baskets, will be calculated from the breakeven price of the entire basket, and not for each individual order.  


Variable "Size_of_Virtual_TakeProfit_(In_points)" is located in the input settings in the "TakeProfit_settings" section.


Setting up the StopLoss strategy. You can choose your strategy from the following:

  • Without_StopLoss - When choosing this option, the advisor will not use StopLoss. That is, orders will be closed only when TakeProfit is reached.
  • Fixed_StopLoss_ (From_first_order) - If you select the "Fixed_StopLoss" option, enter the value in points for StopLoss. The "Fixed_StopLoss" operating option uses a virtual stop loss from the opening price of the first order and works for a whole group of orders in the same direction. Virtual StopLoss is not visible to the broker.

When removing an advisor from the chart, the virtual StopLoss is deleted along with the advisor, since it is part of the advisor. Virtual StopLoss visually visible only on the chart to which the advisor is attached, that is, it will not be displayed in a mobile terminal, or in a terminal running in another location.

When choosing the "Fixed_StopLoss" option, in the "StopLoss_strategy" variable, enter the value for the distance between the opening price and StopLoss for each individual order, calculated in points.

  • StopLoss_by_ATR - Use StopLoss based on indicator signals. This option is not available when using the averaging function, meaning it only works for each individual order.
This type of StopLoss is set immediately after opening an order for each individual order. This StopLoss option is physical and not virtual. That is, when the advisor is removed from the chart, the stop loss line will remain on the chart and will be active for open positions.

    When working with the "StopLoss_by_ATR" strategy" in the variable "Stop_Loss_ATR_K", you need to set the distance based on ATR.

    The recommended distance value is not less than 1 ATR.  

    For example, the value on the selected period ATR is 600, when using " Stop_Loss_ATR_K " equal to 2 , the distance will be calculated as follows: 600   × 2 = 1200, this means the stop loss value will be equal to 1200 points. This value is dynamic and changes depending on the current volatility.

    • Trailing_by_Turtles_middle_line - Use Trailing along the middle line of the indicator. When opening an order, a physical stop loss is set on the middle line. This stop loss is set for each individual order.

    Next, Trailing will be pulled up with the specified step in the "Trailing_Step_in_points" variable. The difference between “ Trailing_by_Turtles_middle_line” and standard trailing is that in this EA, trailing is set not from the breakeven price, when the price goes into a loss, but immediately at the moment the order is opened from the middle line price.  

    That is, immediately at the moment of opening a market order, Trailing will be set for this order. Trailing moves StopLoss to follow the price when the price begins to move towards profit. Movement occurs with a step distance in points, determined by the variable "Trailing_Step_in_points". Trailing will follow the price an unlimited number of times as long as the unidirectional trend continues. Each time Trailing will be pulled up after passing the specified step value.

    After the price reversal, Trailing will close the position with a profit.


    Variable "StopLoss_strategy" is located in the input settings in the "StopLoss_settings" section.


    - - -

    3) Setting up the built-in indicator

    The indicator works according to the Turtle system; entry is made at the moment of breakdown of the support or resistance level.

    Setting up the indicator for the operation of the advisor is carried out in the input settings of the advisor.

    • Maximum_bars_Turtles   - Number of bars for calculating indicator statistics. A trend is monitored over a given time interval. Entry is made at the moment of breakdown of the support or resistance level from the specified number of bars.

    • Period_Donchian - The most important parameter for setting up signals is the channel period. Based on the previous point, the specified number of candles, from the lower to the upper price level. On channel breakouts, the built-in indicator receives signals about a trend reversal.
    The lower the value, the more indicator signals, but the accuracy of the signals decreases. The higher the value, the stricter the filtering and the fewer signals, but their accuracy is higher.  

    To configure, you need to set values for the "Period_Donchian" and "Maximum_bars_Turtles" variables in the "Signals_Settings" section.


    • Period_ATR - Variable required for setting only when working with the " StopLoss_by_ATR" or " Step_by_ATR" function. Period adjustment (Average True Range), default value is 24.

    As this indicator increases, the advisor will become less sensitive, the distance for the step or stop loss will increase, which is important for instruments with increased volatility. When the indicator decreases, the advisor will react more sensitively, the step or stop loss will have smaller distances, which is important for more aggressive scalping trading.


    - - -

    4) Additional features

    • Automatic lot calculation:

    The autolot function is configured by two variables:

    The first variable is "Enable_Autolot_calculation" - enable or disable the function of automatic calculation of open positions.    

    The second variable is "Autolot_deposit_per_0.01_lots". This means that for each volume specified in this variable there will be 0.01 lots for the opening volume of the first order.

    For example: your deposit is 1000 dollars, in the variable "Autolot_deposit_per_0.01_lots" you specified 1000. This means that the first order in the basket of orders will be opened with a volume of 0.01 lots, as soon as your deposit increases and becomes 2000 dollars, then the volume of the first order there will already be 0.02 lots in the basket, and so on, with a deposit volume of $3,000, the volume of the first order will be 0.03.

    If you specified 500 in the variable "Autolot_deposit_per_0.01_lots" and your current balance is $1000, then the first order will be opened with a volume of 0.02. Also, if your deposit subsequently decreases, the volume of the first order will also decrease in accordance with the setting.

    ! When enabling the autolot function, the "Size_of_the_order" variable will not work, since the volume of the first order will be flexible in accordance with the deposit volume.

    • Overlap:
    This is a function of overlapping the first order with the last one. This is a partial closure of a basket of orders in one direction. When using the overlap function, not the entire grid is closed, but only the very first unprofitable order. The first and last orders are closed using the profit of the most recent order from the grid. This reduces the total number of orders and also reduces the volume of the open lottage. This type of closure allows you to partially close the grid while covering a smaller distance in points.  

    Covering the first order with the last one works when the entire position is unprofitable. If, when the TakeProfit level of the first + last orders is reached, the entire position is in positive territory, then the advisor will not overlap, since it is possible to close the entire position.

    If, when the TakeProfit level of the first + last orders is reached, the entire position is in the red, the advisor will close the first and last orders.


    To activate the function, use the "True" mode in the "Use_overlap_last_and_first_orders" variable and enter the desired value in the "Use_overlap_after_that_number_of_orders" variable, in the "TakeProfit_settings" section.


    • Last lap function:

    If the trading day ends, the trader can disable the ability to open new orders. In this case, after completing the current round of orders, the advisor will only be able to close orders, new orders will not be opened.  

    When you select "True" in   using the "Allow_to_open_new_orders_after_close" variable, the advisor will open orders after closing the previous ones. If you select "false", the advisor will not be able to open new orders after closing the previous ones.


    The function is controlled by the variable "Allow_to_open_new_orders_after_close".


    • Limitation for opening orders of the current candle:

      Depending on the aggressiveness of the trader, the possibility of opening more than one order per candle can be adjusted using the variable "Maximum_1_order_per_candle".

      When selecting in a variable "Maximum_1_order_per_candle" option "false" the advisor will open new orders, as soon as the signal for opening occurs, more orders will be opened. In the event of sharp shop floor fluctuations, this option can be dangerous, since a large number of orders can be opened in a short time.

      Or for safer work, the advisor can open only one order per candle. This way, the number of orders will be limited; this option is safer in case of sharp price fluctuations. For this option in the variable "Maximum_1_order_per_candle" you need to select the "true" option.


      This limit is set in the "Protection_settings" section in the "Maximum_1_order_per_candle" variable.


      • Limiting the number of orders:
      The advisor has the ability to adjust the maximum number of orders in the basket in one direction. You can set the maximum number of orders in the basket. For example, if you enter a value of 4, the advisor will not be able to stretch the grid by more than 4 orders in one direction. This may be relevant during prolonged unidirectional market movements.

      To configure, go to   to the "Protection_settings" section and adjust the "Maximum_number_of_orders" variable " .


      - - -

      5) Graphic elements

      Graphic elements consist of a panel, text labels with information about the current balance and equity, and text labels when opening and closing orders indicating profit.


      1) Advisor panel - located in the upper left part of the screen. This arrangement is most convenient if you have an advisor and the "AW_Turtles" indicator running, since the indicator panel will be located under the advisor panel.

      • At the top right of this panel there is a button to minimize the panel. Clicking on it will minimize the panel as shown in the image above.
      • The upper part of the panel displays profit data for current positions in money.
      • This panel also contains information about swaps, spreads and drawdown percentages.
      • At the bottom there are buttons for closing Sell and Buy orders. Their work is shown in the image above.
      • If trading is not allowed or the markets are closed, the panel frame will turn red and the inscription “Trades_are_not_allowed” will appear at the bottom. This is shown in the image above.

      2)   The upper right corner of the screen displays information about the current balance and equity. When testing the product, information about the starting balance will also appear in this part.

      3) Additionally, on the chart, during the operation of the advisor, marks are displayed when opening and closing positions indicating profit, as well as marks about the location of breakeven, take profit, stop loss, and so on.


      - - -

      6) Input settings

      MAIN_SETTINGS - Setting volumes for opening positions.

      Size_of_the_first_order - Volume to open the first order. Used if "Enable_Autolot_calculation" is disabled.

      Enable_Autolot_calculation - Use automatic lot calculation. This function allows you to save risk settings when changing the deposit. If you use auto lot, then " Size_of_the_first_order" is not used.

      Autolot_deposit_per_0.01_lots - Deposit volume for every 0.01 when using autolot.

        SIGNALS_SETTINGS - Settings of the built-in indicator.

        Period_Donchian - Channel period. Based on the previous, specified number of candles, from the lower to the upper price level. On channel breakouts, the built-in indicator receives signals about a trend reversal. The lower the value, the more indicator signals.

        Maximum_bars_Turtles - Number of bars to calculate   indicator statistics.

        Period_ATR - Period adjustment (Average True Range). Default value is 24. Only used for calculating step and stop loss based on ATR.

        AVERAGING_SETTINGS - Setting up the averaging and animation functions.

        Step_strategy - Select the strategy for the distance between opened orders. Available options to choose from:

        • Fixed_Step - Use a fixed step between opened orders, use an averaging strategy.
        • Step_by_ATR - Use a step between orders based on volatility calculated by the ATR indicator.
        • Without_averaging - Do not use the averaging strategy.

        Fixed_step_(if_used) - When choosing the " Fixed_Step" option, in the " Step_strategy " variable, enter the value for the distance between opened orders in one direction.

        Step_ATR_K - When working with the "Step_by_ATR" strategy in the "Step_strategy" variable, you must set the distance based on ATR. The recommended distance value is at least every 0.5 ATR.

        Multiplier_for_volume - Multiplier for orders. Each subsequent order opened by the advisor in the order grid will be greater than the previous one by a given coefficient. Relevant when working with the use of an averaging strategy.

            TAKE_PROFIT_SETTINGS - Setting up TakeProfit and overlap to close positions.

            Size_of_Virtual_TakeProfit_(In_points) - Calculated for the current group of orders based on the breakeven price.

            Use_overlap_last_and_first_orders - Use the overlap of the first order with the last one.

            Use_overlap_after_that_number_of_orders - Use overlap after this number of open orders.

            STOP_LOSS_SETTINGS - Setting up the StopLoss function and Trailing.

            StopLoss_strategy - Select the StopLoss strategy.

            • StopLoss_by_ATR - Use StopLoss based on indicator signals. This option is not available when using the averaging function
            • Fixed_StopLoss - Use a fixed StopLoss for a group of orders, calculated from the price of the first order. That is, the entire basket of orders will be closed when this value is reached in points from the very first order of the current direction.
            • Without_StopLoss - Operation mode without using StopLoss.
            • Trailing_by_Turtles_middle_line - Use   Trailing along the middle line of the indicator. When opening an order, a stop loss is set on the middle line, then Trailing will be pulled up with the specified step specified in the "StopLoss_by_ATR" variable.

            Fixed_StopLoss_(if_used) - Enter the value in points for   StopLoss for each individual order. Used only when working in the " Fixed_StopLoss_(if_used)" mode.

            Stop_Loss_ATR_K - Enter the coefficient for calculating the distance of the StopLoss level, in points. Applies if the " StopLoss_by_ATR" operating option is selected.   The recommended distance value is not less than 1 ATR.

            Step_for_trailing_from_middle_line - Specify the distance in points after which the trailing will move following the price. Applies if the " Trailing_by_Turtles_middle_line" function is active.

            PROTECTION_SETTINGS - Adjustment of protective functions when opening positions.

            Maximum_slippage_in_points - Maximum allowed slippage in points for opening and closing orders.

            Maximum_spread_in_points - The maximum allowed spread for opening orders.

            Maximum_number_of_orders - The maximum allowed number of orders of the same type.

            Maximum_size_of_orders - Maximum volume for one order. Measured in lots.

            Maximum_1_order_per_candle - Open only one order per candle, relevant for sudden price movements. If you disable the function, the advisor can trade more aggressively without using a filter and will be able to open more than one order for the current candle.

              ADVISOR_SETTINGS - Setting up graphical functions and basic functions of the advisor.

              Orders_Magic_number - The main identifier of the advisor's orders. Used primarily to identify orders.  

              Comments_of_the_EA's_orders - Comments for the EA's orders.

              Allow_to_open_OP_BUY_orders - Allow the advisor to open orders of the OP_BUY type.

              Allow_to_open_OP_SELL_orders - Allow the advisor to open orders of the OP_SELL type.

              Allow_to_open_new_orders_after_close - Allow or prohibit the advisor from opening new orders after closing the basket. Disabled opening is useful when you plan to disable the advisor so that it can finish working with the current group of orders.

              Show_panel_of_advisor - Ability to show or hide the advisor panel.

              Font_size_in_panel - Adjust the font size on the panel.

              Profit_text_write - Adjust the font size on the chart, when displaying profit, when closing positions.

                NOTIFICATIONS_SETTINGS - Section for setting up notifications when closing orders.

                Send_push_notifications_when_close_orders - Allow sending notifications to the mobile version of the terminal. Letters are sent when orders are closed.

                Send_mails_when_close_orders - Allow sending emails to the user's email address. Letters are sent when orders are closed.

                Send_alerts_when_close_orders - Allow sending pop-up notifications on the user's terminal. Alerts are sent when orders are closed.  


                Buy the advisor "AW_Turtles_EA":

                MT4 version

                👉 https://www.mql5.com/en/market/product/107027



                AW Trading Software

                Telegram channel: https://t.me/AWSoftware