<xml xmlns="https://developers.google.com/blockly/xml" is_dbot="true" collection="false">
  <variables>
    <variable id="stake">Stake</variable>
    <variable id="prediction">Prediction</variable>
  </variables>
  <block type="trade_definition" id="trade-definition" deletable="false" x="20" y="20">
    <statement name="TRADE_OPTIONS">
      <block type="trade_definition_market" id="market" 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="trade-type" deletable="false" movable="false">
            <field name="TRADETYPECAT_LIST">digits</field>
            <field name="TRADETYPE_LIST">matchesdiffers</field>
            <next>
              <block type="trade_definition_contracttype" id="contract-type" deletable="false" movable="false">
                <field name="TYPE_LIST">both</field>
                <next>
                  <block type="trade_definition_candleinterval" id="interval" deletable="false" movable="false">
                    <field name="CANDLEINTERVAL_LIST">60</field>
                    <next>
                      <block type="trade_definition_restartbuysell" id="restart-buy-sell">
                        <field name="TIME_MACHINE_ENABLED">FALSE</field>
                        <next>
                          <block type="trade_definition_restartonerror" id="restart-error">
                            <field name="RESTARTONERROR">FALSE</field>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </next>
              </block>
            </next>
          </block>
        </next>
      </block>
    </statement>
    <statement name="INITIALIZATION">
      <block type="variables_set" id="set-stake">
        <field name="VAR" id="stake">Stake</field>
        <value name="VALUE">
          <block type="math_number" id="stake-value">
            <field name="NUM">1</field>
          </block>
        </value>
        <next>
          <block type="variables_set" id="set-prediction">
            <field name="VAR" id="prediction">Prediction</field>
            <value name="VALUE">
              <block type="math_number" id="prediction-value">
                <field name="NUM">7</field>
              </block>
            </value>
          </block>
        </next>
      </block>
    </statement>
    <statement name="SUBMARKET">
      <block type="trade_definition_tradeoptions" id="trade-options">
        <mutation xmlns="http://www.w3.org/1999/xhtml" has_first_barrier="false" has_second_barrier="false" has_prediction="true"></mutation>
        <field name="DURATIONTYPE_LIST">t</field>
        <value name="DURATION">
          <shadow type="math_number" id="duration"><field name="NUM">1</field></shadow>
        </value>
        <value name="AMOUNT">
          <block type="variables_get" id="get-stake"><field name="VAR" id="stake">Stake</field></block>
        </value>
        <value name="PREDICTION">
          <block type="variables_get" id="get-prediction"><field name="VAR" id="prediction">Prediction</field></block>
        </value>
      </block>
    </statement>
  </block>
  <block type="before_purchase" id="before-purchase" deletable="false" x="20" y="600">
    <statement name="BEFOREPURCHASE_STACK">
      <block type="purchase" id="purchase-once">
        <field name="PURCHASE_LIST">DIGITDIFF</field>
      </block>
    </statement>
  </block>
  <block type="after_purchase" id="after-purchase" deletable="false" x="20" y="760">
    <statement name="AFTERPURCHASE_STACK">
      <block type="notify" id="trade-complete">
        <field name="NOTIFICATION_TYPE">info</field>
        <field name="NOTIFICATION_SOUND">silent</field>
        <value name="MESSAGE">
          <shadow type="text" id="complete-message"><field name="TEXT">DIGIT DIFFER trade complete — review the result table.</field></shadow>
        </value>
      </block>
    </statement>
  </block>
</xml>
