﻿<xml xmlns="http://www.w3.org/1999/xhtml" collection="false">
  <variables>
    <variable type="" id="[^5k=t~y$Zo8QE|H~#5-">__input__list</variable>
    <variable type="" id="^~e[S)O:Om3aEy@d]Ek9">__input__list__length</variable>
    <variable type="" id="s#IAkwK{5N4EH+a#+o{K">ID:values</variable>
    <variable type="" id="6RD1w,AM;mlJ5QBAaAg5">ID:period</variable>
    <variable type="" id=".m;G8C(HW/#,9!H.Hk]J">IU:values</variable>
    <variable type="" id="*,Fj7pjFgO[K/oQr9eQJ">IU:period</variable>
    <variable type="" id="I2_%xm@y/zf.h,.P7OW9">Lose Count</variable>
    <variable type="" id="lUcZ^g#j|Vnm:LMvmb;R">__f__result</variable>
    <variable type="" id="!}kO8.299sv@u(#hNig9">ID:sma</variable>
    <variable type="" id="MT(0-Q3ufM|=2l#BQ@D0">ID:isDown</variable>
    <variable type="" id="5/Zy6Z^R1~Qy(b)(+QTJ">IU:sma</variable>
    <variable type="" id="siP%f+FuW!8-Zz5OuW:l">IU:isUp</variable>
    <variable type="" id="sD%Zeh_:c!^kNg?N}yW[">Expected Profit</variable>
    <variable type="" id="U[!4T1)O+ah_agGaFcqV">Initial Amount</variable>
    <variable type="" id="h]Vtk})JEY1iItp:-SAf">__f__list</variable>
    <variable type="" id="fxuu`4)bt#5ipsH8frw$">ID:prev</variable>
    <variable type="" id="G{Bh@]ZFnUqqw$d%6fT|">IU:prev</variable>
    <variable type="" id="2/I5]aVMhh/YLpSB@I?|">Win Amount</variable>
    <variable type="" id="R_vYWx6-(,cxS}v`P}tX">__f__zero__tick</variable>
    <variable type="" id="odM1@2[g7ma/D]_}6w*E">__f__first__tick</variable>
    <variable type="" id="Qe|FG+[BWG}l+1F1@N]S">ID:i</variable>
    <variable type="" id="tEtoJqp_Y!=|v=p-woY,">IU:i</variable>
    <variable type="" id="hqa4Ln=Rgh)MCW;(VGqk">__f__second__tick</variable>
    <variable type="" id="~oS3cP}n^(@OXm#vqK^.">__f__third__tick</variable>
  </variables>
  <block type="trade" id="73vWdDagX-YhN)CtN.3D" x="-111" y="-232">
    <field name="MARKET_LIST">volidx</field>
    <field name="SUBMARKET_LIST">random_index</field>
    <field name="SYMBOL_LIST">R_75</field>
    <field name="TRADETYPECAT_LIST">callput</field>
    <field name="TRADETYPE_LIST">higherlower</field>
    <field name="TYPE_LIST">CALL</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="XDMYoip}{3uMJ$~,Wa(K">
        <field name="VAR" id="I2_%xm@y/zf.h,.P7OW9" variabletype="">Lose Count</field>
        <value name="VALUE">
          <block type="math_number" id="P!2=P_+S,MKLQTjA]xg(">
            <field name="NUM">0</field>
          </block>
        </value>
        <next>
          <block type="variables_set" id="dqduY+F]dYVC%/;)_QyX">
            <field name="VAR" id="sD%Zeh_:c!^kNg?N}yW[" variabletype="">Expected Profit</field>
            <value name="VALUE">
              <block type="math_number" id="pGL%0jCRlD;R_i-Q:?jz">
                <field name="NUM">100</field>
              </block>
            </value>
            <next>
              <block type="variables_set" id="cG;6qVzC4dU[J9h%wYdK">
                <field name="VAR" id="2/I5]aVMhh/YLpSB@I?|" variabletype="">Win Amount</field>
                <value name="VALUE">
                  <block type="math_number" id="?UMlJ9?s?=7*h-CIL?Hv">
                    <field name="NUM">100</field>
                  </block>
                </value>
                <next>
                  <block type="variables_set" id="(GqO!$8|aP4T+(5lW(^E">
                    <field name="VAR" id="U[!4T1)O+ah_agGaFcqV" variabletype="">Initial Amount</field>
                    <value name="VALUE">
                      <block type="math_number" id="dI_3Be9-$EK_$F=d.7w#">
                        <field name="NUM">100</field>
                      </block>
                    </value>
                  </block>
                </next>
              </block>
            </next>
          </block>
        </next>
      </block>
    </statement>
    <statement name="SUBMARKET">
      <block type="tradeOptions" id="/Z;sOyW2sk7J!?l*4R]2">
        <field name="DURATIONTYPE_LIST">t</field>
        <field name="CURRENCY_LIST">USD</field>
        <field name="BARRIEROFFSETTYPE_LIST">-</field>
        <value name="DURATION">
          <block type="math_number" id="0p-bjjEuB1k(LNWLaiS]">
            <field name="NUM">5</field>
          </block>
        </value>
        <value name="AMOUNT">
          <block type="variables_get" id="HH%|(LT0f|?KG~.4^e=)">
            <field name="VAR" id="U[!4T1)O+ah_agGaFcqV" variabletype="">Initial Amount</field>
          </block>
        </value>
        <value name="BARRIEROFFSET">
          <block type="math_number" id="?[iYgiExH5pKwdT#-~-]">
            <field name="NUM">25</field>
          </block>
        </value>
      </block>
    </statement>
  </block>
  <block type="procedures_defreturn" id="-|Ygi_6+n_cSIfm~/YSL" x="512" y="-167">
    <mutation>
      <arg name="__input__list" varid="[^5k=t~y$Zo8QE|H~#5-"></arg>
      <arg name="__input__list__length" varid="^~e[S)O:Om3aEy@d]Ek9"></arg>
    </mutation>
    <field name="NAME">isSignalUp</field>
    <comment pinned="false" h="80" w="160">Describe this function...</comment>
    <statement name="STACK">
      <block type="variables_set" id="WS:*td%WB%3NZ98STU_h">
        <field name="VAR" id="lUcZ^g#j|Vnm:LMvmb;R" variabletype="">__f__result</field>
        <value name="VALUE">
          <block type="logic_boolean" id="2`G8*uD`pQ7FRhCbzp7D">
            <field name="BOOL">FALSE</field>
          </block>
        </value>
        <next>
          <block type="variables_set" id="vyTEPiN$0lDdB@t6R40#">
            <field name="VAR" id="h]Vtk})JEY1iItp:-SAf" variabletype="">__f__list</field>
            <value name="VALUE">
              <block type="lists_getSublist" id="q)-Vk=RB2G1[.#41sM*3">
                <mutation at1="true" at2="true"></mutation>
                <field name="WHERE1">FROM_END</field>
                <field name="WHERE2">FROM_END</field>
                <value name="LIST">
                  <block type="variables_get" id="6uD)1c?jDHGwKl`XM^?S">
                    <field name="VAR" id="[^5k=t~y$Zo8QE|H~#5-" variabletype="">__input__list</field>
                  </block>
                </value>
                <value name="AT1">
                  <block type="variables_get" id="`U8LedTX7)19].O`N_#u">
                    <field name="VAR" id="^~e[S)O:Om3aEy@d]Ek9" variabletype="">__input__list__length</field>
                  </block>
                </value>
                <value name="AT2">
                  <block type="math_number" id="J6LpGa{)}(#)10qnW9(Q">
                    <field name="NUM">1</field>
                  </block>
                </value>
              </block>
            </value>
            <next>
              <block type="variables_set" id="$pyH_=zql;WZYF$SE2V,">
                <field name="VAR" id="R_vYWx6-(,cxS}v`P}tX" variabletype="">__f__zero__tick</field>
                <value name="VALUE">
                  <block type="lists_getIndex" id="$;+yUrRiU-o^sN_#m1Q;">
                    <mutation statement="false" at="true"></mutation>
                    <field name="MODE">GET</field>
                    <field name="WHERE">FROM_START</field>
                    <value name="VALUE">
                      <block type="variables_get" id="l[_Bs9rT~$^1t6S_Y=)2">
                        <field name="VAR" id="h]Vtk})JEY1iItp:-SAf" variabletype="">__f__list</field>
                      </block>
                    </value>
                    <value name="AT">
                      <block type="math_number" id="]5.mm3.:=:*XoR1UZ)Nf">
                        <field name="NUM">1</field>
                      </block>
                    </value>
                  </block>
                </value>
                <next>
                  <block type="variables_set" id="##ksBDnPm`nhsrH;_ST}">
                    <field name="VAR" id="odM1@2[g7ma/D]_}6w*E" variabletype="">__f__first__tick</field>
                    <value name="VALUE">
                      <block type="lists_getIndex" id="?DWq5LikYWhB4LoNML!2">
                        <mutation statement="false" at="true"></mutation>
                        <field name="MODE">GET</field>
                        <field name="WHERE">FROM_START</field>
                        <value name="VALUE">
                          <block type="variables_get" id="neW|MGH?}Aezf~HQlV~U">
                            <field name="VAR" id="h]Vtk})JEY1iItp:-SAf" variabletype="">__f__list</field>
                          </block>
                        </value>
                        <value name="AT">
                          <block type="math_number" id="OzbAwsG/y^V:@L-;ai1;">
                            <field name="NUM">2</field>
                          </block>
                        </value>
                      </block>
                    </value>
                    <next>
                      <block type="variables_set" id="m[9Jp^yhy|},Zf*l-$S#">
                        <field name="VAR" id="hqa4Ln=Rgh)MCW;(VGqk" variabletype="">__f__second__tick</field>
                        <value name="VALUE">
                          <block type="lists_getIndex" id="#}^gYzi(mhNbs*|];:va">
                            <mutation statement="false" at="true"></mutation>
                            <field name="MODE">GET</field>
                            <field name="WHERE">FROM_START</field>
                            <value name="VALUE">
                              <block type="variables_get" id="opoxXSHupyY}j{;#DEm)">
                                <field name="VAR" id="h]Vtk})JEY1iItp:-SAf" variabletype="">__f__list</field>
                              </block>
                            </value>
                            <value name="AT">
                              <block type="math_number" id="2A|o^$H,J.5-rGf$RW[a">
                                <field name="NUM">3</field>
                              </block>
                            </value>
                          </block>
                        </value>
                        <next>
                          <block type="variables_set" id="Z/@hoQI40mBi1qR@W)VP">
                            <field name="VAR" id="~oS3cP}n^(@OXm#vqK^." variabletype="">__f__third__tick</field>
                            <value name="VALUE">
                              <block type="lists_getIndex" id="8eQg@Az_F[0(|GJ~8ydD">
                                <mutation statement="false" at="true"></mutation>
                                <field name="MODE">GET</field>
                                <field name="WHERE">FROM_START</field>
                                <value name="VALUE">
                                  <block type="variables_get" id="uo3gG1-7dd9.i~($*(16">
                                    <field name="VAR" id="h]Vtk})JEY1iItp:-SAf" variabletype="">__f__list</field>
                                  </block>
                                </value>
                                <value name="AT">
                                  <block type="math_number" id="p;?x?O5YT5W7?F#Gpicg">
                                    <field name="NUM">4</field>
                                  </block>
                                </value>
                              </block>
                            </value>
                            <next>
                              <block type="controls_if" id="C3{_N-l%J7RpRwb99vx5">
                                <value name="IF0">
                                  <block type="logic_operation" id="[o(5a93D7BRYAKew4Q9o">
                                    <field name="OP">OR</field>
                                    <value name="A">
                                      <block type="logic_operation" id="QaNI=$AnQn(6w*+LsK@e">
                                        <field name="OP">AND</field>
                                        <value name="A">
                                          <block type="logic_compare" id="/_nGXD-`=SU9#+Dw-*-%">
                                            <field name="OP">LT</field>
                                            <value name="A">
                                              <block type="variables_get" id="+C-!DjjSAbhj8dBiMa4v">
                                                <field name="VAR" id="odM1@2[g7ma/D]_}6w*E" variabletype="">__f__first__tick</field>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <block type="variables_get" id="fa38T/r#3+gVJ@YZ?mDw">
                                                <field name="VAR" id="R_vYWx6-(,cxS}v`P}tX" variabletype="">__f__zero__tick</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                        <value name="B">
                                          <block type="logic_compare" id="!YRHfk!5(Azl6p#8j)j7">
                                            <field name="OP">GT</field>
                                            <value name="A">
                                              <block type="variables_get" id=".chvc*9onC*.pYsos`7$">
                                                <field name="VAR" id="hqa4Ln=Rgh)MCW;(VGqk" variabletype="">__f__second__tick</field>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <block type="variables_get" id="9UiBQE:{,863$c){u`JM">
                                                <field name="VAR" id="odM1@2[g7ma/D]_}6w*E" variabletype="">__f__first__tick</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <value name="B">
                                      <block type="logic_operation" id="cU`1Nxb_.sW78@Agjtl!">
                                        <field name="OP">AND</field>
                                        <value name="A">
                                          <block type="logic_compare" id="[vjr=*z*KhLd?~OU*,[O">
                                            <field name="OP">GT</field>
                                            <value name="A">
                                              <block type="variables_get" id="^M1/Q:rRN$ab7RA@C?Q4">
                                                <field name="VAR" id="odM1@2[g7ma/D]_}6w*E" variabletype="">__f__first__tick</field>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <block type="variables_get" id="y9Dp4//5C3XLa35QA{/[">
                                                <field name="VAR" id="R_vYWx6-(,cxS}v`P}tX" variabletype="">__f__zero__tick</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                        <value name="B">
                                          <block type="logic_compare" id="Z[qSzcj?8W0ugBF{OPsa">
                                            <field name="OP">GT</field>
                                            <value name="A">
                                              <block type="variables_get" id="Cm79ZMFZvD4U6{M^%rP!">
                                                <field name="VAR" id="hqa4Ln=Rgh)MCW;(VGqk" variabletype="">__f__second__tick</field>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <block type="variables_get" id="dhk5,lfM[mO`ccuN4?Z+">
                                                <field name="VAR" id="R_vYWx6-(,cxS}v`P}tX" variabletype="">__f__zero__tick</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                                <statement name="DO0">
                                  <block type="variables_set" id="j6bMZL:?2Tqx[t|@b!:e">
                                    <field name="VAR" id="lUcZ^g#j|Vnm:LMvmb;R" variabletype="">__f__result</field>
                                    <value name="VALUE">
                                      <block type="logic_boolean" id="Ku#G-UdbP94DNd+ujJ.Q">
                                        <field name="BOOL">TRUE</field>
                                      </block>
                                    </value>
                                  </block>
                                </statement>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </next>
              </block>
            </next>
          </block>
        </next>
      </block>
    </statement>
    <value name="RETURN">
      <block type="variables_get" id="6XL2H0N8E)?9z+KX;WNE">
        <field name="VAR" id="lUcZ^g#j|Vnm:LMvmb;R" variabletype="">__f__result</field>
      </block>
    </value>
  </block>
  <block type="procedures_defreturn" id="^9gz]OJO6YQN]wJ:R24L" x="1544" y="-161">
    <mutation>
      <arg name="ID:values" varid="s#IAkwK{5N4EH+a#+o{K"></arg>
      <arg name="ID:period" varid="6RD1w,AM;mlJ5QBAaAg5"></arg>
    </mutation>
    <field name="NAME">is downtrend</field>
    <comment pinned="false" h="80" w="160">Describe this function...</comment>
    <statement name="STACK">
      <block type="variables_set" id="v8Baj9tHzg+Tb_Z?^7?C">
        <field name="VAR" id="!}kO8.299sv@u(#hNig9" variabletype="">ID:sma</field>
        <value name="VALUE">
          <block type="emaa" id="E]_;?ZQ2DV_|-[L3,n|?">
            <value name="INPUT">
              <block type="lists_getSublist" id="#udT2deGdIEq*NSVeO`F">
                <mutation at1="true" at2="false"></mutation>
                <field name="WHERE1">FROM_END</field>
                <field name="WHERE2">LAST</field>
                <value name="LIST">
                  <block type="variables_get" id="Lcizxzsec:W]eVqy/hQ2">
                    <field name="VAR" id="s#IAkwK{5N4EH+a#+o{K" variabletype="">ID:values</field>
                  </block>
                </value>
                <value name="AT1">
                  <block type="math_arithmetic" id="Kp1FeSOx?KX#Sh#0}D[e">
                    <field name="OP">MULTIPLY</field>
                    <value name="A">
                      <shadow type="math_number" id="V4cmRIpD@S]K~#|unBtt">
                        <field name="NUM">1</field>
                      </shadow>
                      <block type="variables_get" id="rDPTttP{~WWSz?jGZ3EC">
                        <field name="VAR" id="6RD1w,AM;mlJ5QBAaAg5" variabletype="">ID:period</field>
                      </block>
                    </value>
                    <value name="B">
                      <shadow type="math_number" id="]BO9pYlPiisZCsLWQ}N?">
                        <field name="NUM">1</field>
                      </shadow>
                      <block type="math_number" id="+KA7_s=|Jc_Du,,{Bd{,">
                        <field name="NUM">2</field>
                      </block>
                    </value>
                  </block>
                </value>
              </block>
            </value>
            <value name="PERIOD">
              <block type="variables_get" id="y+./,Bz,*KDXLUr~0lQ%">
                <field name="VAR" id="6RD1w,AM;mlJ5QBAaAg5" variabletype="">ID:period</field>
              </block>
            </value>
          </block>
        </value>
        <next>
          <block type="variables_set" id="]Vg@IBXf7|%m_JkvLy`z">
            <field name="VAR" id="fxuu`4)bt#5ipsH8frw$" variabletype="">ID:prev</field>
            <value name="VALUE">
              <block type="lists_getIndex" id="r0~;Q+a_;/(E`YqQ0@P0">
                <mutation statement="false" at="false"></mutation>
                <field name="MODE">GET</field>
                <field name="WHERE">FIRST</field>
                <value name="VALUE">
                  <block type="variables_get" id="oeD~G5fO~k-e=PN~sTV0">
                    <field name="VAR" id="!}kO8.299sv@u(#hNig9" variabletype="">ID:sma</field>
                  </block>
                </value>
              </block>
            </value>
            <next>
              <block type="variables_set" id="3P3`~]Wu,b^6i,XGzA+x">
                <field name="VAR" id="MT(0-Q3ufM|=2l#BQ@D0" variabletype="">ID:isDown</field>
                <value name="VALUE">
                  <block type="logic_boolean" id="L!`mJxK+x4sW,z}G_YI8">
                    <field name="BOOL">TRUE</field>
                  </block>
                </value>
                <next>
                  <block type="controls_forEach" id="g:UjunDCqB0QU^*b5Hc}">
                    <field name="VAR" id="Qe|FG+[BWG}l+1F1@N]S" variabletype="">ID:i</field>
                    <value name="LIST">
                      <block type="lists_getSublist" id="7]57*%,lsi+~r7p}])0M">
                        <mutation at1="true" at2="false"></mutation>
                        <field name="WHERE1">FROM_END</field>
                        <field name="WHERE2">LAST</field>
                        <value name="LIST">
                          <block type="variables_get" id="nCg?=*t]%nqCW{V0OS{r">
                            <field name="VAR" id="!}kO8.299sv@u(#hNig9" variabletype="">ID:sma</field>
                          </block>
                        </value>
                        <value name="AT1">
                          <block type="math_number" id="Oy1sUEd|ix!{eEGtm#QK">
                            <field name="NUM">2</field>
                          </block>
                        </value>
                      </block>
                    </value>
                    <statement name="DO">
                      <block type="variables_set" id="YpGuhl2]JN{Iji[9ZE,F">
                        <field name="VAR" id="MT(0-Q3ufM|=2l#BQ@D0" variabletype="">ID:isDown</field>
                        <value name="VALUE">
                          <block type="logic_operation" id="AS?Ubav=)1B3/-+@qxk}">
                            <field name="OP">AND</field>
                            <value name="A">
                              <block type="variables_get" id="FZjZc^cKbJ@:S~#.`m;(">
                                <field name="VAR" id="MT(0-Q3ufM|=2l#BQ@D0" variabletype="">ID:isDown</field>
                              </block>
                            </value>
                            <value name="B">
                              <block type="logic_compare" id="-Z/7GT5Z|uqc9qh505il">
                                <field name="OP">GTE</field>
                                <value name="A">
                                  <block type="variables_get" id="7ca@D:WrfX]5+R60t9^0">
                                    <field name="VAR" id="fxuu`4)bt#5ipsH8frw$" variabletype="">ID:prev</field>
                                  </block>
                                </value>
                                <value name="B">
                                  <block type="variables_get" id="jeeZiOJO,9+v4Ww?@v=.">
                                    <field name="VAR" id="Qe|FG+[BWG}l+1F1@N]S" variabletype="">ID:i</field>
                                  </block>
                                </value>
                              </block>
                            </value>
                          </block>
                        </value>
                      </block>
                    </statement>
                  </block>
                </next>
              </block>
            </next>
          </block>
        </next>
      </block>
    </statement>
    <value name="RETURN">
      <block type="variables_get" id="6hc68W:Zs9Dl`6AwTWly">
        <field name="VAR" id="MT(0-Q3ufM|=2l#BQ@D0" variabletype="">ID:isDown</field>
      </block>
    </value>
  </block>
  <block type="before_purchase" id="tOc)]Xd=cAm0aiy+-8(8" x="265" y="387">
    <statement name="BEFOREPURCHASE_STACK">
      <block type="controls_if" id="=#G#VT_Km1E4|f*p2RMK">
        <value name="IF0">
          <block type="logic_operation" id="]=KDo3}lAn]]%_,s))RA">
            <field name="OP">AND</field>
            <value name="A">
              <block type="logic_operation" id="X^,cHQ%MV_|~DDdchWd$">
                <field name="OP">AND</field>
                <value name="A">
                  <block type="procedures_callreturn" id="4aH0;CO@)*ME]GC,G?4Z">
                    <mutation name="isSignalUp">
                      <arg name="__input__list"></arg>
                      <arg name="__input__list__length"></arg>
                    </mutation>
                    <value name="ARG0">
                      <block type="ticks" id="$f)}pyCU9_}Edq^nL-O,"></block>
                    </value>
                    <value name="ARG1">
                      <block type="math_number" id="~`,?bCeODtU.pZ$,KIY=">
                        <field name="NUM">4</field>
                      </block>
                    </value>
                  </block>
                </value>
                <value name="B">
                  <block type="procedures_callreturn" id="+`3!LQA*$4#[9S~2aP/+">
                    <mutation name="is uptrend">
                      <arg name="IU:values"></arg>
                      <arg name="IU:period"></arg>
                    </mutation>
                    <value name="ARG0">
                      <block type="ticks" id="B-FR:{i9eG3}5cn?oAKY"></block>
                    </value>
                    <value name="ARG1">
                      <block type="math_number" id="[~-;gAhDGM;/KBn@#T{(">
                        <field name="NUM">10</field>
                      </block>
                    </value>
                  </block>
                </value>
              </block>
            </value>
            <value name="B">
              <block type="logic_negate" id="OUb+rUrPUo|A/N0jkf9x">
                <value name="BOOL">
                  <block type="procedures_callreturn" id="z[Q!ORkei[,fgY`-[Bcp">
                    <mutation name="is downtrend">
                      <arg name="ID:values"></arg>
                      <arg name="ID:period"></arg>
                    </mutation>
                    <value name="ARG0">
                      <block type="ticks" id="ehR80iV5exPC2WB]Jdi,"></block>
                    </value>
                    <value name="ARG1">
                      <block type="math_number" id="HVbs75+%_avV}``-gmc$">
                        <field name="NUM">15</field>
                      </block>
                    </value>
                  </block>
                </value>
              </block>
            </value>
          </block>
        </value>
        <statement name="DO0">
          <block type="purchase" id="Q;`vp48|v7pG%t@W6`uQ">
            <field name="PURCHASE_LIST">CALL</field>
          </block>
        </statement>
      </block>
    </statement>
  </block>
  <block type="procedures_defreturn" id="^BtPrVqmTJNfy~9H7!h8" x="994" y="409">
    <mutation>
      <arg name="IU:values" varid=".m;G8C(HW/#,9!H.Hk]J"></arg>
      <arg name="IU:period" varid="*,Fj7pjFgO[K/oQr9eQJ"></arg>
    </mutation>
    <field name="NAME">is uptrend</field>
    <comment pinned="false" h="80" w="160">Describe this function...</comment>
    <statement name="STACK">
      <block type="variables_set" id="oFBB7QmQNLjoR)t6W!2C">
        <field name="VAR" id="5/Zy6Z^R1~Qy(b)(+QTJ" variabletype="">IU:sma</field>
        <value name="VALUE">
          <block type="emaa" id="Fj0!*RD(G,%]}o!L3G*w">
            <value name="INPUT">
              <block type="lists_getSublist" id="*ybSjprIC7@E3{u=cTOM">
                <mutation at1="true" at2="false"></mutation>
                <field name="WHERE1">FROM_END</field>
                <field name="WHERE2">LAST</field>
                <value name="LIST">
                  <block type="variables_get" id="D3nDL-N084LOYR;6x;g7">
                    <field name="VAR" id=".m;G8C(HW/#,9!H.Hk]J" variabletype="">IU:values</field>
                  </block>
                </value>
                <value name="AT1">
                  <block type="math_arithmetic" id="g%){+@+drna~~WjDHuwK">
                    <field name="OP">MULTIPLY</field>
                    <value name="A">
                      <shadow type="math_number" id="V4cmRIpD@S]K~#|unBtt">
                        <field name="NUM">1</field>
                      </shadow>
                      <block type="variables_get" id="zMK#Kv5n@MTwif[[]ry,">
                        <field name="VAR" id="*,Fj7pjFgO[K/oQr9eQJ" variabletype="">IU:period</field>
                      </block>
                    </value>
                    <value name="B">
                      <shadow type="math_number" id="]BO9pYlPiisZCsLWQ}N?">
                        <field name="NUM">1</field>
                      </shadow>
                      <block type="math_number" id="(OrjD.Jy1-5Wp{[1wdYK">
                        <field name="NUM">2</field>
                      </block>
                    </value>
                  </block>
                </value>
              </block>
            </value>
            <value name="PERIOD">
              <block type="variables_get" id="f(Vd)7V_x0(UQ_mGnXV@">
                <field name="VAR" id="*,Fj7pjFgO[K/oQr9eQJ" variabletype="">IU:period</field>
              </block>
            </value>
          </block>
        </value>
        <next>
          <block type="variables_set" id="DeEXlP=J_n#0vuW1G%pG">
            <field name="VAR" id="G{Bh@]ZFnUqqw$d%6fT|" variabletype="">IU:prev</field>
            <value name="VALUE">
              <block type="lists_getIndex" id="{CwG=-yF@mFq5,;W!9yb">
                <mutation statement="false" at="false"></mutation>
                <field name="MODE">GET</field>
                <field name="WHERE">FIRST</field>
                <value name="VALUE">
                  <block type="variables_get" id="A}i@63~xLE5[z80%TPBC">
                    <field name="VAR" id="5/Zy6Z^R1~Qy(b)(+QTJ" variabletype="">IU:sma</field>
                  </block>
                </value>
              </block>
            </value>
            <next>
              <block type="variables_set" id="ya{SB(jt)[nQylUz?g,i">
                <field name="VAR" id="siP%f+FuW!8-Zz5OuW:l" variabletype="">IU:isUp</field>
                <value name="VALUE">
                  <block type="logic_boolean" id="oz,Osq,;N?pU*jC6nlC.">
                    <field name="BOOL">TRUE</field>
                  </block>
                </value>
                <next>
                  <block type="controls_forEach" id="@[yEmYG!/[|^]+D^YerX">
                    <field name="VAR" id="tEtoJqp_Y!=|v=p-woY," variabletype="">IU:i</field>
                    <value name="LIST">
                      <block type="lists_getSublist" id="-gOGm1XUH7iPu0j*s-r0">
                        <mutation at1="true" at2="false"></mutation>
                        <field name="WHERE1">FROM_END</field>
                        <field name="WHERE2">LAST</field>
                        <value name="LIST">
                          <block type="variables_get" id="*gJ4sZLz]x7oTTb+j`G+">
                            <field name="VAR" id="5/Zy6Z^R1~Qy(b)(+QTJ" variabletype="">IU:sma</field>
                          </block>
                        </value>
                        <value name="AT1">
                          <block type="math_number" id="~m.#FFdue~hkd4unG!}z">
                            <field name="NUM">2</field>
                          </block>
                        </value>
                      </block>
                    </value>
                    <statement name="DO">
                      <block type="variables_set" id="AI-=DajG}?M7U8qiYnP!">
                        <field name="VAR" id="siP%f+FuW!8-Zz5OuW:l" variabletype="">IU:isUp</field>
                        <value name="VALUE">
                          <block type="logic_operation" id="^hGB_rincn}d19e-5OZs">
                            <field name="OP">AND</field>
                            <value name="A">
                              <block type="variables_get" id="MFY`^,IRwXwv)`_9nzQz">
                                <field name="VAR" id="siP%f+FuW!8-Zz5OuW:l" variabletype="">IU:isUp</field>
                              </block>
                            </value>
                            <value name="B">
                              <block type="logic_compare" id="k!SE1wW=)7,O;,Ru8|]|">
                                <field name="OP">LTE</field>
                                <value name="A">
                                  <block type="variables_get" id="pEjpLJ()6]26Z!`XjgnR">
                                    <field name="VAR" id="G{Bh@]ZFnUqqw$d%6fT|" variabletype="">IU:prev</field>
                                  </block>
                                </value>
                                <value name="B">
                                  <block type="variables_get" id="3D`e3yhPS~]V;QG-Oq)5">
                                    <field name="VAR" id="tEtoJqp_Y!=|v=p-woY," variabletype="">IU:i</field>
                                  </block>
                                </value>
                              </block>
                            </value>
                          </block>
                        </value>
                      </block>
                    </statement>
                  </block>
                </next>
              </block>
            </next>
          </block>
        </next>
      </block>
    </statement>
    <value name="RETURN">
      <block type="variables_get" id="6FXu5;#,W=ZX:p0UqF2k">
        <field name="VAR" id="siP%f+FuW!8-Zz5OuW:l" variabletype="">IU:isUp</field>
      </block>
    </value>
  </block>
  <block type="after_purchase" id="finish" x="-190" y="529">
    <statement name="AFTERPURCHASE_STACK">
      <block type="controls_if" id="/TP%I,hfU)^|c.|/3ndN">
        <mutation else="1"></mutation>
        <value name="IF0">
          <block type="contract_check_result" id="!Ju)S0aU{UXQf0qHA6X,">
            <field name="CHECK_RESULT">win</field>
          </block>
        </value>
        <statement name="DO0">
          <block type="notify" id="gHD9SF(^C:~$q@c/;(KP">
            <field name="NOTIFICATION_TYPE">success</field>
            <field name="NOTIFICATION_SOUND">silent</field>
            <value name="MESSAGE">
              <block type="text_join" id="]Je7[};kvx`BRACG:?(;">
                <mutation items="2"></mutation>
                <value name="ADD0">
                  <block type="text" id="s/=(=W~@G6,IQ,b://B3">
                    <field name="TEXT">Won:</field>
                  </block>
                </value>
                <value name="ADD1">
                  <block type="read_details" id="SXm{k(Ltcd0rel3iez82">
                    <field name="DETAIL_INDEX">4</field>
                  </block>
                </value>
              </block>
            </value>
            <next>
              <block type="variables_set" id="!7vE(S.O$(Hp%A$z{Q)4">
                <field name="VAR" id="U[!4T1)O+ah_agGaFcqV" variabletype="">Initial Amount</field>
                <value name="VALUE">
                  <block type="variables_get" id="xt{eOIX[E!rJ4}0f(|)w">
                    <field name="VAR" id="2/I5]aVMhh/YLpSB@I?|" variabletype="">Win Amount</field>
                  </block>
                </value>
                <next>
                  <block type="variables_set" id="]ZE?WBUq.eTcfOw1[DpU">
                    <field name="VAR" id="I2_%xm@y/zf.h,.P7OW9" variabletype="">Lose Count</field>
                    <value name="VALUE">
                      <block type="math_number" id="#Aa,2*@wz85xJ{geh.u@">
                        <field name="NUM">0</field>
                      </block>
                    </value>
                  </block>
                </next>
              </block>
            </next>
          </block>
        </statement>
        <statement name="ELSE">
          <block type="notify" id="@^jo^p%_Dc9)/}ZVUN=q">
            <field name="NOTIFICATION_TYPE">warn</field>
            <field name="NOTIFICATION_SOUND">silent</field>
            <value name="MESSAGE">
              <block type="text_join" id="L!A5F7obJ6YDSU%sb~v$">
                <mutation items="2"></mutation>
                <value name="ADD0">
                  <block type="text" id=":bct,J@#aZ1,ap7%$u;m">
                    <field name="TEXT">Lost: </field>
                  </block>
                </value>
                <value name="ADD1">
                  <block type="math_single" id="Us=FXR=G20;r.vw#Qzx9">
                    <field name="OP">ABS</field>
                    <value name="NUM">
                      <shadow type="math_number" id="GleSn`9j7Cm7/dqg}FIA">
                        <field name="NUM">9</field>
                      </shadow>
                      <block type="read_details" id="6^U0{%K4N4+shx$i.^;H">
                        <field name="DETAIL_INDEX">4</field>
                      </block>
                    </value>
                  </block>
                </value>
              </block>
            </value>
            <next>
              <block type="math_change" id="i6yIDPNArPHt`40Aa??A">
                <field name="VAR" id="I2_%xm@y/zf.h,.P7OW9" variabletype="">Lose Count</field>
                <value name="DELTA">
                  <shadow type="math_number" id="4w-3#yS:qt16+HA(cAOc">
                    <field name="NUM">1</field>
                  </shadow>
                </value>
                <next>
                  <block type="math_change" id="Lp7Sf;6}.+aaQK7u|qC,">
                    <field name="VAR" id="U[!4T1)O+ah_agGaFcqV" variabletype="">Initial Amount</field>
                    <value name="DELTA">
                      <shadow type="math_number" id="N=Vo^MVz~/^(xt7Ag@8E">
                        <field name="NUM">1</field>
                      </shadow>
                      <block type="math_arithmetic" id="eN7/Pe-C@6[cZuG=;sr|">
                        <field name="OP">MULTIPLY</field>
                        <value name="A">
                          <shadow type="math_number" id="ka8n8|Dugz,q5FkUjs`7">
                            <field name="NUM">1</field>
                          </shadow>
                          <block type="math_single" id="n#dZL(R~tbmwTs^YpY{n">
                            <field name="OP">ABS</field>
                            <value name="NUM">
                              <shadow type="math_number" id="GleSn`9j7Cm7/dqg}FIA">
                                <field name="NUM">9</field>
                              </shadow>
                              <block type="read_details" id="bV`6lc$_j`ElSi~fxG-e">
                                <field name="DETAIL_INDEX">4</field>
                              </block>
                            </value>
                          </block>
                        </value>
                        <value name="B">
                          <shadow type="math_number" id="{JXdZCp2%s=sfO@yN:n}">
                            <field name="NUM">1</field>
                          </shadow>
                          <block type="math_number" id="L2m6.74Wo}DL)X%A@uE}">
                            <field name="NUM">10.5</field>
                          </block>
                        </value>
                      </block>
                    </value>
                    <next>
                      <block type="controls_if" id="THEX=3SJ9vM.fn6isSQX">
                        <value name="IF0">
                          <block type="logic_compare" id=")?vQl#~,J(1mnfNi]c|F">
                            <field name="OP">GTE</field>
                            <value name="A">
                              <block type="variables_get" id="ukW~~@_Nepm]fCBs]LI-">
                                <field name="VAR" id="I2_%xm@y/zf.h,.P7OW9" variabletype="">Lose Count</field>
                              </block>
                            </value>
                            <value name="B">
                              <block type="math_number" id="YPnkyY}Re@N`#hi$:+qK">
                                <field name="NUM">3</field>
                              </block>
                            </value>
                          </block>
                        </value>
                        <statement name="DO0">
                          <block type="variables_set" id="{Dp3Zh`qx3F{e%!zm[oF">
                            <field name="VAR" id="U[!4T1)O+ah_agGaFcqV" variabletype="">Initial Amount</field>
                            <value name="VALUE">
                              <block type="variables_get" id="h:P1U@JR9*Miyg4^$hVa">
                                <field name="VAR" id="2/I5]aVMhh/YLpSB@I?|" variabletype="">Win Amount</field>
                              </block>
                            </value>
                          </block>
                        </statement>
                      </block>
                    </next>
                  </block>
                </next>
              </block>
            </next>
          </block>
        </statement>
        <next>
          <block type="notify" id="1)tW7}^o?Ym2qm8-qmdO">
            <field name="NOTIFICATION_TYPE">info</field>
            <field name="NOTIFICATION_SOUND">silent</field>
            <value name="MESSAGE">
              <block type="text_join" id="t]P+(Nqhmu!Tg.F7-CPr">
                <mutation items="2"></mutation>
                <value name="ADD0">
                  <block type="text" id="7gm[}!($og`%Y,*D%j%;">
                    <field name="TEXT">Total Profit: </field>
                  </block>
                </value>
                <value name="ADD1">
                  <block type="total_profit" id="|K4ymCMY8D%B0Pqg?9ad"></block>
                </value>
              </block>
            </value>
            <next>
              <block type="controls_if" id="IuxXfH4y2;l}4;x^GXgv">
                <mutation else="1"></mutation>
                <value name="IF0">
                  <block type="logic_compare" id="Qq=J(YADm#qJRtdnM78y">
                    <field name="OP">LT</field>
                    <value name="A">
                      <block type="total_profit" id="W{-s|:=aTg]?pW@/|k~#"></block>
                    </value>
                    <value name="B">
                      <block type="variables_get" id="~h}JcSkFo$2+DvY7Z(i1">
                        <field name="VAR" id="sD%Zeh_:c!^kNg?N}yW[" variabletype="">Expected Profit</field>
                      </block>
                    </value>
                  </block>
                </value>
                <statement name="DO0">
                  <block type="trade_again" id=";?v.`3czHAz0=p.kKdO$"></block>
                </statement>
                <statement name="ELSE">
                  <block type="math_change" id=".l$=JV:[:3Xv+|ieO]bz">
                    <field name="VAR" id="sD%Zeh_:c!^kNg?N}yW[" variabletype="">Expected Profit</field>
                    <value name="DELTA">
                      <shadow type="math_number" id=",D0y_.Qn90CHFf+HF-Uv">
                        <field name="NUM">100</field>
                      </shadow>
                    </value>
                    <next>
                      <block type="timeout" id=";;voY2rY]2q;?L$%`eWX">
                        <statement name="TIMEOUTSTACK">
                          <block type="trade_again" id="/$sH!$V)N[9MI~v`+[Y-"></block>
                        </statement>
                        <value name="SECONDS">
                          <shadow type="math_number" id="^AGx^T)Bs@2hIA)z)91M">
                            <field name="NUM">15</field>
                          </shadow>
                        </value>
                      </block>
                    </next>
                  </block>
                </statement>
              </block>
            </next>
          </block>
        </next>
      </block>
    </statement>
  </block>
</xml>