﻿<xml xmlns="http://www.w3.org/1999/xhtml" collection="false">
  <block type="loader" id="l9;z(KA,X4wl}.C$%!6V" x="0" y="0">
    <field name="URL">https://gist.githubusercontent.com/binary-ex-machina/53c01f08106c45d586e24a7deabb5b81/raw/5f40d4e90a5b43867c01656c2015278f389f1ea2/exmachina-martingale.xml</field>
  </block>
  <block type="trade" id="xgH69|xFn9=70w.*3Vo@" x="0" y="53">
    <field name="MARKET_LIST">volidx</field>
    <field name="SUBMARKET_LIST">random_index</field>
    <field name="SYMBOL_LIST">R_100</field>
    <field name="TRADETYPECAT_LIST">callput</field>
    <field name="TRADETYPE_LIST">risefall</field>
    <field name="TYPE_LIST">both</field>
    <field name="CANDLEINTERVAL_LIST">60</field>
    <field name="TIME_MACHINE_ENABLED">FALSE</field>
    <field name="RESTARTONERROR">TRUE</field>
    <statement name="INITIALIZATION">
      <block type="procedures_callnoreturn" id="ogCq=}Pmma8[V::]*y.v">
        <mutation name="exMachina::ConfigMartingale(1)">
          <arg name="_targetProfit(ex:25)"></arg>
          <arg name="_stopLoss(ex:200)"></arg>
          <arg name="_initialStake(ex:1)"></arg>
          <arg name="_martingale(ex:1.06)"></arg>
        </mutation>
        <value name="ARG0">
          <block type="math_number" id="6x14@Z=%vDc%MYKG=/JW">
            <field name="NUM">50</field>
          </block>
        </value>
        <value name="ARG1">
          <block type="math_number" id="5xGYzU{iN1HL88wH$+Y6">
            <field name="NUM">200</field>
          </block>
        </value>
        <value name="ARG2">
          <block type="math_number" id="nUmv|?DZ=dHgMG,mort@">
            <field name="NUM">0.35</field>
          </block>
        </value>
        <value name="ARG3">
          <block type="math_number" id="#)$+2r}Ug,CQ}^}PSfZl">
            <field name="NUM">1.06</field>
          </block>
        </value>
        <next>
          <block type="procedures_callnoreturn" id="LlhK]VvVuGjM=Qw-S:$Y">
            <mutation name="exMachina::CyclesConfig(1)">
              <arg name="_numCycles(10)"></arg>
              <arg name="_minProfitPerCycle(85%_of_stake)"></arg>
              <arg name="_martingaleOnWin"></arg>
              <arg name="_holder(15)"></arg>
            </mutation>
            <value name="ARG0">
              <block type="math_number" id="RaDHZyoRO{9;C7^A]d.J">
                <field name="NUM">1</field>
              </block>
            </value>
            <value name="ARG1">
              <block type="math_number" id="L9oQdQySI4a$^h7t?(TV">
                <field name="NUM">0.28</field>
              </block>
            </value>
            <value name="ARG2">
              <block type="logic_boolean" id=";lqFRiwmN}1)d:8HarF6">
                <field name="BOOL">TRUE</field>
              </block>
            </value>
            <value name="ARG3">
              <block type="math_number" id="{Q5[i.lXt9$:va*E=)b!">
                <field name="NUM">15</field>
              </block>
            </value>
          </block>
        </next>
      </block>
    </statement>
    <statement name="SUBMARKET">
      <block type="tradeOptions" id="x=V33~4Lb|(sLv`J[:Eb">
        <field name="DURATIONTYPE_LIST">t</field>
        <field name="CURRENCY_LIST">USD</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">1</field>
          </shadow>
          <block type="procedures_callreturn" id="EAM;a#U~x=5=@]m|}7?^">
            <mutation name="exMachina::Stake"></mutation>
          </block>
        </value>
      </block>
    </statement>
  </block>
  <block type="before_purchase" id="i-CIx.(Onm4?ihxzA}Y]" x="0" y="591">
    <statement name="BEFOREPURCHASE_STACK">
      <block type="timeout" id="oH=Z?;{}BULR$bUW^le%">
        <statement name="TIMEOUTSTACK">
          <block type="controls_if" id="RaG[J+,2.pG/^G4j[e)`" collapsed="true">
            <mutation elseif="1"></mutation>
            <value name="IF0">
              <block type="logic_operation" id="lh$b,Cb|;9bYeHYHuoo*" inline="false">
                <field name="OP">OR</field>
                <value name="A">
                  <block type="logic_operation" id="s:=/TI7J99wH#br!PwiC">
                    <field name="OP">AND</field>
                    <value name="A">
                      <block type="procedures_callreturn" id="_cwLL2{,2x)V)/Wn0E7y">
                        <mutation name="exMachina::IsUpTrend"></mutation>
                      </block>
                    </value>
                    <value name="B">
                      <block type="procedures_callreturn" id="qdy0x}^zb!_MirP*AxZo">
                        <mutation name="exMachina::IsGreen"></mutation>
                      </block>
                    </value>
                  </block>
                </value>
                <value name="B">
                  <block type="logic_operation" id="ex@Xm_KX7DQ:e/jaN0-4">
                    <field name="OP">AND</field>
                    <value name="A">
                      <block type="procedures_callreturn" id=",$~hRmzU~B(f(Kj*.7V]">
                        <mutation name="exMachina::IsDownTrend"></mutation>
                      </block>
                    </value>
                    <value name="B">
                      <block type="procedures_callreturn" id="2.VHFwOH@R{xIKiN}ALH">
                        <mutation name="isGreenMarubosu"></mutation>
                      </block>
                    </value>
                  </block>
                </value>
              </block>
            </value>
            <statement name="DO0">
              <block type="purchase" id="wyAdR4$=sm#)3r^At8O#">
                <field name="PURCHASE_LIST">CALL</field>
              </block>
            </statement>
            <value name="IF1">
              <block type="logic_operation" id="RKlGP7w6{t=|ZYmg%Ms|" inline="false" collapsed="true">
                <field name="OP">OR</field>
                <value name="A">
                  <block type="logic_operation" id="3)uTaRZA`Y{T?xvH(ao_">
                    <field name="OP">AND</field>
                    <value name="A">
                      <block type="procedures_callreturn" id="GAjX=^}DiP$H)DaW?3CM">
                        <mutation name="exMachina::IsDownTrend"></mutation>
                      </block>
                    </value>
                    <value name="B">
                      <block type="procedures_callreturn" id="looK_~#Qp0#J?IAQd6r9">
                        <mutation name="exMachina::IsRed"></mutation>
                      </block>
                    </value>
                  </block>
                </value>
                <value name="B">
                  <block type="logic_operation" id="L%+MwbbO:M9~!W^Hre=|">
                    <field name="OP">AND</field>
                    <value name="A">
                      <block type="procedures_callreturn" id="3A`oHz-nDU}0SpGUY38y">
                        <mutation name="exMachina::IsUpTrend"></mutation>
                      </block>
                    </value>
                    <value name="B">
                      <block type="procedures_callreturn" id="^Ui:XnH_n|oV#0n8!pX_">
                        <mutation name="isRedMarubosu"></mutation>
                      </block>
                    </value>
                  </block>
                </value>
              </block>
            </value>
            <statement name="DO1">
              <block type="purchase" id="!1!;bRwX_xOdc0l#*.1D">
                <field name="PURCHASE_LIST">PUT</field>
              </block>
            </statement>
          </block>
        </statement>
        <value name="SECONDS">
          <shadow type="math_number" id="RSLus)GD)89fgb?Ce+E^">
            <field name="NUM">1</field>
          </shadow>
          <block type="variables_get" id="m%q}fKNV#B15M#amJT3!">
            <field name="VAR">exMachina::cycleHolder</field>
          </block>
        </value>
      </block>
    </statement>
  </block>
  <block type="after_purchase" id="D^Jz1^n=2vtZku1vBN@;" x="0" y="731">
    <statement name="AFTERPURCHASE_STACK">
      <block type="procedures_callnoreturn" id="^6a8#8W6Fx@=1(Z~PQ}9">
        <mutation name="exMachina::Martingale(4)">
          <arg name="_profit(contract_detail:profit)"></arg>
        </mutation>
        <value name="ARG0">
          <block type="read_details" id="..E4j{4|^DMVDD?`bGjG">
            <field name="DETAIL_INDEX">4</field>
          </block>
        </value>
        <next>
          <block type="procedures_callnoreturn" id="+vCcz|W#,:n~D,~WU3.6">
            <mutation name="exMachina::Cycles(4)">
              <arg name="_profit(contract_detail:profit)"></arg>
            </mutation>
            <value name="ARG0">
              <block type="read_details" id="}^;sU6*1TAV1cCe)+i24">
                <field name="DETAIL_INDEX">4</field>
              </block>
            </value>
            <next>
              <block type="controls_if" id="8D$4BBKr.C^8!nig=L]e">
                <value name="IF0">
                  <block type="logic_operation" id="9HXWP?kL|(Q*b$_`?_5D">
                    <field name="OP">AND</field>
                    <value name="A">
                      <block type="procedures_callreturn" id="?=Ag~]Zd@rbMwk|xkL`B">
                        <mutation name="exMachina::TradeAgain"></mutation>
                      </block>
                    </value>
                    <value name="B">
                      <block type="procedures_callreturn" id="Ne`4W65D7y%)(dkQWkaC">
                        <mutation name="exMachina::CycleAgain"></mutation>
                      </block>
                    </value>
                  </block>
                </value>
                <statement name="DO0">
                  <block type="trade_again" id="c)S|KjoQdXc8l#J@5z3P"></block>
                </statement>
              </block>
            </next>
          </block>
        </next>
      </block>
    </statement>
  </block>
  <block type="tick_analysis" id="C180ZhDa[vU1U,_:XCXx" x="0" y="971">
    <statement name="TICKANALYSIS_STACK">
      <block type="variables_set" id="CHQ)et~G5TQiYoEtEF5!">
        <field name="VAR">exMachina::candles</field>
        <value name="VALUE">
          <block type="ohlc" id="l(j;=yD9Ky|N0n:5;ri=">
            <field name="CANDLEINTERVAL_LIST">default</field>
          </block>
        </value>
        <next>
          <block type="variables_set" id="jG@:SAmKmH}[0frN{#vk">
            <field name="VAR">exMachina::lastTick</field>
            <value name="VALUE">
              <block type="tick" id="0IZMAs003RMVPfZ^*?cH"></block>
            </value>
          </block>
        </next>
      </block>
    </statement>
  </block>
  <block type="procedures_defnoreturn" id="/5G*JG$WwxkV[XD-$T)z" collapsed="true" x="0" y="1089">
    <mutation>
      <arg name="_numCycles(10)"></arg>
      <arg name="_minProfitPerCycle(85%_of_stake)"></arg>
      <arg name="_martingaleOnWin"></arg>
      <arg name="_holder(15)"></arg>
    </mutation>
    <field name="NAME">exMachina::CyclesConfig(1)</field>
    <comment pinned="false" h="80" w="160">Describe this function...</comment>
    <statement name="STACK">
      <block type="variables_set" id="k!65,kNq4lojDTkEObF=">
        <field name="VAR">exMachina::maxCycles</field>
        <value name="VALUE">
          <block type="variables_get" id=":7Ep=Bn-P];3g@Aq,P8p">
            <field name="VAR">_numCycles(10)</field>
          </block>
        </value>
        <next>
          <block type="variables_set" id="#Zi?fD?;m%#?N8H4v#wg">
            <field name="VAR">exMachina::martingaleOnWin</field>
            <value name="VALUE">
              <block type="variables_get" id="*_M[brlxW=99o}m?1NiJ">
                <field name="VAR">_martingaleOnWin</field>
              </block>
            </value>
            <next>
              <block type="variables_set" id="NLl:mk7$j~@_!Nb10r=r">
                <field name="VAR">exMachina::cycles</field>
                <value name="VALUE">
                  <block type="math_number" id="9gj+jP:bh?/FJ{gfG_UJ">
                    <field name="NUM">0</field>
                  </block>
                </value>
                <next>
                  <block type="variables_set" id="#(z15XG,;J`qFj]mB?-n">
                    <field name="VAR">exMachina::cyclesProfit</field>
                    <value name="VALUE">
                      <block type="math_number" id="#LG?Rfv%voSWGCOB5,9v">
                        <field name="NUM">0</field>
                      </block>
                    </value>
                    <next>
                      <block type="variables_set" id="m_q}9ML=6lbx|,Pl]tKF">
                        <field name="VAR">exMachina::cycleHolder</field>
                        <value name="VALUE">
                          <block type="variables_get" id="}7!7kDEm9_}a=4M]?mIU">
                            <field name="VAR">_holder(15)</field>
                          </block>
                        </value>
                        <next>
                          <block type="variables_set" id="4|.XQ-H*=cU6Mclj)d|E">
                            <field name="VAR">exMachina::minProfitPerCycle</field>
                            <value name="VALUE">
                              <block type="variables_get" id="5i$Dvi]p?3Hm*T?0o-i?">
                                <field name="VAR">_minProfitPerCycle(85%_of_stake)</field>
                              </block>
                            </value>
                            <next>
                              <block type="notify" id="_RMs9$Hg5[Wy#sGTTrH#">
                                <field name="NOTIFICATION_TYPE">info</field>
                                <field name="NOTIFICATION_SOUND">silent</field>
                                <value name="MESSAGE">
                                  <shadow type="text" id="f=ou1[^tEewm!O4M]R=;">
                                    <field name="TEXT">abc</field>
                                  </shadow>
                                  <block type="text_join" id="lXI*w4tHC-z,B!p;__rV">
                                    <mutation items="2"></mutation>
                                    <value name="ADD0">
                                      <block type="text" id=";HCB56#R|%*7cQ4@S{eA">
                                        <field name="TEXT">Max Cycles: </field>
                                      </block>
                                    </value>
                                    <value name="ADD1">
                                      <block type="variables_get" id="vwR);f#O$;]bF}NSMR,?">
                                        <field name="VAR">exMachina::maxCycles</field>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </next>
              </block>
            </next>
          </block>
        </next>
      </block>
    </statement>
  </block>
  <block type="procedures_defnoreturn" id="/FD(@F1+YFHFL8^3mttU" collapsed="true" x="0" y="1141">
    <mutation>
      <arg name="_profit(contract_detail:profit)"></arg>
    </mutation>
    <field name="NAME">exMachina::Cycles(4)</field>
    <comment pinned="false" h="80" w="160">Describe this function...</comment>
    <statement name="STACK">
      <block type="math_change" id="n[nnprou!S_dD_mJKfOp">
        <field name="VAR">exMachina::cyclesProfit</field>
        <value name="DELTA">
          <shadow type="math_number" id="MV7Rjdn0ceqdgouBXc|d">
            <field name="NUM">1</field>
          </shadow>
          <block type="variables_get" id="_6Q{iOywJ!1x6~apA4zz">
            <field name="VAR">_profit(contract_detail:profit)</field>
          </block>
        </value>
        <next>
          <block type="controls_if" id="Y!K2+?|2Ph=`v?sU4$O9">
            <value name="IF0">
              <block type="variables_get" id="nAfZ$l}T;`uAiN_1Y{ko">
                <field name="VAR">exMachina::martingaleOnWin</field>
              </block>
            </value>
            <statement name="DO0">
              <block type="controls_if" id="EZ!%gy*TV)3~224#gReI">
                <mutation else="1"></mutation>
                <value name="IF0">
                  <block type="logic_compare" id="|7XZ[J=e5D:1A:u5o*/|">
                    <field name="OP">GT</field>
                    <value name="A">
                      <block type="variables_get" id="}bjMOQf*wtwGJ2;5w6Ll">
                        <field name="VAR">_profit(contract_detail:profit)</field>
                      </block>
                    </value>
                    <value name="B">
                      <block type="math_number" id="gv3K.I=$,OH.hFU$+Sci">
                        <field name="NUM">0</field>
                      </block>
                    </value>
                  </block>
                </value>
                <statement name="DO0">
                  <block type="math_change" id="vY?PUIG@r`D18@X_!q)Q">
                    <field name="VAR">exMachina::wins</field>
                    <value name="DELTA">
                      <shadow type="math_number" id="uKh53Wtg`S.mP1LHKt0I">
                        <field name="NUM">1</field>
                      </shadow>
                    </value>
                  </block>
                </statement>
                <statement name="ELSE">
                  <block type="variables_set" id="f?(FCSEI.Y;q9x[ev(eA">
                    <field name="VAR">exMachina::wins</field>
                    <value name="VALUE">
                      <block type="math_number" id="GZF7vbGFjc}];H$-Q-X$">
                        <field name="NUM">0</field>
                      </block>
                    </value>
                  </block>
                </statement>
                <next>
                  <block type="controls_if" id="o4GSEZ7,U@eH[]I:imE0">
                    <value name="IF0">
                      <block type="logic_compare" id="99Wn=GKeJS*x$EO+a5#g">
                        <field name="OP">EQ</field>
                        <value name="A">
                          <block type="variables_get" id="5Fcc9^)JHBE.0jWt5Cd;">
                            <field name="VAR">exMachina::wins</field>
                          </block>
                        </value>
                        <value name="B">
                          <block type="math_number" id="NP96NNqJ~EC-=@%~fY-r">
                            <field name="NUM">1</field>
                          </block>
                        </value>
                      </block>
                    </value>
                    <statement name="DO0">
                      <block type="variables_set" id="TzOS.dmd8!3_Q^%ET.ww">
                        <field name="VAR">exMachina::cycleStake</field>
                        <value name="VALUE">
                          <block type="variables_get" id="P1tdd,e[HcO8W#e;MTn$">
                            <field name="VAR">exMachina::stake</field>
                          </block>
                        </value>
                      </block>
                    </statement>
                    <next>
                      <block type="controls_if" id="/%3^DByPCRc^2veqxf)I">
                        <value name="IF0">
                          <block type="logic_compare" id="aTWMk|hQZ.Uc-3l-XSe;">
                            <field name="OP">GT</field>
                            <value name="A">
                              <block type="variables_get" id="DR,s?#_H_Y]GE.);}Rs/">
                                <field name="VAR">exMachina::wins</field>
                              </block>
                            </value>
                            <value name="B">
                              <block type="math_number" id="frlBw.4q,/dTkNu5=m+4">
                                <field name="NUM">1</field>
                              </block>
                            </value>
                          </block>
                        </value>
                        <statement name="DO0">
                          <block type="math_change" id="sONY?-Q{6?_SII(Zk*FN">
                            <field name="VAR">exMachina::cycleStake</field>
                            <value name="DELTA">
                              <shadow type="math_number" id="(}lr36UxwC`B}*v1C:i2">
                                <field name="NUM">1</field>
                              </shadow>
                              <block type="math_arithmetic" id="=jEyqt[Stk#]t?=^DuIX" inline="false">
                                <field name="OP">MULTIPLY</field>
                                <value name="A">
                                  <shadow type="math_number" id="3t^aNR+K;J3J1^`Hg!NK">
                                    <field name="NUM">1</field>
                                  </shadow>
                                  <block type="variables_get" id="dl%nIb5l^62|3Vkw.nO)">
                                    <field name="VAR">exMachina::cycleStake</field>
                                  </block>
                                </value>
                                <value name="B">
                                  <shadow type="math_number" id="XkHwE?u(*ksU[=M__CO1">
                                    <field name="NUM">1</field>
                                  </shadow>
                                  <block type="variables_get" id="AKz[pr3npyDsfX(!des_">
                                    <field name="VAR">exMachina::martingale</field>
                                  </block>
                                </value>
                              </block>
                            </value>
                            <next>
                              <block type="variables_set" id="Halo$B?o@F78~~7V]?gU">
                                <field name="VAR">exMachina::stake</field>
                                <value name="VALUE">
                                  <block type="variables_get" id="#!C=:K$89uKVcs4}eN,6">
                                    <field name="VAR">exMachina::cycleStake</field>
                                  </block>
                                </value>
                              </block>
                            </next>
                          </block>
                        </statement>
                      </block>
                    </next>
                  </block>
                </next>
              </block>
            </statement>
            <next>
              <block type="controls_if" id=",6Ki}HIAzc*A1G|LmyH?">
                <value name="IF0">
                  <block type="logic_compare" id="+fWIc9-Z6+CU71S)D?nc">
                    <field name="OP">GT</field>
                    <value name="A">
                      <block type="variables_get" id="|?ze)c+..S?OV]qfLohw">
                        <field name="VAR">exMachina::cyclesProfit</field>
                      </block>
                    </value>
                    <value name="B">
                      <block type="variables_get" id="JxmNR:?X][CYdzp,ORCJ">
                        <field name="VAR">exMachina::minProfitPerCycle</field>
                      </block>
                    </value>
                  </block>
                </value>
                <statement name="DO0">
                  <block type="variables_set" id="B,lL}ouQ(pWP(RXS98*,">
                    <field name="VAR">exMachina::cyclesProfit</field>
                    <value name="VALUE">
                      <block type="math_number" id="~y3h#AdYbz.lwKc:uHBw">
                        <field name="NUM">0</field>
                      </block>
                    </value>
                    <next>
                      <block type="math_change" id="[^^F3S_qhc|?|mCE[7l!">
                        <field name="VAR">exMachina::cycles</field>
                        <value name="DELTA">
                          <shadow type="math_number" id="3g2bE4R*51GFIqs~Q|yV">
                            <field name="NUM">1</field>
                          </shadow>
                        </value>
                        <next>
                          <block type="variables_set" id="a%%7p_w,p^8y*~+JLLO%">
                            <field name="VAR">exMachina::stake</field>
                            <value name="VALUE">
                              <block type="variables_get" id="k}R6?t}aiEddQj]tkh:j">
                                <field name="VAR">exMachina::InitialStake</field>
                              </block>
                            </value>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </statement>
                <next>
                  <block type="notify" id="W?Mv4{e,9ud$Bg+$kQAu">
                    <field name="NOTIFICATION_TYPE">info</field>
                    <field name="NOTIFICATION_SOUND">silent</field>
                    <value name="MESSAGE">
                      <shadow type="text" id="f=ou1[^tEewm!O4M]R=;">
                        <field name="TEXT">abc</field>
                      </shadow>
                      <block type="text_join" id="rzV,=Yx8aO5mIc!w,L!]">
                        <mutation items="4"></mutation>
                        <value name="ADD0">
                          <block type="text" id="1vWlIxO9Xd2p5x_y8QrY">
                            <field name="TEXT">Cycle: </field>
                          </block>
                        </value>
                        <value name="ADD1">
                          <block type="variables_get" id="y`aWfu]1Bk~0!8[DVh^?">
                            <field name="VAR">exMachina::cycles</field>
                          </block>
                        </value>
                        <value name="ADD2">
                          <block type="text" id="~jqmjD5C|z-SJPH2jAid">
                            <field name="TEXT"> | Cycle Profit: </field>
                          </block>
                        </value>
                        <value name="ADD3">
                          <block type="variables_get" id="T!}2x!V4qOv(4WxAnz8m">
                            <field name="VAR">exMachina::cyclesProfit</field>
                          </block>
                        </value>
                      </block>
                    </value>
                  </block>
                </next>
              </block>
            </next>
          </block>
        </next>
      </block>
    </statement>
  </block>
  <block type="procedures_defreturn" id="s(s:tu9y;*cqNoU-/Hql" collapsed="true" x="0" y="1193">
    <field name="NAME">exMachina::IsUpTrend</field>
    <comment pinned="false" h="80" w="160">Describe this function...</comment>
    <value name="RETURN">
      <block type="logic_compare" id="j_dWUs`JUmJd]XK4;4yO">
        <field name="OP">GT</field>
        <value name="A">
          <block type="variables_get" id="YRG4vOI;IMv|.M%4OYji">
            <field name="VAR">exMachina::lastTick</field>
          </block>
        </value>
        <value name="B">
          <block type="ema" id="K*fAkXyFM4sAk#5${q`n">
            <value name="INPUT">
              <block type="ohlc_values_in_list" id="A*s;WFgFy7-F{/1C$0aR">
                <field name="OHLCFIELD_LIST">close</field>
                <value name="OHLCLIST">
                  <block type="variables_get" id="sSy9Ai;G?:~q+]h!)zw^">
                    <field name="VAR">exMachina::candles</field>
                  </block>
                </value>
              </block>
            </value>
            <value name="PERIOD">
              <shadow type="math_number" id="Y~8am`wW]rBg~@G5Yy-7">
                <field name="NUM">50</field>
              </shadow>
            </value>
          </block>
        </value>
      </block>
    </value>
  </block>
  <block type="procedures_defreturn" id="Q/$uh_ZVIwqeWDfl][W~" collapsed="true" x="0" y="1245">
    <field name="NAME">exMachina::IsDownTrend</field>
    <comment pinned="false" h="80" w="160">Describe this function...</comment>
    <value name="RETURN">
      <block type="logic_compare" id="wz4JsCewdOSFE_#tSZen">
        <field name="OP">LT</field>
        <value name="A">
          <block type="variables_get" id="-U{{%i(xIgqx7J-5k3JS">
            <field name="VAR">exMachina::lastTick</field>
          </block>
        </value>
        <value name="B">
          <block type="ema" id="3jS@qrxgnkw-S%eNlg8D">
            <value name="INPUT">
              <block type="ohlc_values_in_list" id="H18Bcd9J3B{r$9:Hi$H;">
                <field name="OHLCFIELD_LIST">close</field>
                <value name="OHLCLIST">
                  <block type="variables_get" id="8tdl;/+F)B.Ml1(Ultpz">
                    <field name="VAR">exMachina::candles</field>
                  </block>
                </value>
              </block>
            </value>
            <value name="PERIOD">
              <shadow type="math_number" id="t?p9T-aJ(+/{{MVJXNNY">
                <field name="NUM">50</field>
              </shadow>
            </value>
          </block>
        </value>
      </block>
    </value>
  </block>
  <block type="procedures_defreturn" id="^qMbwQV6*_QM4#QXZx-6" collapsed="true" x="0" y="1297">
    <field name="NAME">isGreenMarubosu</field>
    <comment pinned="false" h="80" w="160">Describe this function...</comment>
    <value name="RETURN">
      <block type="logic_compare" id="JGV2KXBmxAEr+QVVts8R" inline="false">
        <field name="OP">EQ</field>
        <value name="A">
          <block type="read_ohlc_obj" id="i(}J#kGB@2DoV]kRM}IC">
            <field name="OHLCFIELD_LIST">low</field>
            <value name="OHLCOBJ">
              <block type="lists_getIndex" id="toFREZL1Wdg=oHmxfX+}">
                <mutation statement="false" at="false"></mutation>
                <field name="MODE">GET</field>
                <field name="WHERE">LAST</field>
                <value name="VALUE">
                  <block type="variables_get" id="W:O4?kK{#9=QC4R)ylc=">
                    <field name="VAR">exMachina::candles</field>
                  </block>
                </value>
              </block>
            </value>
          </block>
        </value>
        <value name="B">
          <block type="read_ohlc_obj" id="!,7~9#:y#|MD5?D4YT1|">
            <field name="OHLCFIELD_LIST">open</field>
            <value name="OHLCOBJ">
              <block type="lists_getIndex" id="NmE80skbpk-={t#4+N=[">
                <mutation statement="false" at="false"></mutation>
                <field name="MODE">GET</field>
                <field name="WHERE">LAST</field>
                <value name="VALUE">
                  <block type="variables_get" id="Y}[wmD8Rn=}_Xl#-M~z,">
                    <field name="VAR">exMachina::candles</field>
                  </block>
                </value>
              </block>
            </value>
          </block>
        </value>
      </block>
    </value>
  </block>
  <block type="procedures_defreturn" id="y,2vwQZ!-b?_D_oAffv3" collapsed="true" x="0" y="1349">
    <field name="NAME">exMachina::CycleAgain</field>
    <comment pinned="false" h="80" w="160">Describe this function...</comment>
    <statement name="STACK">
      <block type="controls_if" id="`2g95aJ~xEx}W!=$o)mL">
        <value name="IF0">
          <block type="logic_compare" id="2jY5r,un6pH;N$zE3B$a">
            <field name="OP">EQ</field>
            <value name="A">
              <block type="variables_get" id="I^Ysl]]8LXvun{cOC/Nj">
                <field name="VAR">exMachina::cycles</field>
              </block>
            </value>
            <value name="B">
              <block type="variables_get" id="#it%^M2*s2eX(Ia;[g[2">
                <field name="VAR">exMachina::maxCycles</field>
              </block>
            </value>
          </block>
        </value>
        <statement name="DO0">
          <block type="text_print" id="%7im3M*/A?QB:f2XW=32">
            <value name="TEXT">
              <shadow type="text" id="x3sH|7AVnY]!fC8)IvxQ">
                <field name="TEXT">abc</field>
              </shadow>
              <block type="text_join" id="BLyTS%KS/_KTE?{ki^?T">
                <mutation items="2"></mutation>
                <value name="ADD0">
                  <block type="text" id="LD2.rv830;ehuhob+iZ;">
                    <field name="TEXT">All cycles completed with: </field>
                  </block>
                </value>
                <value name="ADD1">
                  <block type="variables_get" id="!kqBY:oA$.!(tPsEw0p2">
                    <field name="VAR">exMachina::totalProfit</field>
                  </block>
                </value>
              </block>
            </value>
          </block>
        </statement>
      </block>
    </statement>
    <value name="RETURN">
      <block type="logic_compare" id="UI2lz:yI,OIg]f]*xO(:">
        <field name="OP">LT</field>
        <value name="A">
          <block type="variables_get" id="TZ,*6%$,nmE?zDjCr`mH">
            <field name="VAR">exMachina::cycles</field>
          </block>
        </value>
        <value name="B">
          <block type="variables_get" id="sZ)h=;5xs7x{+e{z=;Z=">
            <field name="VAR">exMachina::maxCycles</field>
          </block>
        </value>
      </block>
    </value>
  </block>
  <block type="procedures_defreturn" id="(@q./VQ3%)I7iQYf3zwM" collapsed="true" x="0" y="1401">
    <field name="NAME">isRedMarubosu</field>
    <comment pinned="false" h="80" w="160">Describe this function...</comment>
    <value name="RETURN">
      <block type="logic_compare" id="auHC5u4/K6ic!G7i2@[:" inline="false">
        <field name="OP">EQ</field>
        <value name="A">
          <block type="read_ohlc_obj" id="SUT#4{F[uE0ieT!oig~D">
            <field name="OHLCFIELD_LIST">high</field>
            <value name="OHLCOBJ">
              <block type="lists_getIndex" id="GV@83u)?sq7obZ@bT[O6">
                <mutation statement="false" at="false"></mutation>
                <field name="MODE">GET</field>
                <field name="WHERE">LAST</field>
                <value name="VALUE">
                  <block type="variables_get" id="7m,Mas*~q(yGS}~TCe4$">
                    <field name="VAR">exMachina::candles</field>
                  </block>
                </value>
              </block>
            </value>
          </block>
        </value>
        <value name="B">
          <block type="read_ohlc_obj" id="sFK-h|{[t@Pj4q!:i_b[">
            <field name="OHLCFIELD_LIST">open</field>
            <value name="OHLCOBJ">
              <block type="lists_getIndex" id="ey!oJ#__VF{.PE?/J1tg">
                <mutation statement="false" at="false"></mutation>
                <field name="MODE">GET</field>
                <field name="WHERE">LAST</field>
                <value name="VALUE">
                  <block type="variables_get" id="_GVb)T/:fX]M8)T_VN2w">
                    <field name="VAR">exMachina::candles</field>
                  </block>
                </value>
              </block>
            </value>
          </block>
        </value>
      </block>
    </value>
  </block>
  <block type="procedures_defreturn" id="cdel~{U!v9V_54.S_m0R" collapsed="true" x="0" y="1453">
    <field name="NAME">exMachina::IsRed</field>
    <comment pinned="false" h="80" w="160">Describe this function...</comment>
    <value name="RETURN">
      <block type="logic_compare" id="kj/iJ4P_9}zd@diKNzag" inline="false">
        <field name="OP">LT</field>
        <value name="A">
          <block type="variables_get" id="l16x%3:Wc_#V77szljjo">
            <field name="VAR">exMachina::lastTick</field>
          </block>
        </value>
        <value name="B">
          <block type="read_ohlc_obj" id="N-N^2_ATr)GMH-W(.=yo">
            <field name="OHLCFIELD_LIST">open</field>
            <value name="OHLCOBJ">
              <block type="lists_getIndex" id="aZFbtt0,igiQ|_+S1tr2">
                <mutation statement="false" at="false"></mutation>
                <field name="MODE">GET</field>
                <field name="WHERE">LAST</field>
                <value name="VALUE">
                  <block type="variables_get" id="cP-[IHVd9nB;Ys)8}qF8">
                    <field name="VAR">exMachina::candles</field>
                  </block>
                </value>
              </block>
            </value>
          </block>
        </value>
      </block>
    </value>
  </block>
  <block type="procedures_defreturn" id="T1]Hu$(#)+c^5ulxt]vL" collapsed="true" x="0" y="1505">
    <field name="NAME">exMachina::IsGreen</field>
    <comment pinned="false" h="80" w="160">Describe this function...</comment>
    <value name="RETURN">
      <block type="logic_compare" id="B5at3*fu=iw=p6Lj_M@u" inline="false">
        <field name="OP">GT</field>
        <value name="A">
          <block type="variables_get" id="u=e)I@-Al4Z~`(CpT_l3">
            <field name="VAR">exMachina::lastTick</field>
          </block>
        </value>
        <value name="B">
          <block type="read_ohlc_obj" id="B@4E.{InI1V5TS4pckxw">
            <field name="OHLCFIELD_LIST">open</field>
            <value name="OHLCOBJ">
              <block type="lists_getIndex" id="6d*@#WCjx;8Tld5~F=rg">
                <mutation statement="false" at="false"></mutation>
                <field name="MODE">GET</field>
                <field name="WHERE">LAST</field>
                <value name="VALUE">
                  <block type="variables_get" id="9L/XBM22_}.s_Dx|2$={">
                    <field name="VAR">exMachina::candles</field>
                  </block>
                </value>
              </block>
            </value>
          </block>
        </value>
      </block>
    </value>
  </block>
</xml>