﻿<xml xmlns="http://www.w3.org/1999/xhtml" collection="false">
  <variables>
    <variable type="" id="/cV0vUE`Z0[#JG)VWwDR">_src</variable>
    <variable type="" id="()b2ss?z2^.H~R[q_L:[">_period</variable>
    <variable type="" id="Xk9%*3[Wz:;srD^rveQ+">_src1</variable>
    <variable type="" id="LTNkNk@+~C}`|AuB0j3E">_src2</variable>
    <variable type="" id="LY/c5hUhbBY*fn^cGHOD">_sum</variable>
    <variable type="" id="/Am~*pHa,wR41Rj3:8^d">list</variable>
    <variable type="" id="p`vW+s?m7}f](43^F-Y?">stake</variable>
    <variable type="" id="_11T3B@)~B^WDxgkDVX^">_norm</variable>
    <variable type="" id="TuA8n!u1nzngzh@5^Hg0">wmaRsc</variable>
    <variable type="" id="11.wD_PSy!RrQc]ZSa@M">Initial Amount</variable>
    <variable type="" id="lVj6(^2h@,do1i2TyE*4">i</variable>
    <variable type="" id="hfgoB{N|4/m*Ba/u]VLV">j</variable>
    <variable type="" id="kF`BJoWBD0nDo1~qgyh|">Mg</variable>
    <variable type="" id="E|7Sq2`H+kZ{`CP]*flq">_weight</variable>
  </variables>
  <block type="trade" id="xgH69|xFn9=70w.*3Vo@" x="-35" y="-353">
    <field name="MARKET_LIST">volidx</field>
    <field name="SUBMARKET_LIST">random_index</field>
    <field name="SYMBOL_LIST">R_100</field>
    <field name="TRADETYPECAT_LIST">touchnotouch</field>
    <field name="TRADETYPE_LIST">touchnotouch</field>
    <field name="TYPE_LIST">ONETOUCH</field>
    <field name="CANDLEINTERVAL_LIST">60</field>
    <field name="TIME_MACHINE_ENABLED">FALSE</field>
    <field name="RESTARTONERROR">TRUE</field>
    <statement name="INITIALIZATION">
      <block type="variables_set" id="Uxm~5+oTGPC$8DIt@1||">
        <field name="VAR" id="p`vW+s?m7}f](43^F-Y?" variabletype="">stake</field>
        <value name="VALUE">
          <block type="math_number" id="o2*l)(Pu-q@6gLg{isTv">
            <field name="NUM">3</field>
          </block>
        </value>
        <next>
          <block type="variables_set" id="5i*$6xRntqM%j_ra{397">
            <field name="VAR" id="11.wD_PSy!RrQc]ZSa@M" variabletype="">Initial Amount</field>
            <value name="VALUE">
              <block type="math_number" id="#Sg*Lcy_,{cq~C27IZDB">
                <field name="NUM">3</field>
              </block>
            </value>
            <next>
              <block type="variables_set" id="4Y9t+Oqun~8D5hik,%#Z">
                <field name="VAR" id="kF`BJoWBD0nDo1~qgyh|" variabletype="">Mg</field>
                <value name="VALUE">
                  <block type="math_number" id="N2jN`RE)pEtX/{E-]dnF">
                    <field name="NUM">7</field>
                  </block>
                </value>
              </block>
            </next>
          </block>
        </next>
      </block>
    </statement>
    <statement name="SUBMARKET">
      <block type="controls_whileUntil" id="rIUvMMOb^ERp9HC/iUBP">
        <field name="MODE">WHILE</field>
        <value name="BOOL">
          <block type="logic_operation" id="x`]8k#)JvQwJR)/$Hha*" inline="false">
            <field name="OP">AND</field>
            <value name="A">
              <block type="logic_compare" id="aa1Lmo[+I*Lt${P{5ujs">
                <field name="OP">EQ</field>
                <value name="A">
                  <block type="procedures_callreturn" id="cIcQ^VHZ,*`PRv$N_I!I">
                    <mutation name="crossUp">
                      <arg name="_src1"></arg>
                      <arg name="_src2"></arg>
                    </mutation>
                    <value name="ARG0">
                      <block type="procedures_callreturn" id="?-8,.RZir`tIR;I?;+6G">
                        <mutation name="ExMachina::GetWMAArray">
                          <arg name="_src"></arg>
                          <arg name="_period"></arg>
                        </mutation>
                        <value name="ARG0">
                          <block type="ohlc_values" id="piLO:B5ic5?Qvrr`e{,8">
                            <field name="OHLCFIELD_LIST">close</field>
                            <field name="CANDLEINTERVAL_LIST">default</field>
                          </block>
                        </value>
                        <value name="ARG1">
                          <block type="math_number" id="_?}B8`mwb~lWn*.E;bQ_">
                            <field name="NUM">14</field>
                          </block>
                        </value>
                      </block>
                    </value>
                    <value name="ARG1">
                      <block type="smaa" id="We_pV]ohNf0Wh4cs2Hl!">
                        <value name="INPUT">
                          <block type="ohlc_values" id="[YN$1`uH]=9EH8$FmY{j">
                            <field name="OHLCFIELD_LIST">close</field>
                            <field name="CANDLEINTERVAL_LIST">default</field>
                          </block>
                        </value>
                        <value name="PERIOD">
                          <shadow type="math_number" id="NUpG3^(Daj7|zD;w6h7o">
                            <field name="NUM">10</field>
                          </shadow>
                        </value>
                      </block>
                    </value>
                  </block>
                </value>
                <value name="B">
                  <block type="logic_boolean" id="3~rn3aDkpVf?c~zssz$m">
                    <field name="BOOL">FALSE</field>
                  </block>
                </value>
              </block>
            </value>
            <value name="B">
              <block type="logic_compare" id="Jh[3cHP[_*)c=_H{Z#$F">
                <field name="OP">EQ</field>
                <value name="A">
                  <block type="procedures_callreturn" id="ZZWl4O1c7_$B}wLoL~T_">
                    <mutation name="crossDown">
                      <arg name="_src1"></arg>
                      <arg name="_src2"></arg>
                    </mutation>
                    <value name="ARG0">
                      <block type="procedures_callreturn" id="XcgWuaw_Ooyk*5y0R~0V">
                        <mutation name="ExMachina::GetWMAArray">
                          <arg name="_src"></arg>
                          <arg name="_period"></arg>
                        </mutation>
                        <value name="ARG0">
                          <block type="ohlc_values" id="bR{`RWvwBbZesGUmB/a+">
                            <field name="OHLCFIELD_LIST">close</field>
                            <field name="CANDLEINTERVAL_LIST">default</field>
                          </block>
                        </value>
                        <value name="ARG1">
                          <block type="math_number" id="3i1@T_@k5(CzZRY]-n;A">
                            <field name="NUM">14</field>
                          </block>
                        </value>
                      </block>
                    </value>
                    <value name="ARG1">
                      <block type="smaa" id="2pAmh6~E-mYNBUJL3(rK">
                        <value name="INPUT">
                          <block type="ohlc_values" id="cfZG3(KkL@fq?_{|q}@.">
                            <field name="OHLCFIELD_LIST">close</field>
                            <field name="CANDLEINTERVAL_LIST">default</field>
                          </block>
                        </value>
                        <value name="PERIOD">
                          <shadow type="math_number" id="Y8E0,%_|XCZL1`=i}{lE">
                            <field name="NUM">10</field>
                          </shadow>
                        </value>
                      </block>
                    </value>
                  </block>
                </value>
                <value name="B">
                  <block type="logic_boolean" id="#9BC[y+6Z67]fNjP+[5l">
                    <field name="BOOL">FALSE</field>
                  </block>
                </value>
              </block>
            </value>
          </block>
        </value>
        <statement name="DO">
          <block type="timeout" id="`2JcwZZC00DfI#6[cit,">
            <value name="SECONDS">
              <shadow type="math_number" id="77m-.[,8,OeI8/SuzM1O">
                <field name="NUM">1</field>
              </shadow>
            </value>
          </block>
        </statement>
        <next>
          <block type="controls_if" id="H456~kE2Tf5!D*#sGy)Y">
            <mutation elseif="1"></mutation>
            <value name="IF0">
              <block type="procedures_callreturn" id="@A+2u;088g:JC53]f[F4">
                <mutation name="crossUp">
                  <arg name="_src1"></arg>
                  <arg name="_src2"></arg>
                </mutation>
                <value name="ARG0">
                  <block type="procedures_callreturn" id="RYf$Zt,]Nrat];F^,6[U">
                    <mutation name="ExMachina::GetWMAArray">
                      <arg name="_src"></arg>
                      <arg name="_period"></arg>
                    </mutation>
                    <value name="ARG0">
                      <block type="ohlc_values" id="IY95$.|pff.S2KXx|W;r">
                        <field name="OHLCFIELD_LIST">close</field>
                        <field name="CANDLEINTERVAL_LIST">default</field>
                      </block>
                    </value>
                    <value name="ARG1">
                      <block type="math_number" id="+3~b{O9sN$QfxhQeLrE*">
                        <field name="NUM">14</field>
                      </block>
                    </value>
                  </block>
                </value>
                <value name="ARG1">
                  <block type="smaa" id="VX}HS=]0(OHlSzm32yzo">
                    <value name="INPUT">
                      <block type="ohlc_values" id="#|3NX4oAW~_I3hR)NRt?">
                        <field name="OHLCFIELD_LIST">close</field>
                        <field name="CANDLEINTERVAL_LIST">default</field>
                      </block>
                    </value>
                    <value name="PERIOD">
                      <shadow type="math_number" id="0PY(q2YKP^OE5)a#Bm|#">
                        <field name="NUM">10</field>
                      </shadow>
                    </value>
                  </block>
                </value>
              </block>
            </value>
            <statement name="DO0">
              <block type="tradeOptions" id="x=V33~4Lb|(sLv`J[:Eb">
                <field name="DURATIONTYPE_LIST">m</field>
                <field name="CURRENCY_LIST">USD</field>
                <field name="BARRIEROFFSETTYPE_LIST">+</field>
                <value name="DURATION">
                  <shadow type="math_number" id="O*@58sDc=!cOO}*b2vf9">
                    <field name="NUM">5</field>
                  </shadow>
                </value>
                <value name="AMOUNT">
                  <shadow type="math_number" id="ml)25~7^q}3I9}vjf:%K">
                    <field name="NUM">3</field>
                  </shadow>
                  <block type="variables_get" id="cB_Zh}v:JwcJbpC)t2qI">
                    <field name="VAR" id="p`vW+s?m7}f](43^F-Y?" variabletype="">stake</field>
                  </block>
                </value>
                <value name="BARRIEROFFSET">
                  <block type="math_number" id="A#lTcc,~}N:Q46`S!abv">
                    <field name="NUM">2</field>
                  </block>
                </value>
              </block>
            </statement>
            <value name="IF1">
              <block type="procedures_callreturn" id="{b!J^UH280Sx_0X4HUP7">
                <mutation name="crossDown">
                  <arg name="_src1"></arg>
                  <arg name="_src2"></arg>
                </mutation>
                <value name="ARG0">
                  <block type="procedures_callreturn" id="C)!9tPTY{rsxns2kNoa#">
                    <mutation name="ExMachina::GetWMAArray">
                      <arg name="_src"></arg>
                      <arg name="_period"></arg>
                    </mutation>
                    <value name="ARG0">
                      <block type="ohlc_values" id="MEkhzUVM27nje(@bB#Hf">
                        <field name="OHLCFIELD_LIST">close</field>
                        <field name="CANDLEINTERVAL_LIST">default</field>
                      </block>
                    </value>
                    <value name="ARG1">
                      <block type="math_number" id="G?Z!Dw_C}LELI1noAK|2">
                        <field name="NUM">14</field>
                      </block>
                    </value>
                  </block>
                </value>
                <value name="ARG1">
                  <block type="smaa" id="Sf(TDdIMj{KcS-jJL/(!">
                    <value name="INPUT">
                      <block type="ohlc_values" id="P+Lib-0o$A_j;X(.7.~!">
                        <field name="OHLCFIELD_LIST">close</field>
                        <field name="CANDLEINTERVAL_LIST">default</field>
                      </block>
                    </value>
                    <value name="PERIOD">
                      <shadow type="math_number" id="Qe+A#_o0En}mFHL:;8+F">
                        <field name="NUM">10</field>
                      </shadow>
                    </value>
                  </block>
                </value>
              </block>
            </value>
            <statement name="DO1">
              <block type="tradeOptions" id="]JDC-kzec6))55%Oh^,;">
                <field name="DURATIONTYPE_LIST">m</field>
                <field name="CURRENCY_LIST">USD</field>
                <field name="BARRIEROFFSETTYPE_LIST">-</field>
                <value name="DURATION">
                  <shadow type="math_number" id="tZf,uJ|5fAo=A[+#[9AE">
                    <field name="NUM">5</field>
                  </shadow>
                </value>
                <value name="AMOUNT">
                  <shadow type="math_number" id="QFeJo-D[ASP0]Uh|vn;}">
                    <field name="NUM">3</field>
                  </shadow>
                  <block type="variables_get" id="W)7gtm9ft5*dI%-L~wCY">
                    <field name="VAR" id="p`vW+s?m7}f](43^F-Y?" variabletype="">stake</field>
                  </block>
                </value>
                <value name="BARRIEROFFSET">
                  <block type="math_number" id=";A7eD6oVVNUlpEzVy?#H">
                    <field name="NUM">2</field>
                  </block>
                </value>
              </block>
            </statement>
          </block>
        </next>
      </block>
    </statement>
  </block>
  <block type="loader" id="E2SzA*XP(Vt9D_*Nltq+" x="0" y="0">
    <field name="URL">https://gist.githubusercontent.com/binary-ex-machina/0e78a5c0a567c6248eec135195971c69/raw/228d962ee8eb9803bc9eb83f8487be796661ac1e/exmachina-indicator-wma.xml</field>
  </block>
  <block type="procedures_defreturn" id="!{fmz96cHPgNff%Xspwf" collapsed="true" x="0" y="0">
    <mutation>
      <arg name="_src" varid="/cV0vUE`Z0[#JG)VWwDR"></arg>
      <arg name="_period" varid="()b2ss?z2^.H~R[q_L:["></arg>
    </mutation>
    <field name="NAME">ExMachina::GetWMA</field>
    <comment pinned="false" h="80" w="160">Describe this function...</comment>
    <statement name="STACK">
      <block type="variables_set" id="0m9AH)YIuEYWf|{ur:RL">
        <field name="VAR" id="LY/c5hUhbBY*fn^cGHOD" variabletype="">_sum</field>
        <value name="VALUE">
          <block type="math_number" id=".?f|QzOeLo@|a9Z~a*~q">
            <field name="NUM">0</field>
          </block>
        </value>
        <next>
          <block type="variables_set" id=".LDLvDTfTs@tw:rgNfh5">
            <field name="VAR" id="_11T3B@)~B^WDxgkDVX^" variabletype="">_norm</field>
            <value name="VALUE">
              <block type="math_number" id="j18xME]wv*,fEp4(JumB">
                <field name="NUM">0</field>
              </block>
            </value>
            <next>
              <block type="controls_for" id="7+hig.$CmCUaqKv2qQx[">
                <field name="VAR" id="lVj6(^2h@,do1i2TyE*4" variabletype="">i</field>
                <value name="FROM">
                  <block type="math_number" id="v*R2f{5rHTlQ2s)uh_rU">
                    <field name="NUM">0</field>
                  </block>
                </value>
                <value name="TO">
                  <block type="math_arithmetic" id="hv^eNDvi`RQ0cWb7Yq6-">
                    <field name="OP">MINUS</field>
                    <value name="A">
                      <shadow type="math_number" id="r|CCRU7$O|DXQhTsg42J">
                        <field name="NUM">1</field>
                      </shadow>
                      <block type="variables_get" id="(!{%}IERd)E!L4g^=jW$">
                        <field name="VAR" id="()b2ss?z2^.H~R[q_L:[" variabletype="">_period</field>
                      </block>
                    </value>
                    <value name="B">
                      <shadow type="math_number" id="Cn#y[JrghPm#)$`cUMe#">
                        <field name="NUM">1</field>
                      </shadow>
                    </value>
                  </block>
                </value>
                <value name="BY">
                  <block type="math_number" id="SWGme)-or6tr[rL.V])e">
                    <field name="NUM">1</field>
                  </block>
                </value>
                <statement name="DO">
                  <block type="variables_set" id="McextXjXIDBuS28|]DjC">
                    <field name="VAR" id="E|7Sq2`H+kZ{`CP]*flq" variabletype="">_weight</field>
                    <value name="VALUE">
                      <block type="math_arithmetic" id="ZCDErG0Dm:bUMNAu;a0y">
                        <field name="OP">MULTIPLY</field>
                        <value name="A">
                          <shadow type="math_number" id="uJ3)fP~hU8/EmLyIGd+/">
                            <field name="NUM">1</field>
                          </shadow>
                          <block type="variables_get" id="%V|4/QsYx#bZcv-})tti">
                            <field name="VAR" id="()b2ss?z2^.H~R[q_L:[" variabletype="">_period</field>
                          </block>
                        </value>
                        <value name="B">
                          <shadow type="math_number" id="4s^1p8oQVw.tzNQg77N,">
                            <field name="NUM">1</field>
                          </shadow>
                          <block type="math_arithmetic" id="l.t=mW6X4p$}^a[s6*P~">
                            <field name="OP">MINUS</field>
                            <value name="A">
                              <shadow type="math_number" id="/O_8rSXSR,XQq~ZLFkj!">
                                <field name="NUM">1</field>
                              </shadow>
                              <block type="variables_get" id="o{[X3iK!m,K6=EG1gMxW">
                                <field name="VAR" id="()b2ss?z2^.H~R[q_L:[" variabletype="">_period</field>
                              </block>
                            </value>
                            <value name="B">
                              <shadow type="math_number" id="8aaNE.qGu[0VhBisIMhc">
                                <field name="NUM">1</field>
                              </shadow>
                              <block type="variables_get" id="{QV%UghHU;R[}AF5)9CK">
                                <field name="VAR" id="lVj6(^2h@,do1i2TyE*4" variabletype="">i</field>
                              </block>
                            </value>
                          </block>
                        </value>
                      </block>
                    </value>
                    <next>
                      <block type="variables_set" id="@3C~c6|,})ru3)e9Q,qx">
                        <field name="VAR" id="_11T3B@)~B^WDxgkDVX^" variabletype="">_norm</field>
                        <value name="VALUE">
                          <block type="math_arithmetic" id="S-P=w~T~a!ZZ=d|{?/kg">
                            <field name="OP">ADD</field>
                            <value name="A">
                              <shadow type="math_number" id="+UQAG;TDL|pYPjf;jE}(">
                                <field name="NUM">1</field>
                              </shadow>
                              <block type="variables_get" id="^K%kOvWRZ0owAI_N0mg6">
                                <field name="VAR" id="_11T3B@)~B^WDxgkDVX^" variabletype="">_norm</field>
                              </block>
                            </value>
                            <value name="B">
                              <shadow type="math_number" id="iX[MqJYgSP^)~|bTHlq5">
                                <field name="NUM">1</field>
                              </shadow>
                              <block type="variables_get" id="oo].!g@aI7Z}V`ecYoS~">
                                <field name="VAR" id="E|7Sq2`H+kZ{`CP]*flq" variabletype="">_weight</field>
                              </block>
                            </value>
                          </block>
                        </value>
                        <next>
                          <block type="variables_set" id="YJXi|=Pk8.^LI}WU6w..">
                            <field name="VAR" id="LY/c5hUhbBY*fn^cGHOD" variabletype="">_sum</field>
                            <value name="VALUE">
                              <block type="math_arithmetic" id="0rgwh:nThmp}~Qk:T8=^">
                                <field name="OP">ADD</field>
                                <value name="A">
                                  <shadow type="math_number" id="+UQAG;TDL|pYPjf;jE}(">
                                    <field name="NUM">1</field>
                                  </shadow>
                                  <block type="variables_get" id="W!vM@N3Gh.0Bu[K2Yk8l">
                                    <field name="VAR" id="LY/c5hUhbBY*fn^cGHOD" variabletype="">_sum</field>
                                  </block>
                                </value>
                                <value name="B">
                                  <shadow type="math_number" id="iX[MqJYgSP^)~|bTHlq5">
                                    <field name="NUM">1</field>
                                  </shadow>
                                  <block type="math_arithmetic" id="d,oG_CSV=Tj1Ng;HU;IR">
                                    <field name="OP">MULTIPLY</field>
                                    <value name="A">
                                      <shadow type="math_number" id="+UQAG;TDL|pYPjf;jE}(">
                                        <field name="NUM">1</field>
                                      </shadow>
                                      <block type="lists_getIndex" id="Dz]nj!{Pv-c9uCz$93GS">
                                        <mutation statement="false" at="true"></mutation>
                                        <field name="MODE">GET</field>
                                        <field name="WHERE">FROM_END</field>
                                        <value name="VALUE">
                                          <block type="variables_get" id="%g}:xP0]OUW;ktf^nX66">
                                            <field name="VAR" id="/cV0vUE`Z0[#JG)VWwDR" variabletype="">_src</field>
                                          </block>
                                        </value>
                                        <value name="AT">
                                          <block type="math_arithmetic" id="L+cLttWVj`%kZ~i{%W#g">
                                            <field name="OP">ADD</field>
                                            <value name="A">
                                              <shadow type="math_number" id="AQy*16UmTkgH|j.HAW.`">
                                                <field name="NUM">1</field>
                                              </shadow>
                                            </value>
                                            <value name="B">
                                              <shadow type="math_number" id="{0|^j/0_ORsxYjN[c~i1">
                                                <field name="NUM">1</field>
                                              </shadow>
                                              <block type="variables_get" id="73Z2P$#Jhm*4ufS5[uPN">
                                                <field name="VAR" id="lVj6(^2h@,do1i2TyE*4" variabletype="">i</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <value name="B">
                                      <shadow type="math_number" id="WiZ-R1lkE*:?ddRBBu6p">
                                        <field name="NUM">1</field>
                                      </shadow>
                                      <block type="variables_get" id="mBv?,}IsI*!%wkNXyS:D">
                                        <field name="VAR" id="E|7Sq2`H+kZ{`CP]*flq" variabletype="">_weight</field>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                              </block>
                            </value>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </statement>
              </block>
            </next>
          </block>
        </next>
      </block>
    </statement>
    <value name="RETURN">
      <block type="math_arithmetic" id="]BB`:o(%A5[?w;7bE([?">
        <field name="OP">DIVIDE</field>
        <value name="A">
          <shadow type="math_number" id="@7jaIAwqvfT}^ONDUXbU">
            <field name="NUM">1</field>
          </shadow>
          <block type="variables_get" id="m[^Doce=lU=i=.Go5ff)">
            <field name="VAR" id="LY/c5hUhbBY*fn^cGHOD" variabletype="">_sum</field>
          </block>
        </value>
        <value name="B">
          <shadow type="math_number" id="P~M:s-rhc+(L[-L3Dpt.">
            <field name="NUM">1</field>
          </shadow>
          <block type="variables_get" id=",2F?XJ?jc$65+4:oZBdx">
            <field name="VAR" id="_11T3B@)~B^WDxgkDVX^" variabletype="">_norm</field>
          </block>
        </value>
      </block>
    </value>
  </block>
  <block type="procedures_defreturn" id="Z.~)PUNpOtmxRFW-D1Z2" collapsed="true" x="0" y="0">
    <mutation>
      <arg name="_src" varid="/cV0vUE`Z0[#JG)VWwDR"></arg>
      <arg name="_period" varid="()b2ss?z2^.H~R[q_L:["></arg>
    </mutation>
    <field name="NAME">ExMachina::GetWMAArray</field>
    <comment pinned="false" h="80" w="160">Describe this function...</comment>
    <statement name="STACK">
      <block type="variables_set" id="/dX%9}JP@rlt*rt|yHL}">
        <field name="VAR" id="/Am~*pHa,wR41Rj3:8^d" variabletype="">list</field>
        <value name="VALUE">
          <block type="lists_create_with" id="*Tq|)J3y*%CrAXmlC/$0">
            <mutation items="0"></mutation>
          </block>
        </value>
        <next>
          <block type="variables_set" id="C%Ju{PgEB)[g/V%uX716">
            <field name="VAR" id="TuA8n!u1nzngzh@5^Hg0" variabletype="">wmaRsc</field>
            <value name="VALUE">
              <block type="lists_create_with" id="D3_ePwb%cHKWdx?x^Q9u">
                <mutation items="0"></mutation>
              </block>
            </value>
            <next>
              <block type="controls_for" id="=u$6mV)i)wjtB8O3e2;=">
                <field name="VAR" id="hfgoB{N|4/m*Ba/u]VLV" variabletype="">j</field>
                <value name="FROM">
                  <block type="math_number" id="wVvbkVu0Rmp1Dg`wcM]f">
                    <field name="NUM">0</field>
                  </block>
                </value>
                <value name="TO">
                  <block type="math_arithmetic" id="Zic9JI.DXHhN:xv;H#^A">
                    <field name="OP">MINUS</field>
                    <value name="A">
                      <shadow type="math_number" id="r|CCRU7$O|DXQhTsg42J">
                        <field name="NUM">1</field>
                      </shadow>
                      <block type="variables_get" id="7YS`Z:`_au)%i(#Ypxlo">
                        <field name="VAR" id="()b2ss?z2^.H~R[q_L:[" variabletype="">_period</field>
                      </block>
                    </value>
                    <value name="B">
                      <shadow type="math_number" id="[l8ctVq:mvJ*#NroL*%O">
                        <field name="NUM">1</field>
                      </shadow>
                    </value>
                  </block>
                </value>
                <value name="BY">
                  <block type="math_number" id="P!93wO2)J71QFkvv:=Hp">
                    <field name="NUM">1</field>
                  </block>
                </value>
                <statement name="DO">
                  <block type="variables_set" id=":Tk{PYy|nbcaH9ykoU=;">
                    <field name="VAR" id="TuA8n!u1nzngzh@5^Hg0" variabletype="">wmaRsc</field>
                    <value name="VALUE">
                      <block type="lists_getSublist" id="`!k*$+(ff+ASiFbB4nIh">
                        <mutation at1="false" at2="true"></mutation>
                        <field name="WHERE1">FIRST</field>
                        <field name="WHERE2">FROM_END</field>
                        <value name="LIST">
                          <block type="variables_get" id="6![u#0{rmhh;(fZ!)q]]">
                            <field name="VAR" id="/cV0vUE`Z0[#JG)VWwDR" variabletype="">_src</field>
                          </block>
                        </value>
                        <value name="AT2">
                          <block type="math_arithmetic" id="De/s6te]N+GTScD1n/;m">
                            <field name="OP">ADD</field>
                            <value name="A">
                              <shadow type="math_number" id="yYWum)hv0@_QU{+hK*l/">
                                <field name="NUM">1</field>
                              </shadow>
                            </value>
                            <value name="B">
                              <shadow type="math_number" id="{0|^j/0_ORsxYjN[c~i1">
                                <field name="NUM">1</field>
                              </shadow>
                              <block type="variables_get" id="$!VpBr[WSwNxTpEhYI2$">
                                <field name="VAR" id="hfgoB{N|4/m*Ba/u]VLV" variabletype="">j</field>
                              </block>
                            </value>
                          </block>
                        </value>
                      </block>
                    </value>
                    <next>
                      <block type="variables_set" id="sQ[(7?2GqCb~m,~tBf]t">
                        <field name="VAR" id="LY/c5hUhbBY*fn^cGHOD" variabletype="">_sum</field>
                        <value name="VALUE">
                          <block type="math_number" id="O^apAiNfQKEg#wj@JFAL">
                            <field name="NUM">0</field>
                          </block>
                        </value>
                        <next>
                          <block type="variables_set" id="8/ztrb2o5,VOSi0XY6$O">
                            <field name="VAR" id="_11T3B@)~B^WDxgkDVX^" variabletype="">_norm</field>
                            <value name="VALUE">
                              <block type="math_number" id="XHP80%+XqUU/FRiSf`3[">
                                <field name="NUM">0</field>
                              </block>
                            </value>
                            <next>
                              <block type="controls_for" id="t)4L)/%B+aPV~@zx[[Kd">
                                <field name="VAR" id="lVj6(^2h@,do1i2TyE*4" variabletype="">i</field>
                                <value name="FROM">
                                  <block type="math_number" id="z5qpZJ[a)z2`%dP2#4RY">
                                    <field name="NUM">0</field>
                                  </block>
                                </value>
                                <value name="TO">
                                  <block type="math_arithmetic" id="x+#qAtXB18{:h2,+Qq{/">
                                    <field name="OP">MINUS</field>
                                    <value name="A">
                                      <shadow type="math_number" id="r|CCRU7$O|DXQhTsg42J">
                                        <field name="NUM">1</field>
                                      </shadow>
                                      <block type="variables_get" id="*1a,u5Io;f~IHn2m2(nX">
                                        <field name="VAR" id="()b2ss?z2^.H~R[q_L:[" variabletype="">_period</field>
                                      </block>
                                    </value>
                                    <value name="B">
                                      <shadow type="math_number" id="1.Jz}AJ,i5MsQ!R%E7p-">
                                        <field name="NUM">1</field>
                                      </shadow>
                                    </value>
                                  </block>
                                </value>
                                <value name="BY">
                                  <block type="math_number" id="S`~:7B{iTf{o]FC8@3S?">
                                    <field name="NUM">1</field>
                                  </block>
                                </value>
                                <statement name="DO">
                                  <block type="variables_set" id="Mks!s~SP]!m2mHvCzmj{">
                                    <field name="VAR" id="E|7Sq2`H+kZ{`CP]*flq" variabletype="">_weight</field>
                                    <value name="VALUE">
                                      <block type="math_arithmetic" id="#(DZja@@7B|3$f;K}}Zf">
                                        <field name="OP">MULTIPLY</field>
                                        <value name="A">
                                          <shadow type="math_number" id="uJ3)fP~hU8/EmLyIGd+/">
                                            <field name="NUM">1</field>
                                          </shadow>
                                          <block type="variables_get" id="6.C?mjp~!vS9TV($j^}R">
                                            <field name="VAR" id="()b2ss?z2^.H~R[q_L:[" variabletype="">_period</field>
                                          </block>
                                        </value>
                                        <value name="B">
                                          <shadow type="math_number" id="4s^1p8oQVw.tzNQg77N,">
                                            <field name="NUM">1</field>
                                          </shadow>
                                          <block type="math_arithmetic" id="zrhIqW)Q;qrmZ|NU-/C2">
                                            <field name="OP">MINUS</field>
                                            <value name="A">
                                              <shadow type="math_number" id="/O_8rSXSR,XQq~ZLFkj!">
                                                <field name="NUM">1</field>
                                              </shadow>
                                              <block type="variables_get" id="x,nm]RGd{PXUeP_`S/PK">
                                                <field name="VAR" id="()b2ss?z2^.H~R[q_L:[" variabletype="">_period</field>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <shadow type="math_number" id="8aaNE.qGu[0VhBisIMhc">
                                                <field name="NUM">1</field>
                                              </shadow>
                                              <block type="variables_get" id="Oz4/,;e=RgcBE^mi9I:[">
                                                <field name="VAR" id="lVj6(^2h@,do1i2TyE*4" variabletype="">i</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <next>
                                      <block type="variables_set" id="w1%-FF-SYqjnqZhZ@zK$">
                                        <field name="VAR" id="_11T3B@)~B^WDxgkDVX^" variabletype="">_norm</field>
                                        <value name="VALUE">
                                          <block type="math_arithmetic" id="X5a).8lK;i4AH6)p9wAC">
                                            <field name="OP">ADD</field>
                                            <value name="A">
                                              <shadow type="math_number" id="+UQAG;TDL|pYPjf;jE}(">
                                                <field name="NUM">1</field>
                                              </shadow>
                                              <block type="variables_get" id="}d2VO`J/HIZ@)Ne/JfIi">
                                                <field name="VAR" id="_11T3B@)~B^WDxgkDVX^" variabletype="">_norm</field>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <shadow type="math_number" id="iX[MqJYgSP^)~|bTHlq5">
                                                <field name="NUM">1</field>
                                              </shadow>
                                              <block type="variables_get" id="!m-CZ.z,jfE_%8IkX5G*">
                                                <field name="VAR" id="E|7Sq2`H+kZ{`CP]*flq" variabletype="">_weight</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                        <next>
                                          <block type="variables_set" id="DVlmJ+=O(H?2~r)WCO/P">
                                            <field name="VAR" id="LY/c5hUhbBY*fn^cGHOD" variabletype="">_sum</field>
                                            <value name="VALUE">
                                              <block type="math_arithmetic" id="4-KCub:NI}|h[KRFu/G7">
                                                <field name="OP">ADD</field>
                                                <value name="A">
                                                  <shadow type="math_number" id="+UQAG;TDL|pYPjf;jE}(">
                                                    <field name="NUM">1</field>
                                                  </shadow>
                                                  <block type="variables_get" id="K`!#tV$)D^CHnJsh%0$M">
                                                    <field name="VAR" id="LY/c5hUhbBY*fn^cGHOD" variabletype="">_sum</field>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <shadow type="math_number" id="iX[MqJYgSP^)~|bTHlq5">
                                                    <field name="NUM">1</field>
                                                  </shadow>
                                                  <block type="math_arithmetic" id="oRbAz%@]g:DS7-g3JY~~">
                                                    <field name="OP">MULTIPLY</field>
                                                    <value name="A">
                                                      <shadow type="math_number" id="+UQAG;TDL|pYPjf;jE}(">
                                                        <field name="NUM">1</field>
                                                      </shadow>
                                                      <block type="lists_getIndex" id="^4^BllRU]/amqcCj88Iu">
                                                        <mutation statement="false" at="true"></mutation>
                                                        <field name="MODE">GET</field>
                                                        <field name="WHERE">FROM_END</field>
                                                        <value name="VALUE">
                                                          <block type="variables_get" id="J=1Ol40V#likshVb^Y$.">
                                                            <field name="VAR" id="TuA8n!u1nzngzh@5^Hg0" variabletype="">wmaRsc</field>
                                                          </block>
                                                        </value>
                                                        <value name="AT">
                                                          <block type="math_arithmetic" id="0G@QaZ{F0]c29_Y0xK#Z">
                                                            <field name="OP">ADD</field>
                                                            <value name="A">
                                                              <shadow type="math_number" id="qvE*YjAuCx]:)KT[D=O[">
                                                                <field name="NUM">1</field>
                                                              </shadow>
                                                            </value>
                                                            <value name="B">
                                                              <shadow type="math_number" id="{0|^j/0_ORsxYjN[c~i1">
                                                                <field name="NUM">1</field>
                                                              </shadow>
                                                              <block type="variables_get" id="|?fJowExY!|4YVyYN^OL">
                                                                <field name="VAR" id="lVj6(^2h@,do1i2TyE*4" variabletype="">i</field>
                                                              </block>
                                                            </value>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </value>
                                                    <value name="B">
                                                      <shadow type="math_number" id="WiZ-R1lkE*:?ddRBBu6p">
                                                        <field name="NUM">1</field>
                                                      </shadow>
                                                      <block type="variables_get" id="^9-GRLSpwl6z{RS.uLBy">
                                                        <field name="VAR" id="E|7Sq2`H+kZ{`CP]*flq" variabletype="">_weight</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </statement>
                                <next>
                                  <block type="lists_setIndex" id="gUXc+bB~eG(5kVN{Z4wh">
                                    <mutation at="false"></mutation>
                                    <field name="MODE">INSERT</field>
                                    <field name="WHERE">FIRST</field>
                                    <value name="LIST">
                                      <block type="variables_get" id="w=ss7]c0bw7O.qPoc{v~">
                                        <field name="VAR" id="/Am~*pHa,wR41Rj3:8^d" variabletype="">list</field>
                                      </block>
                                    </value>
                                    <value name="TO">
                                      <block type="math_arithmetic" id="|yAZ5aV{=CZMHXBEy4nC">
                                        <field name="OP">DIVIDE</field>
                                        <value name="A">
                                          <shadow type="math_number" id="@7jaIAwqvfT}^ONDUXbU">
                                            <field name="NUM">1</field>
                                          </shadow>
                                          <block type="variables_get" id="zkaWQ?`aGBRZK[`MVHH2">
                                            <field name="VAR" id="LY/c5hUhbBY*fn^cGHOD" variabletype="">_sum</field>
                                          </block>
                                        </value>
                                        <value name="B">
                                          <shadow type="math_number" id="P~M:s-rhc+(L[-L3Dpt.">
                                            <field name="NUM">1</field>
                                          </shadow>
                                          <block type="variables_get" id="B2-|ExsxuuqE?E)55FdY">
                                            <field name="VAR" id="_11T3B@)~B^WDxgkDVX^" variabletype="">_norm</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </statement>
              </block>
            </next>
          </block>
        </next>
      </block>
    </statement>
    <value name="RETURN">
      <block type="variables_get" id="~^w*FR5|F:0ydzqPb.|{">
        <field name="VAR" id="/Am~*pHa,wR41Rj3:8^d" variabletype="">list</field>
      </block>
    </value>
  </block>
  <block type="before_purchase" id="i-CIx.(Onm4?ihxzA}Y]" x="-37" y="1209">
    <statement name="BEFOREPURCHASE_STACK">
      <block type="purchase" id="W6q#Z-I3q3d[d3-`S[dS">
        <field name="PURCHASE_LIST">ONETOUCH</field>
      </block>
    </statement>
  </block>
  <block type="after_purchase" id="D^Jz1^n=2vtZku1vBN@;" x="-54" y="1297">
    <statement name="AFTERPURCHASE_STACK">
      <block type="controls_if" id="?+0TN{j!62#DQoD%[lql">
        <mutation else="1"></mutation>
        <value name="IF0">
          <block type="contract_check_result" id="C,1W3*lp3-VAMQn6I*zP">
            <field name="CHECK_RESULT">loss</field>
          </block>
        </value>
        <statement name="DO0">
          <block type="variables_set" id="KZIJhn3IVEcLFQN%BzHz">
            <field name="VAR" id="p`vW+s?m7}f](43^F-Y?" variabletype="">stake</field>
            <value name="VALUE">
              <block type="math_arithmetic" id="^oaz:!rmO3NdY4ClKX}q">
                <field name="OP">MULTIPLY</field>
                <value name="A">
                  <shadow type="math_number" id="Cpgo{(|tO`F{/}G~wTcZ">
                    <field name="NUM">1</field>
                  </shadow>
                  <block type="variables_get" id="4PM*~oS-dA8rr[#TR5Ie">
                    <field name="VAR" id="p`vW+s?m7}f](43^F-Y?" variabletype="">stake</field>
                  </block>
                </value>
                <value name="B">
                  <shadow type="math_number" id="*YXJjs3$Idyo!Pikmh.M">
                    <field name="NUM">1</field>
                  </shadow>
                  <block type="variables_get" id="Z3gslDlP~+gSp)]I@4x`">
                    <field name="VAR" id="kF`BJoWBD0nDo1~qgyh|" variabletype="">Mg</field>
                  </block>
                </value>
              </block>
            </value>
          </block>
        </statement>
        <statement name="ELSE">
          <block type="variables_set" id="/rPEI@p?;p}AA;a8J_fd">
            <field name="VAR" id="p`vW+s?m7}f](43^F-Y?" variabletype="">stake</field>
            <value name="VALUE">
              <block type="variables_get" id="eUo(U~`D*QoKlUDQHPhV">
                <field name="VAR" id="11.wD_PSy!RrQc]ZSa@M" variabletype="">Initial Amount</field>
              </block>
            </value>
          </block>
        </statement>
        <next>
          <block type="trade_again" id="c)S|KjoQdXc8l#J@5z3P"></block>
        </next>
      </block>
    </statement>
  </block>
  <block type="procedures_defreturn" id="OiPJ8tK9I^_olFS:3,=u" x="-82" y="1656">
    <mutation>
      <arg name="_src1" varid="Xk9%*3[Wz:;srD^rveQ+"></arg>
      <arg name="_src2" varid="LTNkNk@+~C}`|AuB0j3E"></arg>
    </mutation>
    <field name="NAME">crossUp</field>
    <comment pinned="false" h="80" w="160">Describe this function...</comment>
    <value name="RETURN">
      <block type="logic_operation" id="EfFv]^m=T4E%o!qZMvaT" inline="false">
        <field name="OP">AND</field>
        <value name="A">
          <block type="logic_compare" id="}?[XkXzBv{?8W4YPV!Lu">
            <field name="OP">LT</field>
            <value name="A">
              <block type="lists_getIndex" id="qJrO]3SJeztGPfSiE.5q">
                <mutation statement="false" at="true"></mutation>
                <field name="MODE">GET</field>
                <field name="WHERE">FROM_END</field>
                <value name="VALUE">
                  <block type="variables_get" id="/[5vf||e5FR34Q`aa+p1">
                    <field name="VAR" id="Xk9%*3[Wz:;srD^rveQ+" variabletype="">_src1</field>
                  </block>
                </value>
                <value name="AT">
                  <block type="math_number" id=";N`D;AE;XT?6jIaLe#.#">
                    <field name="NUM">2</field>
                  </block>
                </value>
              </block>
            </value>
            <value name="B">
              <block type="lists_getIndex" id="fzF4H8ljMdiU`1:3,h]B">
                <mutation statement="false" at="true"></mutation>
                <field name="MODE">GET</field>
                <field name="WHERE">FROM_END</field>
                <value name="VALUE">
                  <block type="variables_get" id="F+lhQG6jnMbwxjWI%Ni;">
                    <field name="VAR" id="LTNkNk@+~C}`|AuB0j3E" variabletype="">_src2</field>
                  </block>
                </value>
                <value name="AT">
                  <block type="math_number" id="}1^`5S@Y(C(wifpjCqY=">
                    <field name="NUM">2</field>
                  </block>
                </value>
              </block>
            </value>
          </block>
        </value>
        <value name="B">
          <block type="logic_compare" id="WEAJ1;QdNd7P={pFTqDb">
            <field name="OP">GT</field>
            <value name="A">
              <block type="lists_getIndex" id="QS/xCxmzqs%):7;z[wi/">
                <mutation statement="false" at="true"></mutation>
                <field name="MODE">GET</field>
                <field name="WHERE">FROM_END</field>
                <value name="VALUE">
                  <block type="variables_get" id="d,PGe)9^lS-}+m,79g(!">
                    <field name="VAR" id="Xk9%*3[Wz:;srD^rveQ+" variabletype="">_src1</field>
                  </block>
                </value>
                <value name="AT">
                  <block type="math_number" id="0g:P5[:B;zJK|dFvK#`}">
                    <field name="NUM">1</field>
                  </block>
                </value>
              </block>
            </value>
            <value name="B">
              <block type="lists_getIndex" id="U5*7Wz1rHHi?KeFbk$-n">
                <mutation statement="false" at="true"></mutation>
                <field name="MODE">GET</field>
                <field name="WHERE">FROM_END</field>
                <value name="VALUE">
                  <block type="variables_get" id="L5h1/tr]2BGKm@%@.LS}">
                    <field name="VAR" id="LTNkNk@+~C}`|AuB0j3E" variabletype="">_src2</field>
                  </block>
                </value>
                <value name="AT">
                  <block type="math_number" id="uc=pa6+h~z3uY8Qwl6#P">
                    <field name="NUM">1</field>
                  </block>
                </value>
              </block>
            </value>
          </block>
        </value>
      </block>
    </value>
  </block>
  <block type="procedures_defreturn" id="o1V,$!L2tKE,vbk{Nqs{" x="-86" y="1827">
    <mutation>
      <arg name="_src1" varid="Xk9%*3[Wz:;srD^rveQ+"></arg>
      <arg name="_src2" varid="LTNkNk@+~C}`|AuB0j3E"></arg>
    </mutation>
    <field name="NAME">crossDown</field>
    <comment pinned="false" h="80" w="160">Describe this function...</comment>
    <value name="RETURN">
      <block type="logic_operation" id="hYI5`C}HkOxA%/DnZX`w" inline="false">
        <field name="OP">AND</field>
        <value name="A">
          <block type="logic_compare" id="l6tTtWkwGpj{[AX}R,j*">
            <field name="OP">GT</field>
            <value name="A">
              <block type="lists_getIndex" id="?-/1ha8^VUwnk+cj]^go">
                <mutation statement="false" at="true"></mutation>
                <field name="MODE">GET</field>
                <field name="WHERE">FROM_END</field>
                <value name="VALUE">
                  <block type="variables_get" id="BfCod9Ehd5p[`gsuU#1i">
                    <field name="VAR" id="Xk9%*3[Wz:;srD^rveQ+" variabletype="">_src1</field>
                  </block>
                </value>
                <value name="AT">
                  <block type="math_number" id="rP*eU;Ev@Q9^/wH{TScL">
                    <field name="NUM">2</field>
                  </block>
                </value>
              </block>
            </value>
            <value name="B">
              <block type="lists_getIndex" id="s?6^bl]UOlU7YuVndSn}">
                <mutation statement="false" at="true"></mutation>
                <field name="MODE">GET</field>
                <field name="WHERE">FROM_END</field>
                <value name="VALUE">
                  <block type="variables_get" id="ffF^32b[FB3V1wk7SlVl">
                    <field name="VAR" id="LTNkNk@+~C}`|AuB0j3E" variabletype="">_src2</field>
                  </block>
                </value>
                <value name="AT">
                  <block type="math_number" id="G9dF5%{+}vSxAX$qd%NC">
                    <field name="NUM">2</field>
                  </block>
                </value>
              </block>
            </value>
          </block>
        </value>
        <value name="B">
          <block type="logic_compare" id="QNqq.9NIa)$%MfJ~HTZp">
            <field name="OP">LT</field>
            <value name="A">
              <block type="lists_getIndex" id="9`E`0u1Iiyv[wDJrQ(xl">
                <mutation statement="false" at="true"></mutation>
                <field name="MODE">GET</field>
                <field name="WHERE">FROM_END</field>
                <value name="VALUE">
                  <block type="variables_get" id="Q!eWoT=GkmEunTgbGH!P">
                    <field name="VAR" id="Xk9%*3[Wz:;srD^rveQ+" variabletype="">_src1</field>
                  </block>
                </value>
                <value name="AT">
                  <block type="math_number" id="z(X{.{+nZgijGHAuD!3R">
                    <field name="NUM">1</field>
                  </block>
                </value>
              </block>
            </value>
            <value name="B">
              <block type="lists_getIndex" id="k;l=uV8OrDwRFXD^iTC{">
                <mutation statement="false" at="true"></mutation>
                <field name="MODE">GET</field>
                <field name="WHERE">FROM_END</field>
                <value name="VALUE">
                  <block type="variables_get" id="!vACY$mg16b^(Fxj2~bd">
                    <field name="VAR" id="LTNkNk@+~C}`|AuB0j3E" variabletype="">_src2</field>
                  </block>
                </value>
                <value name="AT">
                  <block type="math_number" id="|F?l?2rK@t-410aBe1$3">
                    <field name="NUM">1</field>
                  </block>
                </value>
              </block>
            </value>
          </block>
        </value>
      </block>
    </value>
  </block>
</xml>