<xml xmlns="https://developers.google.com/blockly/xml" is_dbot="true" collection="false">
  <variables>
    <variable id="/shM51Nl|.I_R[9=PPJd">dalembert:resultIsWin</variable>
    <variable id="8-FGM6FF)6Y!:[]L7ZW0">dalembert:profit</variable>
    <variable id="52xfAd@7%m%OGj6@$J#f">Sell by 'Count Down'? If false, sell by 'Take Profit'</variable>
    <variable id="6NvAguD:-h](m]8.?da~">isBought</variable>
    <variable id="moqIsm%].$apvzQ,p+{R">Current Tick Value</variable>
    <variable id="(%X)fm`ac*=cJtd-P8tU">Notification:currentStake</variable>
    <variable id="weOIq50C[S,Wr;`!|gYR">dalembert:totalProfit</variable>
    <variable id="[w@pzvBAlteju[8,x#hD">dalembert:tradeAgain</variable>
    <variable id="kGMePgkd~JQ9#^23xJy[">useMaxStake?</variable>
    <variable id="ZGpA`4foih2T_0.]xE66">dalembert:profitThreshold</variable>
    <variable id="-PgUuax5KQf1zn42iCd~">dalembert:initialStake</variable>
    <variable id="o((rBg*rL/qm;RU%PM7_">dalembert:totalUnits</variable>
    <variable id="x^Ag/KQ(CK{q!8kwe0;:">maxStake</variable>
    <variable id="%o8CQE,uNdg`rmRL:-ca">dalembert:lossThreshold</variable>
    <variable id="mp-YteoPLi5iEEIZSo(S">Tick Count</variable>
    <variable id="y)Al0290GkJ5zCJq;pfo">Notification:totalProfit</variable>
    <variable id="nGC!N,V4~gxge3//ZqMs">dalembert:changeInUnit</variable>
    <variable id=",g^G%+--#CDpuJVWt}3P">Notification:profitThresholdReached</variable>
    <variable id="uTM3hkZFvI8cHTGU3@Im">Notification:lossThresholdReached</variable>
  </variables>
  <block type="trade_definition" id="S8h29bv2DDtW#WyF}Eva" deletable="false" x="0" y="0">
    <statement name="TRADE_OPTIONS">
      <block type="trade_definition_market" id="CAL$3(*qz%,|%p-@tWu," deletable="false" movable="false">
        <field name="MARKET_LIST">synthetic_index</field>
        <field name="SUBMARKET_LIST">random_index</field>
        <field name="SYMBOL_LIST">1HZ10V</field>
        <next>
          <block type="trade_definition_tradetype" id="1JDTS0%^EFc?!72k#Zzm" deletable="false" movable="false">
            <field name="TRADETYPECAT_LIST">accumulator</field>
            <field name="TRADETYPE_LIST">accumulator</field>
            <next>
              <block type="trade_definition_contracttype" id="y_:V!ihNraBJT1oV/z4H" deletable="false" movable="false">
                <field name="TYPE_LIST">ACCU</field>
                <next>
                  <block type="trade_definition_candleinterval" id=":g(SG0@!|9=NZiADM]AT" deletable="false" movable="false">
                    <field name="CANDLEINTERVAL_LIST">60</field>
                    <next>
                      <block type="trade_definition_restartbuysell" id="gAd13y{LVy%s4(hqgmfB" deletable="false" movable="false">
                        <field name="TIME_MACHINE_ENABLED">FALSE</field>
                        <next>
                          <block type="trade_definition_restartonerror" id="*aUzV1ENk`-z`9hg_Apk" deletable="false" movable="false">
                            <field name="RESTARTONERROR">TRUE</field>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </next>
              </block>
            </next>
          </block>
        </next>
      </block>
    </statement>
    <statement name="INITIALIZATION">
      <block type="variables_set" id="`5)$dT!cqK_+F()Cv@?^">
        <field name="VAR" id="52xfAd@7%m%OGj6@$J#f">Sell by 'Count Down'? If false, sell by 'Take Profit'</field>
        <value name="VALUE" strategy_value="boolean_tick_count">
          <block type="logic_boolean" id="QH`mR__-buv{!d!jV_U}">
            <field name="BOOL">TRUE</field>
          </block>
        </value>
        <next>
          <block type="variables_set" id="ods[F-yNES?hknl($0Q=">
            <field name="VAR" id="kGMePgkd~JQ9#^23xJy[">useMaxStake?</field>
            <value name="VALUE" strategy_value="boolean_max_stake">
              <block type="logic_boolean" id="5XcvH`yeH:F[5V8q*!+@">
                <field name="BOOL">TRUE</field>
              </block>
            </value>
            <next>
              <block type="variables_set" id="5zYkm?%M%dhWa.SDk_?Q">
                <field name="VAR" id="x^Ag/KQ(CK{q!8kwe0;:">maxStake</field>
                <value name="VALUE" strategy_value="max_stake">
                  <shadow type="math_number" id="VL+;XZ52`h#Y^pT]PC=D">
                    <field name="NUM">20</field>
                  </shadow>
                </value>
                <next>
                  <block type="variables_set" id="kSam~U:`uBYtV~WJ{$KA">
                    <field name="VAR" id="mp-YteoPLi5iEEIZSo(S">Tick Count</field>
                    <value name="VALUE" strategy_value="tick_count">
                      <block type="math_number" id="-K=K#,sTMxj/sdWG,2xd">
                        <field name="NUM">5</field>
                      </block>
                    </value>
                    <next>
                      <block type="variables_set" id="hW:4!9f}Fwr^~|Lxh6BQ">
                        <field name="VAR" id="6NvAguD:-h](m]8.?da~">isBought</field>
                        <value name="VALUE">
                          <block type="logic_boolean" id="naI},uil{NzP*GtG3?|5">
                            <field name="BOOL">FALSE</field>
                          </block>
                        </value>
                      </block>
                    </next>
                  </block>
                </next>
              </block>
            </next>
          </block>
        </next>
      </block>
    </statement>
    <statement name="SUBMARKET">
      <block type="trade_definition_accumulator" id="`XbWhq)3{Z(,9m%LJDfg">
        <field name="GROWTHRATE_LIST" strategy_value="growth_rate">0.01</field>
        <value name="AMOUNT">
          <shadow type="math_number_positive" id="^yX?!K_KxpvHpoSlsZx`">
            <field name="NUM">1</field>
          </shadow>
          <block type="procedures_callreturn" id="9[?fHf^Z?*;Ydu;)/eH)">
            <mutation xmlns="http://www.w3.org/1999/xhtml" name="D'Alembert Trade Amount"></mutation>
            <data>EmObAV!^T%mj8FmH$qw4</data>
          </block>
        </value>
        <statement name="ACCUMULATOR_PARAMS">
          <block type="accumulator_take_profit" id="6uNPj*D2,{qgT=*rL3H(" disabled="true">
            <value name="AMOUNT" strategy_value="take_profit">
              <shadow type="math_number_positive" id="B5jKPNx507-%(HhNG*p(">
                <field name="NUM">0</field>
              </shadow>
            </value>
          </block>
        </statement>
      </block>
    </statement>
  </block>
  <block type="during_purchase" id="eS*gHL(f[DOZ$NdoF@Vf" x="714" y="0">
    <statement name="DURING_PURCHASE_STACK">
      <block type="variables_set" id="4lT(|n5BQPxW_/T682p9">
        <field name="VAR" id="6NvAguD:-h](m]8.?da~">isBought</field>
        <value name="VALUE">
          <block type="logic_boolean" id="hPu?I}2i;?TinF7sv+}U">
            <field name="BOOL">TRUE</field>
          </block>
        </value>
        <next>
          <block type="controls_if" id="v?@a?;t2I14Yq)($hVrL">
            <value name="IF0">
              <block type="logic_operation" id="g`$RhysgD+9}Ny56)IJ[">
                <field name="OP">AND</field>
                <value name="A">
                  <block type="check_sell" id="evSAM2|!v)Zj0U,pk5r#"></block>
                </value>
                <value name="B">
                  <block type="logic_compare" id="`rF3_GKe!yM$0YZB.se2">
                    <field name="OP">EQ</field>
                    <value name="A">
                      <block type="variables_get" id="Ro8G.y=Tp?*e70suLCU|">
                        <field name="VAR" id="52xfAd@7%m%OGj6@$J#f">Sell by 'Count Down'? If false, sell by 'Take Profit'</field>
                      </block>
                    </value>
                    <value name="B">
                      <block type="logic_boolean" id="7ImZ5oI}_@AC[$8]c@4t">
                        <field name="BOOL">TRUE</field>
                      </block>
                    </value>
                  </block>
                </value>
              </block>
            </value>
            <statement name="DO0">
              <block type="controls_if" id="mUtk_8d]MSjEqZ_R7L#:">
                <value name="IF0">
                  <block type="logic_compare" id="w]=N~zLUWFFnV,~gXwId">
                    <field name="OP">GT</field>
                    <value name="A">
                      <block type="variables_get" id="3fPniP1P)*V=#F_r+OLw">
                        <field name="VAR" id="moqIsm%].$apvzQ,p+{R">Current Tick Value</field>
                      </block>
                    </value>
                    <value name="B">
                      <block type="variables_get" id="jbg[.X0hyfe*ztNdWg]v">
                        <field name="VAR" id="mp-YteoPLi5iEEIZSo(S">Tick Count</field>
                      </block>
                    </value>
                  </block>
                </value>
                <statement name="DO0">
                  <block type="sell_at_market" id="LwN-3C0cqaKfaRSw#b?x"></block>
                </statement>
              </block>
            </statement>
          </block>
        </next>
      </block>
    </statement>
  </block>
  <block type="after_purchase" id=":w?h)j*]?@+q/LM@,1r7" x="714" y="410">
    <statement name="AFTERPURCHASE_STACK">
      <block type="controls_if" id="+a[84}f^_!,F5=3f$Uy^">
        <value name="IF0">
          <block type="procedures_callreturn" id="Wrp{{4@tW:(N+%_!f!xu">
            <mutation xmlns="http://www.w3.org/1999/xhtml" name="D'Alembert Trade Again After Purchase">
              <arg name="dalembert:profit"></arg>
              <arg name="dalembert:resultIsWin"></arg>
            </mutation>
            <data>RI6JdsHz({df~bVVIE;f</data>
            <value name="ARG0">
              <block type="read_details" id=";@Pic?.Li0OCjGv-91Ur">
                <field name="DETAIL_INDEX">4</field>
              </block>
            </value>
            <value name="ARG1">
              <block type="contract_check_result" id="pmWi^^-CT7Pvl4*yhn,+">
                <field name="CHECK_RESULT">win</field>
              </block>
            </value>
          </block>
        </value>
        <statement name="DO0">
          <block type="trade_again" id="/;dLnlE!v7eHau;0e9$L"></block>
        </statement>
      </block>
    </statement>
  </block>
  <block type="before_purchase" id="`J0qOF#1|/@L,(N{xG8X" deletable="false" x="0" y="890">
    <statement name="BEFOREPURCHASE_STACK">
      <block type="variables_set" id="BEl{Oj1~C^ASU:79BPhF">
        <field name="VAR" id="moqIsm%].$apvzQ,p+{R">Current Tick Value</field>
        <value name="VALUE">
          <block type="math_number" id="`?_SLDN^.Wfu16yw!Uq_">
            <field name="NUM">0</field>
          </block>
        </value>
        <next>
          <block type="variables_set" id="h-sh[H9~yXFsDBNRUqo:">
            <field name="VAR" id="6NvAguD:-h](m]8.?da~">isBought</field>
            <value name="VALUE">
              <block type="logic_boolean" id="o}.;b*^Wq,W$Gj*IvIsI">
                <field name="BOOL">FALSE</field>
              </block>
            </value>
            <next>
              <block type="notify" id="Ym$v.ix]r{xp0?1EOEDP">
                <field name="NOTIFICATION_TYPE">success</field>
                <field name="NOTIFICATION_SOUND">silent</field>
                <value name="MESSAGE">
                  <shadow type="text" id="@`!1q,P_Nmz8Oi!b*Hpo">
                    <field name="TEXT">abc</field>
                  </shadow>
                  <block type="stat" id="x`e653nV/q(^;VT%%4LM"></block>
                </value>
                <next>
                  <block type="purchase" id="H$KfQ`]v.,5_^kmBGDy7">
                    <field name="PURCHASE_LIST">ACCU</field>
                  </block>
                </next>
              </block>
            </next>
          </block>
        </next>
      </block>
    </statement>
  </block>
  <block type="tick_analysis" id="(/AIJNj[~5!)xZ?2tb=!" x="0" y="1212">
    <statement name="TICKANALYSIS_STACK">
      <block type="controls_if" id="AiQ2|kO|Zi#72L-!RS_+">
        <value name="IF0">
          <block type="variables_get" id="K^WfhiHFY_]Y;t:=kwy$">
            <field name="VAR" id="6NvAguD:-h](m]8.?da~">isBought</field>
          </block>
        </value>
        <statement name="DO0">
          <block type="variables_set" id="0]^PM+#?M3KAqwq=l}lr">
            <field name="VAR" id="moqIsm%].$apvzQ,p+{R">Current Tick Value</field>
            <value name="VALUE">
              <block type="math_arithmetic" id="Y;0W7(KG!YXK=v3OXVAK">
                <field name="OP">ADD</field>
                <value name="A">
                  <shadow type="math_number" id="{6hj7wZVWP,H9,n3i{Sz">
                    <field name="NUM">1</field>
                  </shadow>
                  <block type="variables_get" id="y`S{MEP}iF]Xx)~Ch5Au">
                    <field name="VAR" id="moqIsm%].$apvzQ,p+{R">Current Tick Value</field>
                  </block>
                </value>
                <value name="B">
                  <shadow type="math_number" id="u4je)g:H,slBTDAN0|QF">
                    <field name="NUM">1</field>
                  </shadow>
                </value>
              </block>
            </value>
          </block>
        </statement>
      </block>
    </statement>
  </block>
  <block type="procedures_defnoreturn" id="Z-37~d]E;0rXD;Nl]{o@" collapsed="true" x="0" y="1476">
    <mutation xmlns="http://www.w3.org/1999/xhtml">
      <arg name="dalembert:resultIsWin" varid="/shM51Nl|.I_R[9=PPJd"></arg>
    </mutation>
    <field name="NAME">D'Alembert Core Functionality</field>
    <comment pinned="false" h="80" w="160">Describe this function...</comment>
    <statement name="STACK">
      <block type="text_join" id="+f+)u]eOl_h`8ej[voyw">
        <field name="VARIABLE" id="(%X)fm`ac*=cJtd-P8tU">Notification:currentStake</field>
        <statement name="STACK">
          <block type="text_statement" id=";J=2QGW+mp,jAS9TdZ|Q">
            <value name="TEXT">
              <shadow type="text" id="u%KG5Wu}HG,$p|VB|UHu">
                <field name="TEXT">Current stake:</field>
              </shadow>
            </value>
            <next>
              <block type="text_statement" id="%,AqzfU|}/Dx?LdYF)=j">
                <value name="TEXT">
                  <shadow type="text" id=";7kuHL01;GA+bv_5mp@E">
                    <field name="TEXT"></field>
                  </shadow>
                  <block type="procedures_callreturn" id="`rQ,v8R),Zs2D+~]zclS">
                    <mutation xmlns="http://www.w3.org/1999/xhtml" name="D'Alembert Trade Amount"></mutation>
                    <data>EmObAV!^T%mj8FmH$qw4</data>
                  </block>
                </value>
              </block>
            </next>
          </block>
        </statement>
        <next>
          <block type="notify" id="zQN_,e[!@N4gUkPFgFY-">
            <field name="NOTIFICATION_TYPE">warn</field>
            <field name="NOTIFICATION_SOUND">silent</field>
            <value name="MESSAGE">
              <shadow type="text" id="f[Zkw4B+X+d:)}])Iak@">
                <field name="TEXT">abc</field>
              </shadow>
              <block type="variables_get" id="6S,*6ny~?fN`yM[1kQJ4">
                <field name="VAR" id="(%X)fm`ac*=cJtd-P8tU">Notification:currentStake</field>
              </block>
            </value>
            <next>
              <block type="controls_if" id="_/=wck]-x]xCtN1{6tmA">
                <mutation xmlns="http://www.w3.org/1999/xhtml" else="1"></mutation>
                <value name="IF0">
                  <block type="variables_get" id="NwS^C~iIqeT*Lv%xW=zD">
                    <field name="VAR" id="/shM51Nl|.I_R[9=PPJd">dalembert:resultIsWin</field>
                  </block>
                </value>
                <statement name="DO0">
                  <block type="variables_set" id="mA1b~rG(;BN~zemGwthV">
                    <field name="VAR" id="o((rBg*rL/qm;RU%PM7_" >dalembert:totalUnits</field>
                    <value name="VALUE">
                      <block type="math_arithmetic" id="FOv}cpsixo3M,fTMoxl]">
                        <field name="OP">MINUS</field>
                        <value name="A">
                          <shadow type="math_number" id="{)YiAo#J1K7)+7cF#kA`">
                            <field name="NUM">1</field>
                          </shadow>
                          <block type="variables_get" id="Im*Ml*f*_oi)nrK`osaC">
                            <field name="VAR" id="o((rBg*rL/qm;RU%PM7_">dalembert:totalUnits</field>
                          </block>
                        </value>
                        <value name="B">
                          <block type="variables_get" id="yB?OOKx-yXMaA*:p%]?L">
                            <field name="VAR" id="nGC!N,V4~gxge3//ZqMs">dalembert:changeInUnit</field>
                          </block>
                        </value>
                      </block>
                    </value>
                    <next>
                      <block type="controls_if" id="qViz0Dvts^*Uw]v?hmP0">
                        <value name="IF0">
                          <block type="logic_compare" id="kY4%*-@K52-jiL5$P2]=">
                            <field name="OP">LT</field>
                            <value name="A">
                              <block type="variables_get" id="Ts3}g.~9+~6K5-7V#2-F">
                                <field name="VAR" id="o((rBg*rL/qm;RU%PM7_">dalembert:totalUnits</field>
                              </block>
                            </value>
                            <value name="B">
                              <block type="math_number" id="EV@s_(^]kP,UBSuf;k_l">
                                <field name="NUM">1</field>
                              </block>
                            </value>
                          </block>
                        </value>
                        <statement name="DO0">
                          <block type="variables_set" id="0.OrOV/(}#;ZAcIv8$v4">
                            <field name="VAR" id="o((rBg*rL/qm;RU%PM7_">dalembert:totalUnits</field>
                            <value name="VALUE">
                              <block type="math_number" id="vu]OHD91fS@W0%bMhH@9">
                                <field name="NUM">1</field>
                              </block>
                            </value>
                          </block>
                        </statement>
                      </block>
                    </next>
                  </block>
                </statement>
                <statement name="ELSE">
                  <block type="variables_set" id="AKbtRY7t336`swq];yoh">
                    <field name="VAR" id="o((rBg*rL/qm;RU%PM7_">dalembert:totalUnits</field>
                    <value name="VALUE">
                      <block type="math_arithmetic" id="%7gp$c-LN}6-5NP6LE9X">
                        <field name="OP">ADD</field>
                        <value name="A">
                          <shadow type="math_number" id="TOP9AeSQg#2YYrYW+iK~">
                            <field name="NUM">1</field>
                          </shadow>
                          <block type="variables_get" id="2Z0Gov6Fb%HqcDklK,I-">
                            <field name="VAR" id="o((rBg*rL/qm;RU%PM7_">dalembert:totalUnits</field>
                          </block>
                        </value>
                        <value name="B">
                          <shadow type="math_number" id="5}a$|p!Rf2E,fbo/aI4?">
                            <field name="NUM">1</field>
                          </shadow>
                          <block type="variables_get" id="Hz4;F%CJ:#IvC+@BZ8PP">
                            <field name="VAR" id="nGC!N,V4~gxge3//ZqMs">dalembert:changeInUnit</field>
                          </block>
                        </value>
                      </block>
                    </value>
                    <next>
                      <block type="controls_if" id="kb,-oANKX.ip*pKu~$O:">
                        <value name="IF0">
                          <block type="logic_compare" id="fc^*b4o|5ye7Kp#LG;H2">
                            <field name="OP">GT</field>
                            <value name="A">
                              <block type="logic_operation" id="l!%U6-UY{GBkR;P$q4Ga">
                                <field name="OP">AND</field>
                                <value name="A">
                                  <block type="variables_get" id="m;w7$qbTH`u!5kRA_DP.">
                                    <field name="VAR" id="kGMePgkd~JQ9#^23xJy[">useMaxStake?</field>
                                  </block>
                                </value>
                                <value name="B">
                                  <block type="procedures_callreturn" id="052:APsrk@/5}S/JNyIq">
                                    <mutation xmlns="http://www.w3.org/1999/xhtml" name="D'Alembert Trade Amount"></mutation>
                                    <data>EmObAV!^T%mj8FmH$qw4</data>
                                  </block>
                                </value>
                              </block>
                            </value>
                            <value name="B">
                              <block type="variables_get" id="VRTCUTK*KW]VMUf4ab^a">
                                <field name="VAR" id="x^Ag/KQ(CK{q!8kwe0;:">maxStake</field>
                              </block>
                            </value>
                          </block>
                        </value>
                        <statement name="DO0">
                          <block type="variables_set" id="w2-6K;;V7wo0kQz^).AJ">
                            <field name="VAR" id="o((rBg*rL/qm;RU%PM7_">dalembert:totalUnits</field>
                            <value name="VALUE">
                              <block type="math_number" id="RpZ[zW8WA]![EDY{;~IZ">
                                <field name="NUM">1</field>
                              </block>
                            </value>
                            <next>
                              <block type="notify" id="?n|Qa8-k41ii$Z_m_iRb">
                                <field name="NOTIFICATION_TYPE">error</field>
                                <field name="NOTIFICATION_SOUND">silent</field>
                                <value name="MESSAGE">
                                  <shadow type="text" id="*nSCY~^JfE{kNpc{~%K8">
                                    <field name="TEXT">Stake resets for the next trade (reason: exceeds max stake amount)</field>
                                  </shadow>
                                </value>
                              </block>
                            </next>
                          </block>
                        </statement>
                      </block>
                    </next>
                  </block>
                </statement>
              </block>
            </next>
          </block>
        </next>
      </block>
    </statement>
  </block>
  <block type="procedures_defreturn" id="EmObAV!^T%mj8FmH$qw4" collapsed="true" x="0" y="1572">
    <field name="NAME">D'Alembert Trade Amount</field>
    <comment pinned="false" h="80" w="160">Describe this function...</comment>
    <statement name="STACK">
      <block type="controls_if" id=",(7?SH-dD0YO4N(j2|Ca">
        <value name="IF0">
          <block type="logic_compare" id="Uq#.hcd$auJ)gcUi9P[o">
            <field name="OP">EQ</field>
            <value name="A">
              <block type="variables_get" id="myak3L(HNC4,k/r7D)?7">
                <field name="VAR" id="ZGpA`4foih2T_0.]xE66">dalembert:profitThreshold</field>
              </block>
            </value>
            <value name="B">
              <block type="logic_null" id="%08%qoE;ZNE%]]9PHaZL"></block>
            </value>
          </block>
        </value>
        <statement name="DO0">
          <block type="variables_set" id="Y=Z$E2zJKQ`l[H,_C|w@">
            <field name="VAR" id="ZGpA`4foih2T_0.]xE66">dalembert:profitThreshold</field>
            <value name="VALUE" strategy_value="profit">
              <shadow type="math_number" id="G/w^g.RPP`K%|8_ONr66">
                <field name="NUM">50</field>
              </shadow>
            </value>
          </block>
        </statement>
        <next>
          <block type="controls_if" id="*x.6`GeZPW6,`f}ANshq">
            <value name="IF0">
              <block type="logic_compare" id="6`49zommf9($yZ;L?7of">
                <field name="OP">EQ</field>
                <value name="A">
                  <block type="variables_get" id="f/YuBp3,UsEyXDl6TB3q">
                    <field name="VAR" id="%o8CQE,uNdg`rmRL:-ca">dalembert:lossThreshold</field>
                  </block>
                </value>
                <value name="B">
                  <block type="logic_null" id="iRv:X6j=2/DQ#U_18]d4"></block>
                </value>
              </block>
            </value>
            <statement name="DO0">
              <block type="variables_set" id="?VovWY,aXgs.y1djI*-g">
                <field name="VAR" id="%o8CQE,uNdg`rmRL:-ca">dalembert:lossThreshold</field>
                <value name="VALUE" strategy_value="loss">
                  <shadow type="math_number" id="9Ns@K/Uz41f/BYBUDt_M">
                    <field name="NUM">50</field>
                  </shadow>
                </value>
              </block>
            </statement>
            <next>
              <block type="controls_if" id="F;.!Do6-)o2WcCck(brg">
                <value name="IF0">
                  <block type="logic_compare" id="![emA!]O(^me^x${3TE;">
                    <field name="OP">EQ</field>
                    <value name="A">
                      <block type="variables_get" id="V/uwxoFd6yyopbz{[#Uh">
                        <field name="VAR" id="-PgUuax5KQf1zn42iCd~">dalembert:initialStake</field>
                      </block>
                    </value>
                    <value name="B">
                      <block type="logic_null" id="9j!0kv:!$S#cg`M)q$Mg"></block>
                    </value>
                  </block>
                </value>
                <statement name="DO0">
                  <block type="variables_set" id="mq}/@a{Qc-KeTxmcqFjU">
                    <field name="VAR" id="-PgUuax5KQf1zn42iCd~">dalembert:initialStake</field>
                    <value name="VALUE" strategy_value="stake">
                      <shadow type="math_number" id="RwW?sM1m]g+n?{G%!kva">
                        <field name="NUM">1</field>
                      </shadow>
                    </value>
                  </block>
                </statement>
                <next>
                  <block type="controls_if" id="5Q,@|#C+MSO=ZB^WtC[7">
                    <value name="IF0">
                      <block type="logic_compare" id="E?}hkyfNNpByBzM3!k9!">
                        <field name="OP">EQ</field>
                        <value name="A">
                          <block type="variables_get" id="pc$}:5k0^3*?DiurlDnK">
                            <field name="VAR" id="nGC!N,V4~gxge3//ZqMs" variabletype="">dalembert:changeInUnit</field>
                          </block>
                        </value>
                        <value name="B">
                          <block type="logic_null" id="@RI8wOc}u-9;vFr7Xd(5"></block>
                        </value>
                      </block>
                    </value>
                    <statement name="DO0">
                      <block type="variables_set" id="ZwPpNMsK]IT,,eM_`vn)">
                        <field name="VAR" id="nGC!N,V4~gxge3//ZqMs" variabletype="">dalembert:changeInUnit</field>
                        <value name="VALUE" strategy_value="dalembert_unit">
                          <shadow type="math_number" id="p[LNf|7[5av$)xK[t~e;">
                            <field name="NUM">1</field>
                          </shadow>
                        </value>
                      </block>
                    </statement>
                    <next>
                      <block type="controls_if" id="sG%4hlo-P26Nr0#kIhMF">
                        <value name="IF0">
                          <block type="logic_compare" id="-uC[[Ga(p{VT#7ovNfr4">
                            <field name="OP">EQ</field>
                            <value name="A">
                              <block type="variables_get" id="7$B#MO,8@;GIu@Mofrx}">
                                <field name="VAR" id="o((rBg*rL/qm;RU%PM7_">dalembert:totalUnits</field>
                              </block>
                            </value>
                            <value name="B">
                              <block type="logic_null" id="B{U,C`Y$G]}v#Kq]@x:p"></block>
                            </value>
                          </block>
                        </value>
                        <statement name="DO0">
                          <block type="variables_set" id="iX^w=Jc(b/VlAIdNMduh">
                            <field name="VAR" id="o((rBg*rL/qm;RU%PM7_">dalembert:totalUnits</field>
                            <value name="VALUE">
                              <shadow type="math_number" id="d#8t+7WO$h2wHp|@8_eA">
                                <field name="NUM">1</field>
                              </shadow>
                            </value>
                          </block>
                        </statement>
                        <next>
                          <block type="controls_if" id="F)U6+Uka*K,jqGK@}({H">
                            <value name="IF0">
                              <block type="logic_compare" id=":H|M3?~SzqICLD`V#)/x">
                                <field name="OP">EQ</field>
                                <value name="A">
                                  <block type="variables_get" id="#6Ab%#a4!6|9q:XHS`pb">
                                    <field name="VAR" id="weOIq50C[S,Wr;`!|gYR">dalembert:totalProfit</field>
                                  </block>
                                </value>
                                <value name="B">
                                  <block type="logic_null" id="nFKikFg~}zpQZ7t}HI)d"></block>
                                </value>
                              </block>
                            </value>
                            <statement name="DO0">
                              <block type="variables_set" id="3(a50!~_FArRjyUd)*np">
                                <field name="VAR" id="weOIq50C[S,Wr;`!|gYR">dalembert:totalProfit</field>
                                <value name="VALUE">
                                  <shadow type="math_number" id="*6;H2j+wK=C6V,Pp}Oe`">
                                    <field name="NUM">0</field>
                                  </shadow>
                                </value>
                              </block>
                            </statement>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </next>
              </block>
            </next>
          </block>
        </next>
      </block>
    </statement>
    <value name="RETURN">
      <block type="math_arithmetic" id="US22LDE-R$fo.w[=-2E;">
        <field name="OP">MULTIPLY</field>
        <value name="A">
          <shadow type="math_number" id="x0nt_f/Ye=TP3c(vZn$5">
            <field name="NUM">1</field>
          </shadow>
          <block type="variables_get" id="WL}Si1.(d7}}-{ii1}Rl">
            <field name="VAR" id="-PgUuax5KQf1zn42iCd~">dalembert:initialStake</field>
          </block>
        </value>
        <value name="B">
          <shadow type="math_number" id="RWb{X,RQ1{.a})/Uo%A8">
            <field name="NUM">1</field>
          </shadow>
          <block type="variables_get" id="T4[Q(H?!GZT.5qxN/Wsz">
            <field name="VAR" id="o((rBg*rL/qm;RU%PM7_">dalembert:totalUnits</field>
          </block>
        </value>
      </block>
    </value>
  </block>
  <block type="procedures_defreturn" id="RI6JdsHz({df~bVVIE;f" collapsed="true" x="0" y="1668">
    <mutation xmlns="http://www.w3.org/1999/xhtml">
      <arg name="dalembert:profit" varid="8-FGM6FF)6Y!:[]L7ZW0"></arg>
      <arg name="dalembert:resultIsWin" varid="/shM51Nl|.I_R[9=PPJd"></arg>
    </mutation>
    <field name="NAME">D'Alembert Trade Again After Purchase</field>
    <comment pinned="false" h="80" w="160">Describe this function...</comment>
    <statement name="STACK">
      <block type="math_change" id="KbSUl~PGM5H:S{)Vo;x(">
        <field name="VAR" id="weOIq50C[S,Wr;`!|gYR">dalembert:totalProfit</field>
        <value name="DELTA">
          <shadow type="math_number" id="iIDCjv!e^K/waJwM)blA">
            <field name="NUM">1</field>
          </shadow>
          <block type="variables_get" id="@Meat^O|{Jj*b/s,_PsG">
            <field name="VAR" id="8-FGM6FF)6Y!:[]L7ZW0">dalembert:profit</field>
          </block>
        </value>
        <next>
          <block type="variables_set" id="nCLw{7#[Vwq1#]92K=;4">
            <field name="VAR" id="weOIq50C[S,Wr;`!|gYR">dalembert:totalProfit</field>
            <value name="VALUE">
              <block type="math_arithmetic" id="jZl``irrVpi_K].~c+]/">
                <field name="OP">DIVIDE</field>
                <value name="A">
                  <shadow type="math_number" id="IA[I$$+az/RL35Z1S@+/">
                    <field name="NUM">1</field>
                  </shadow>
                  <block type="math_round" id=".~K2:,9J(5BA`9jY^IUN">
                    <field name="OP">ROUND</field>
                    <value name="NUM">
                      <shadow type="math_number" id="uDD|xJ,[4:(Gom^2rxB:">
                        <field name="NUM">3.1</field>
                      </shadow>
                      <block type="math_arithmetic" id="*rClskQ40.Np`zs40a|-">
                        <field name="OP">MULTIPLY</field>
                        <value name="A">
                          <shadow type="math_number" id="m_!:=tBr7$_l39(+$@{-">
                            <field name="NUM">1</field>
                          </shadow>
                          <block type="variables_get" id="^T/v:ZREB3kFaEsT,K4*">
                            <field name="VAR" id="weOIq50C[S,Wr;`!|gYR">dalembert:totalProfit</field>
                          </block>
                        </value>
                        <value name="B">
                          <shadow type="math_number" id="_7oEE4VLfSWL:?(xev((">
                            <field name="NUM">100</field>
                          </shadow>
                        </value>
                      </block>
                    </value>
                  </block>
                </value>
                <value name="B">
                  <shadow type="math_number" id="+R-V5nHA2*uPTJzp(RSm">
                    <field name="NUM">100</field>
                  </shadow>
                </value>
              </block>
            </value>
            <next>
              <block type="procedures_callnoreturn" id="d9c]3Se?`}O%.vY%mmHZ">
                <mutation xmlns="http://www.w3.org/1999/xhtml" name="D'Alembert Core Functionality">
                  <arg name="dalembert:resultIsWin"></arg>
                </mutation>
                <data>Z-37~d]E;0rXD;Nl]{o@</data>
                <value name="ARG0">
                  <block type="variables_get" id="c?0U5G#:kk(cdrrZgP/Z">
                    <field name="VAR" id="/shM51Nl|.I_R[9=PPJd">dalembert:resultIsWin</field>
                  </block>
                </value>
                <next>
                  <block type="text_join" id="D%uq.rRMXyoUj05;l;,3">
                    <field name="VARIABLE" id="y)Al0290GkJ5zCJq;pfo">Notification:totalProfit</field>
                    <statement name="STACK">
                      <block type="text_statement" id="z4ctT[~{^d)oTKXa;m^A">
                        <value name="TEXT">
                          <shadow type="text" id="NGd90lLbe*CR;M3bE.h|">
                            <field name="TEXT">Total Profit:</field>
                          </shadow>
                        </value>
                        <next>
                          <block type="text_statement" id="$?9Z6)43h,1}`ebd1b#(">
                            <value name="TEXT">
                              <shadow type="text" id="v$n}lKIYZRceGMInDNnz">
                                <field name="TEXT"></field>
                              </shadow>
                              <block type="variables_get" id="K~~4NDB}jBAjh^nZM@;r">
                                <field name="VAR" id="weOIq50C[S,Wr;`!|gYR">dalembert:totalProfit</field>
                              </block>
                            </value>
                          </block>
                        </next>
                      </block>
                    </statement>
                    <next>
                      <block type="notify" id="*vY8nukFB6~GAbLc3_Cd">
                        <field name="NOTIFICATION_TYPE">info</field>
                        <field name="NOTIFICATION_SOUND">silent</field>
                        <value name="MESSAGE">
                          <shadow type="text" id="_yenZ]X:y@`%so1S@:pW">
                            <field name="TEXT">abc</field>
                          </shadow>
                          <block type="variables_get" id="X7*OuZJoYglG5!Kl3UJE">
                            <field name="VAR" id="y)Al0290GkJ5zCJq;pfo">Notification:totalProfit</field>
                          </block>
                        </value>
                        <next>
                          <block type="variables_set" id=",c/z%8k6EWkqc:fZtzfE">
                            <field name="VAR" id="[w@pzvBAlteju[8,x#hD">dalembert:tradeAgain</field>
                            <value name="VALUE">
                              <block type="logic_boolean" id="s@hLOZacb94r(b`=-?m=">
                                <field name="BOOL">FALSE</field>
                              </block>
                            </value>
                            <next>
                              <block type="controls_if" id="YF*U!j=#qjyUpBToCklJ">
                                <mutation xmlns="http://www.w3.org/1999/xhtml" else="1"></mutation>
                                <value name="IF0">
                                  <block type="logic_compare" id=".C,!tn_Dmn}UWJEK:g;r">
                                    <field name="OP">LT</field>
                                    <value name="A">
                                      <block type="variables_get" id="M*l_mEuzY747A/9P/k(0">
                                        <field name="VAR" id="weOIq50C[S,Wr;`!|gYR">dalembert:totalProfit</field>
                                      </block>
                                    </value>
                                    <value name="B">
                                      <block type="variables_get" id="{}m6MN)qLd:$#:OxiAWJ">
                                        <field name="VAR" id="ZGpA`4foih2T_0.]xE66">dalembert:profitThreshold</field>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                                <statement name="DO0">
                                  <block type="controls_if" id=";z4Hx5/7p=fR6p{5suJC">
                                    <mutation xmlns="http://www.w3.org/1999/xhtml" else="1"></mutation>
                                    <value name="IF0">
                                      <block type="logic_compare" id="bNH=OA[a^nPR_ru$[#3V">
                                        <field name="OP">GT</field>
                                        <value name="A">
                                          <block type="variables_get" id=";-*3mu!xGYYyZZk|gcs9">
                                            <field name="VAR" id="weOIq50C[S,Wr;`!|gYR">dalembert:totalProfit</field>
                                          </block>
                                        </value>
                                        <value name="B">
                                          <block type="math_single" id="Wou%(S]*gz}DGyGdCmF+">
                                            <field name="OP">NEG</field>
                                            <value name="NUM">
                                              <shadow type="math_number" id="*1As}XT}kvPy#iJVL.X:">
                                                <field name="NUM">9</field>
                                              </shadow>
                                              <block type="variables_get" id=")O~FX{%sJo`UREf7KzcC">
                                                <field name="VAR" id="%o8CQE,uNdg`rmRL:-ca">dalembert:lossThreshold</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <statement name="DO0">
                                      <block type="variables_set" id="KtG-u#*0@:_w1Hb$a+Rs">
                                        <field name="VAR" id="[w@pzvBAlteju[8,x#hD">dalembert:tradeAgain</field>
                                        <value name="VALUE">
                                          <block type="logic_boolean" id="_L,b@{:SNDs;CVZ`_+M|">
                                            <field name="BOOL">TRUE</field>
                                          </block>
                                        </value>
                                      </block>
                                    </statement>
                                    <statement name="ELSE">
                                      <block type="text_join" id="$wU*5]hG$jv,NIz.U9Cf">
                                        <field name="VARIABLE" id="uTM3hkZFvI8cHTGU3@Im">Notification:lossThresholdReached</field>
                                        <statement name="STACK">
                                          <block type="text_statement" id="]Z4Yoi%Ml,@)%HZ_n}~w">
                                            <value name="TEXT">
                                              <shadow type="text" id="W5!)Xu@6bPx=c(wubC3e">
                                                <field name="TEXT">Loss threshold triggered. Total Loss:</field>
                                              </shadow>
                                            </value>
                                            <next>
                                              <block type="text_statement" id="H_!Csgh~sV2/L-h/(~pL">
                                                <value name="TEXT">
                                                  <shadow type="text" id="*K4v(M2]ptiU(ub@cfGk">
                                                    <field name="TEXT"></field>
                                                  </shadow>
                                                  <block type="math_single" id="=FAFuZ{|jPm`t%gE)_+$">
                                                    <field name="OP">NEG</field>
                                                    <value name="NUM">
                                                      <shadow type="math_number" id="zCRFi{C)hlw@fVu]x8{8">
                                                        <field name="NUM">9</field>
                                                      </shadow>
                                                      <block type="variables_get" id="oCe(8,VsGnhr0u9PJ$r=">
                                                        <field name="VAR" id="weOIq50C[S,Wr;`!|gYR">dalembert:totalProfit</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                              </block>
                                            </next>
                                          </block>
                                        </statement>
                                        <next>
                                          <block type="notify" id="5Qw`EQbfjlak9R{6%NQe">
                                            <field name="NOTIFICATION_TYPE">error</field>
                                            <field name="NOTIFICATION_SOUND">silent</field>
                                            <value name="MESSAGE">
                                              <shadow type="text" id="AR*95}aMV(FbzHBxBU+g">
                                                <field name="TEXT">abc</field>
                                              </shadow>
                                              <block type="variables_get" id="RciPt$L]8SskoqL[UC;|">
                                                <field name="VAR" id="uTM3hkZFvI8cHTGU3@Im">Notification:lossThresholdReached</field>
                                              </block>
                                            </value>
                                            <next>
                                              <block type="text_print" id=".|-?8JHw};Ae0e+_rTtT">
                                                <value name="TEXT">
                                                  <shadow type="text" id="bu|CI];_vs^L`l;IP1yx">
                                                    <field name="TEXT">abc</field>
                                                  </shadow>
                                                  <block type="variables_get" id="D4S$@b{H[$=-L/^Rx-MP">
                                                    <field name="VAR" id="uTM3hkZFvI8cHTGU3@Im">Notification:lossThresholdReached</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </next>
                                          </block>
                                        </next>
                                      </block>
                                    </statement>
                                  </block>
                                </statement>
                                <statement name="ELSE">
                                  <block type="text_join" id="`jp^xmB{2/+`+=GYvlI!">
                                    <field name="VARIABLE" id=",g^G%+--#CDpuJVWt}3P">Notification:profitThresholdReached</field>
                                    <statement name="STACK">
                                      <block type="text_statement" id="{ttA@cQSFz^1P?2_)v{T">
                                        <value name="TEXT">
                                          <shadow type="text" id="lKSXIja`H$cE]ulkOpPC">
                                            <field name="TEXT">Profit threshold triggered. Total Profit:</field>
                                          </shadow>
                                        </value>
                                        <next>
                                          <block type="text_statement" id="J$taS8:NY?CWGXEoR4Py">
                                            <value name="TEXT">
                                              <shadow type="text" id="SGbrwIAdE-P1XemyZ6Rs">
                                                <field name="TEXT"></field>
                                              </shadow>
                                              <block type="variables_get" id="xD`gB^obkxob@?G7TWg/">
                                                <field name="VAR" id="weOIq50C[S,Wr;`!|gYR">dalembert:totalProfit</field>
                                              </block>
                                            </value>
                                          </block>
                                        </next>
                                      </block>
                                    </statement>
                                    <next>
                                      <block type="notify" id="x``V~AfiCW@-)oi60lJ[">
                                        <field name="NOTIFICATION_TYPE">success</field>
                                        <field name="NOTIFICATION_SOUND">silent</field>
                                        <value name="MESSAGE">
                                          <shadow type="text" id="XBp|Y-R[|@S}8M.iQOSI">
                                            <field name="TEXT">abc</field>
                                          </shadow>
                                          <block type="variables_get" id="j05-.!*U5v``8h81@Q(8">
                                            <field name="VAR" id=",g^G%+--#CDpuJVWt}3P">Notification:profitThresholdReached</field>
                                          </block>
                                        </value>
                                        <next>
                                          <block type="text_print" id="14Vk%?]6Ct;JSV4zqllv">
                                            <value name="TEXT">
                                              <shadow type="text" id="jBlLsCTByB`_RiU76r+1">
                                                <field name="TEXT">abc</field>
                                              </shadow>
                                              <block type="variables_get" id="iGi=D5I(W6aCuJWNlnLu">
                                                <field name="VAR" id=",g^G%+--#CDpuJVWt}3P">Notification:profitThresholdReached</field>
                                              </block>
                                            </value>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </statement>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </next>
              </block>
            </next>
          </block>
        </next>
      </block>
    </statement>
    <value name="RETURN">
      <block type="variables_get" id="6oaZcb;rCyTYXAMPCx?B">
        <field name="VAR" id="[w@pzvBAlteju[8,x#hD">dalembert:tradeAgain</field>
      </block>
    </value>
  </block>
</xml>