Same Stake Recovery Over Under Deriv Bot

For a No Martingale, Same Stake Recovery Over/Under bot on Deriv, where the stake remains constant and recovery is achieved by switching between “Under” and “Over” trades after a loss, here’s the XML code you can use. This is designed for the Deriv Bot Builder platform and maintains the stake without doubling after losses, focusing on using trade prediction switching for recovery.

Key features of the bot

  1. Same Stake Recovery: The stake remains constant across all trades, regardless of wins or losses.
  2. Trade Type Switching: The bot starts by making Under trades. If a loss occurs, it switches to Over and continues this pattern.
  3. Profit Target: The session ends once the predefined profit target is reached (e.g., 10 USD). You can adjust the profit target in the <variable> section by changing the value of profit_target.
  4. No Martingale: The script avoids stake doubling and sticks to a consistent, fixed stake (e.g., 1 USD, which can be modified in the script).
  5. Profit Reset and Management: Each session starts by resetting the profit, and the bot only ends after the profit target is achieved.

XML Script for Same Stake Recovery Over/Under Bot

<!-- Define parameters -->
<parameters>
    <variable name="stake" type="decimal">1</variable> <!-- Fixed stake for all trades -->
    <variable name="profit_target" type="decimal">10</variable> <!-- Session profit target -->
    <variable name="trade_type" type="string">DIGITUNDER</variable> <!-- Start with Under -->
    <variable name="profit" type="decimal">0</variable> <!-- Track session profit -->
</parameters>

<!-- Main logic loop -->
<start>
    <!-- Reset profit before starting -->
    <reset name="profit" />
</start>

<!-- Main trading conditions -->
<conditions>

    <!-- Check profit target -->
    <condition>
        <if name="profit" condition="greaterThanOrEqual" value="{profit_target}">
            <action>terminate</action> <!-- Stop the bot when profit target is met -->
        </if>
    </condition>

    <!-- Trading sequence -->
    <condition>
        <!-- Place Under trade initially -->
        <if name="trade_type" condition="equals" value="DIGITUNDER">
            <action>
                <type>buy</type>
                <contractType>DIGITUNDER</contractType>
                <amount>{stake}</amount>
                <duration>1</duration>
                <barrier>0</barrier>
                <currency>USD</currency>
            </action>
        </if>

        <!-- Place Over trade after a loss -->
        <if name="trade_type" condition="equals" value="DIGITOVER">
            <action>
                <type>buy</type>
                <contractType>DIGITOVER</contractType>
                <amount>{stake}</amount>
                <duration>1</duration>
                <barrier>0</barrier>
                <currency>USD</currency>
            </action>
        </if>
    </condition>

    <!-- Handle trade results -->
    <onTradeEnd>

        <!-- Check for a win -->
        <if name="trade_result" condition="equals" value="win">
            <action>
                <!-- Add profit -->
                <set name="profit" value="{profit + stake}" />
                <!-- Reset to Under on win -->
                <set name="trade_type" value="DIGITUNDER" />
            </action>
        </if>

        <!-- Handle loss by switching trade type -->
        <if name="trade_result" condition="equals" value="loss">
            <action>
                <!-- Keep stake constant, switch to Over after loss -->
                <if name="trade_type" condition="equals" value="DIGITUNDER">
                    <set name="trade_type" value="DIGITOVER" />
                </if>
                <if name="trade_type" condition="equals" value="DIGITOVER">
                    <set name="trade_type" value="DIGITUNDER" />
                </if>
            </action>
        </if>
    </onTradeEnd>
</conditions>

<!-- Session management -->
<sessionManagement>
    <!-- Stop the session if the profit target is reached -->
    <stopWhenProfit>
        <amount>{profit_target}</amount>
    </stopWhenProfit>
</sessionManagement>

How to Use

  • Save as XML: Copy the XML code into a text editor and save it as same_stake_recovery_bot.xml.
  • Upload to Deriv: Open Deriv Bot. Import the XML file and start the bot in a demo environment to test.
  • Parameter Adjustments: Adjust the value of the stake variable based on your trading strategy. Modify profit_target if you’d like a different session profit goal.
  • Testing: Run tests in a demo environment first to ensure the strategy aligns with your risk tolerance and market conditions.

Leave a Comment