<xml xmlns="http://www.w3.org/1999/xhtml" is_dbot="true" collection="false">
  <variables>
    <variable type="" id="ppeoBaseStake" islocal="false" iscloud="false">Base Stake</variable>
    <variable type="" id="ppeoStake" islocal="false" iscloud="false">Stake</variable>
    <variable type="" id="ppeoRecoveryMul" islocal="false" iscloud="false">Recovery Multiplier</variable>
    <variable type="" id="ppeoMaxStake" islocal="false" iscloud="false">Max Stake</variable>
    <variable type="" id="ppeoLossStreak" islocal="false" iscloud="false">Loss Streak</variable>
    <variable type="" id="ppeoTakeProfit" islocal="false" iscloud="false">Take Profit</variable>
    <variable type="" id="ppeoMaxLoss" islocal="false" iscloud="false">Max Loss</variable>
    <variable type="" id="ppeoSide" islocal="false" iscloud="false">Side</variable>
    <variable type="" id="ppeoMessage" islocal="false" iscloud="false">Message</variable>
  </variables>

  <block type="trade_definition" id="ppeoTradeDef" deletable="false" x="0" y="0">
    <statement name="TRADE_OPTIONS">
      <block type="trade_definition_market" id="ppeoMarket" deletable="false" movable="false">
        <field name="MARKET_LIST">synthetic_index</field>
        <field name="SUBMARKET_LIST">random_index</field>
        <field name="SYMBOL_LIST">R_100</field>
        <next>
          <block type="trade_definition_tradetype" id="ppeoTradeType" deletable="false" movable="false">
            <field name="TRADETYPECAT_LIST">digits</field>
            <field name="TRADETYPE_LIST">evenodd</field>
            <next>
              <block type="trade_definition_contracttype" id="ppeoContractType" deletable="false" movable="false">
                <field name="TYPE_LIST">both</field>
                <next>
                  <block type="trade_definition_candleinterval" id="ppeoCandle" deletable="false" movable="false">
                    <field name="CANDLEINTERVAL_LIST">60</field>
                    <next>
                      <block type="trade_definition_restartbuysell" id="ppeoRestartBuy" deletable="false" movable="false">
                        <field name="TIME_MACHINE_ENABLED">FALSE</field>
                        <next>
                          <block type="trade_definition_restartonerror" id="ppeoRestartErr" deletable="false" movable="false">
                            <field name="RESTARTONERROR">TRUE</field>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </next>
              </block>
            </next>
          </block>
        </next>
      </block>
    </statement>

    <statement name="INITIALIZATION">
      <block type="variables_set" id="ppeoInitBase">
        <field name="VAR" id="ppeoBaseStake" variabletype="">Base Stake</field>
        <value name="VALUE" strategy_value="stake">
          <block type="math_number" id="ppeoNumBase">
            <field name="NUM">1</field>
          </block>
        </value>
        <next>
          <block type="variables_set" id="ppeoInitRecoveryMul">
            <field name="VAR" id="ppeoRecoveryMul" variabletype="">Recovery Multiplier</field>
            <value name="VALUE">
              <block type="math_number" id="ppeoNumRecoveryMul">
                <field name="NUM">2.1</field>
              </block>
            </value>
            <next>
              <block type="variables_set" id="ppeoInitMaxStake">
                <field name="VAR" id="ppeoMaxStake" variabletype="">Max Stake</field>
                <value name="VALUE" strategy_value="max_stake">
                  <block type="math_number" id="ppeoNumMaxStake">
                    <field name="NUM">2.1</field>
                  </block>
                </value>
                <next>
                  <block type="variables_set" id="ppeoInitTakeProfit">
                    <field name="VAR" id="ppeoTakeProfit" variabletype="">Take Profit</field>
                    <value name="VALUE" strategy_value="profit">
                      <block type="math_number" id="ppeoNumTakeProfit">
                        <field name="NUM">2</field>
                      </block>
                    </value>
                    <next>
                      <block type="variables_set" id="ppeoInitMaxLoss">
                        <field name="VAR" id="ppeoMaxLoss" variabletype="">Max Loss</field>
                        <value name="VALUE" strategy_value="loss">
                          <block type="math_number" id="ppeoNumMaxLoss">
                            <field name="NUM">6</field>
                          </block>
                        </value>
                        <next>
                          <block type="variables_set" id="ppeoInitStake">
                            <field name="VAR" id="ppeoStake" variabletype="">Stake</field>
                            <value name="VALUE">
                              <block type="variables_get" id="ppeoGetBaseInit">
                                <field name="VAR" id="ppeoBaseStake" variabletype="">Base Stake</field>
                              </block>
                            </value>
                            <next>
                              <block type="variables_set" id="ppeoInitStreak">
                                <field name="VAR" id="ppeoLossStreak" variabletype="">Loss Streak</field>
                                <value name="VALUE">
                                  <block type="math_number" id="ppeoNumStreak0">
                                    <field name="NUM">0</field>
                                  </block>
                                </value>
                                <next>
                                  <block type="variables_set" id="ppeoInitSide">
                                    <field name="VAR" id="ppeoSide" variabletype="">Side</field>
                                    <value name="VALUE">
                                      <block type="math_number" id="ppeoNumSide1">
                                        <field name="NUM">1</field>
                                      </block>
                                    </value>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </next>
              </block>
            </next>
          </block>
        </next>
      </block>
    </statement>

    <statement name="SUBMARKET">
      <block type="trade_definition_tradeoptions" id="ppeoTradeOptions">
        <mutation has_first_barrier="false" has_second_barrier="false" has_prediction="false"></mutation>
        <field name="DURATIONTYPE_LIST">t</field>
        <field name="CURRENCY_LIST">USD</field>
        <value name="DURATION" strategy_value="duration">
          <shadow type="math_number" id="ppeoDurationNum">
            <field name="NUM">1</field>
          </shadow>
        </value>
        <value name="AMOUNT">
          <shadow type="math_number" id="ppeoAmountShadow">
            <field name="NUM">1</field>
          </shadow>
          <block type="variables_get" id="ppeoGetStake">
            <field name="VAR" id="ppeoStake" variabletype="">Stake</field>
          </block>
        </value>
      </block>
    </statement>
  </block>

  <block type="before_purchase" id="ppeoBeforePurchase" x="0" y="800">
    <statement name="BEFOREPURCHASE_STACK">
      <block type="controls_if" id="ppeoIfSide">
        <mutation else="1"></mutation>
        <value name="IF0">
          <block type="logic_compare" id="ppeoSideCmp">
            <field name="OP">EQ</field>
            <value name="A">
              <block type="variables_get" id="ppeoSideGet">
                <field name="VAR" id="ppeoSide" variabletype="">Side</field>
              </block>
            </value>
            <value name="B">
              <block type="math_number" id="ppeoSideCmpNum">
                <field name="NUM">1</field>
              </block>
            </value>
          </block>
        </value>
        <statement name="DO0">
          <block type="purchase" id="ppeoPurchaseEven">
            <field name="PURCHASE_LIST">DIGITEVEN</field>
          </block>
        </statement>
        <statement name="ELSE">
          <block type="purchase" id="ppeoPurchaseOdd">
            <field name="PURCHASE_LIST">DIGITODD</field>
          </block>
        </statement>
      </block>
    </statement>
  </block>

  <block type="after_purchase" id="ppeoAfterPurchase" x="0" y="1100">
    <statement name="AFTERPURCHASE_STACK">
      <block type="controls_if" id="ppeoIfWin">
        <mutation else="1"></mutation>
        <value name="IF0">
          <block type="contract_check_result" id="ppeoCheckWin">
            <field name="CHECK_RESULT">win</field>
          </block>
        </value>

        <statement name="DO0">
          <block type="variables_set" id="ppeoWinResetStreak">
            <field name="VAR" id="ppeoLossStreak" variabletype="">Loss Streak</field>
            <value name="VALUE">
              <block type="math_number" id="ppeoWinStreak0">
                <field name="NUM">0</field>
              </block>
            </value>
            <next>
              <block type="variables_set" id="ppeoWinResetStake">
                <field name="VAR" id="ppeoStake" variabletype="">Stake</field>
                <value name="VALUE">
                  <block type="variables_get" id="ppeoWinGetBase">
                    <field name="VAR" id="ppeoBaseStake" variabletype="">Base Stake</field>
                  </block>
                </value>
              </block>
            </next>
          </block>
        </statement>

        <statement name="ELSE">
          <block type="math_change" id="ppeoLossBumpStreak">
            <field name="VAR" id="ppeoLossStreak" variabletype="">Loss Streak</field>
            <value name="DELTA">
              <shadow type="math_number" id="ppeoLossStreakDelta">
                <field name="NUM">1</field>
              </shadow>
            </value>
            <next>
              <block type="variables_set" id="ppeoFlipSide">
                <field name="VAR" id="ppeoSide" variabletype="">Side</field>
                <value name="VALUE">
                  <block type="math_arithmetic" id="ppeoFlipMinus">
                    <field name="OP">MINUS</field>
                    <value name="A">
                      <shadow type="math_number" id="ppeoFlipOne">
                        <field name="NUM">1</field>
                      </shadow>
                    </value>
                    <value name="B">
                      <shadow type="math_number" id="ppeoFlipShadow">
                        <field name="NUM">1</field>
                      </shadow>
                      <block type="variables_get" id="ppeoFlipGetSide">
                        <field name="VAR" id="ppeoSide" variabletype="">Side</field>
                      </block>
                    </value>
                  </block>
                </value>
                <next>
                  <block type="controls_if" id="ppeoIfStreak">
                    <mutation else="1"></mutation>
                    <value name="IF0">
                      <block type="logic_compare" id="ppeoStreakCmp">
                        <field name="OP">GTE</field>
                        <value name="A">
                          <block type="variables_get" id="ppeoStreakGet">
                            <field name="VAR" id="ppeoLossStreak" variabletype="">Loss Streak</field>
                          </block>
                        </value>
                        <value name="B">
                          <block type="math_number" id="ppeoStreakLimit">
                            <field name="NUM">2</field>
                          </block>
                        </value>
                      </block>
                    </value>

                    <statement name="DO0">
                      <block type="variables_set" id="ppeoGiveUpStake">
                        <field name="VAR" id="ppeoStake" variabletype="">Stake</field>
                        <value name="VALUE">
                          <block type="variables_get" id="ppeoGiveUpBase">
                            <field name="VAR" id="ppeoBaseStake" variabletype="">Base Stake</field>
                          </block>
                        </value>
                        <next>
                          <block type="variables_set" id="ppeoGiveUpStreak">
                            <field name="VAR" id="ppeoLossStreak" variabletype="">Loss Streak</field>
                            <value name="VALUE">
                              <block type="math_number" id="ppeoGiveUpStreak0">
                                <field name="NUM">0</field>
                              </block>
                            </value>
                          </block>
                        </next>
                      </block>
                    </statement>

                    <statement name="ELSE">
                      <block type="variables_set" id="ppeoRecoverStake">
                        <field name="VAR" id="ppeoStake" variabletype="">Stake</field>
                        <value name="VALUE">
                          <block type="math_arithmetic" id="ppeoRecoverMul">
                            <field name="OP">MULTIPLY</field>
                            <value name="A">
                              <shadow type="math_number" id="ppeoRecoverMulA">
                                <field name="NUM">1</field>
                              </shadow>
                              <block type="variables_get" id="ppeoRecoverGetStake">
                                <field name="VAR" id="ppeoStake" variabletype="">Stake</field>
                              </block>
                            </value>
                            <value name="B">
                              <shadow type="math_number" id="ppeoRecoverMulB">
                                <field name="NUM">2.1</field>
                              </shadow>
                              <block type="variables_get" id="ppeoRecoverGetMul">
                                <field name="VAR" id="ppeoRecoveryMul" variabletype="">Recovery Multiplier</field>
                              </block>
                            </value>
                          </block>
                        </value>
                        <next>
                          <block type="controls_if" id="ppeoIfCapStake">
                            <value name="IF0">
                              <block type="logic_compare" id="ppeoCapCmp">
                                <field name="OP">GT</field>
                                <value name="A">
                                  <block type="variables_get" id="ppeoCapGetStake">
                                    <field name="VAR" id="ppeoStake" variabletype="">Stake</field>
                                  </block>
                                </value>
                                <value name="B">
                                  <block type="variables_get" id="ppeoCapGetMax">
                                    <field name="VAR" id="ppeoMaxStake" variabletype="">Max Stake</field>
                                  </block>
                                </value>
                              </block>
                            </value>
                            <statement name="DO0">
                              <block type="variables_set" id="ppeoCapApply">
                                <field name="VAR" id="ppeoStake" variabletype="">Stake</field>
                                <value name="VALUE">
                                  <block type="variables_get" id="ppeoCapApplyBase">
                                    <field name="VAR" id="ppeoBaseStake" variabletype="">Base Stake</field>
                                  </block>
                                </value>
                                <next>
                                  <block type="variables_set" id="ppeoCapResetStreak">
                                    <field name="VAR" id="ppeoLossStreak" variabletype="">Loss Streak</field>
                                    <value name="VALUE">
                                      <block type="math_number" id="ppeoCapStreak0">
                                        <field name="NUM">0</field>
                                      </block>
                                    </value>
                                  </block>
                                </next>
                              </block>
                            </statement>
                          </block>
                        </next>
                      </block>
                    </statement>
                  </block>
                </next>
              </block>
            </next>
          </block>
        </statement>

        <next>
          <block type="text_join" id="ppeoJoinTotal">
            <field name="VARIABLE" id="ppeoMessage" variabletype="">Message</field>
            <statement name="STACK">
              <block type="text_statement" id="ppeoTsTotalA" movable="false">
                <value name="TEXT">
                  <shadow type="text" id="ppeoTxTotalA">
                    <field name="TEXT">Total profit:</field>
                  </shadow>
                </value>
                <next>
                  <block type="text_statement" id="ppeoTsTotalB" movable="false">
                    <value name="TEXT">
                      <shadow type="text" id="ppeoTxTotalB">
                        <field name="TEXT"></field>
                      </shadow>
                      <block type="total_profit" id="ppeoTotal1"></block>
                    </value>
                  </block>
                </next>
              </block>
            </statement>
            <next>
              <block type="notify" id="ppeoNotifyTotal">
                <field name="NOTIFICATION_TYPE">info</field>
                <field name="NOTIFICATION_SOUND">silent</field>
                <value name="MESSAGE">
                  <shadow type="text" id="ppeoMsgShadowA">
                    <field name="TEXT">abc</field>
                  </shadow>
                  <block type="variables_get" id="ppeoGetMsgA">
                    <field name="VAR" id="ppeoMessage" variabletype="">Message</field>
                  </block>
                </value>
                <next>
                  <block type="controls_if" id="ppeoIfTargets">
                    <mutation elseif="1" else="1"></mutation>
                    <value name="IF0">
                      <block type="logic_compare" id="ppeoCmpProfit">
                        <field name="OP">GTE</field>
                        <value name="A">
                          <block type="total_profit" id="ppeoTotal2"></block>
                        </value>
                        <value name="B">
                          <block type="variables_get" id="ppeoGetTakeProfit">
                            <field name="VAR" id="ppeoTakeProfit" variabletype="">Take Profit</field>
                          </block>
                        </value>
                      </block>
                    </value>
                    <statement name="DO0">
                      <block type="text_join" id="ppeoJoinTP">
                        <field name="VARIABLE" id="ppeoMessage" variabletype="">Message</field>
                        <statement name="STACK">
                          <block type="text_statement" id="ppeoTsTpA" movable="false">
                            <value name="TEXT">
                              <shadow type="text" id="ppeoTxTpA">
                                <field name="TEXT">Take profit reached, stopping. Total:</field>
                              </shadow>
                            </value>
                            <next>
                              <block type="text_statement" id="ppeoTsTpB" movable="false">
                                <value name="TEXT">
                                  <shadow type="text" id="ppeoTxTpB">
                                    <field name="TEXT"></field>
                                  </shadow>
                                  <block type="total_profit" id="ppeoTotal3"></block>
                                </value>
                              </block>
                            </next>
                          </block>
                        </statement>
                        <next>
                          <block type="notify" id="ppeoNotifyTPHit">
                            <field name="NOTIFICATION_TYPE">success</field>
                            <field name="NOTIFICATION_SOUND">silent</field>
                            <value name="MESSAGE">
                              <shadow type="text" id="ppeoMsgShadowB">
                                <field name="TEXT">abc</field>
                              </shadow>
                              <block type="variables_get" id="ppeoGetMsgB">
                                <field name="VAR" id="ppeoMessage" variabletype="">Message</field>
                              </block>
                            </value>
                          </block>
                        </next>
                      </block>
                    </statement>

                    <value name="IF1">
                      <block type="logic_compare" id="ppeoCmpLoss">
                        <field name="OP">LTE</field>
                        <value name="A">
                          <block type="total_profit" id="ppeoTotal4"></block>
                        </value>
                        <value name="B">
                          <block type="math_arithmetic" id="ppeoNegMaxLoss">
                            <field name="OP">MINUS</field>
                            <value name="A">
                              <shadow type="math_number" id="ppeoNegZero">
                                <field name="NUM">0</field>
                              </shadow>
                            </value>
                            <value name="B">
                              <shadow type="math_number" id="ppeoNegShadow">
                                <field name="NUM">6</field>
                              </shadow>
                              <block type="variables_get" id="ppeoGetMaxLoss">
                                <field name="VAR" id="ppeoMaxLoss" variabletype="">Max Loss</field>
                              </block>
                            </value>
                          </block>
                        </value>
                      </block>
                    </value>
                    <statement name="DO1">
                      <block type="text_join" id="ppeoJoinSL">
                        <field name="VARIABLE" id="ppeoMessage" variabletype="">Message</field>
                        <statement name="STACK">
                          <block type="text_statement" id="ppeoTsSlA" movable="false">
                            <value name="TEXT">
                              <shadow type="text" id="ppeoTxSlA">
                                <field name="TEXT">Stop loss reached, stopping. Total:</field>
                              </shadow>
                            </value>
                            <next>
                              <block type="text_statement" id="ppeoTsSlB" movable="false">
                                <value name="TEXT">
                                  <shadow type="text" id="ppeoTxSlB">
                                    <field name="TEXT"></field>
                                  </shadow>
                                  <block type="total_profit" id="ppeoTotal5"></block>
                                </value>
                              </block>
                            </next>
                          </block>
                        </statement>
                        <next>
                          <block type="notify" id="ppeoNotifySLHit">
                            <field name="NOTIFICATION_TYPE">error</field>
                            <field name="NOTIFICATION_SOUND">silent</field>
                            <value name="MESSAGE">
                              <shadow type="text" id="ppeoMsgShadowC">
                                <field name="TEXT">abc</field>
                              </shadow>
                              <block type="variables_get" id="ppeoGetMsgC">
                                <field name="VAR" id="ppeoMessage" variabletype="">Message</field>
                              </block>
                            </value>
                          </block>
                        </next>
                      </block>
                    </statement>

                    <statement name="ELSE">
                      <block type="trade_again" id="ppeoTradeAgain"></block>
                    </statement>
                  </block>
                </next>
              </block>
            </next>
          </block>
        </next>
      </block>
    </statement>
  </block>

  <block type="during_purchase" id="ppeoDuringPurchase" x="0" y="1900"></block>
</xml>
