<?xml version="1.0" encoding="utf-8"?>
<ExportScriptData xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Code><![CDATA[<?xml version="1.0" encoding="utf-16"?>
<GraphDataBase xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="GraphViewData">
  <EditData VersionString="2.2" TemplateClass="Script">
    <ViewModel>
      <Model Scale="1" SelectedLinkColor="-256" ShowLinks="true">
        <Block Key="ControlPane" Category="ControlPane" Location="220 408">
          <EditItem Name="d055a243-dce8-4732-b269-bde1c5445652" IsVisible="true" />
        </Block>
        <Block Key="Константа" Category="TradeMath" Location="238 308" TypeName="ConverterItem">
          <EditItem Guid="2dda2749-bcaa-475a-9f5f-e0eb7a80ded3" CodeName="Константа" IsParametersVisible="false" OnlyValueHandlersCanUsed="false" HandlerTypeName="TSLab.Script.Handlers.ConstGen, TSLab.Script.Handlers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
        </Block>
        <Block Key="Количество" Category="Position" Location="660 176" TypeName="ConverterItem">
          <EditItem Guid="9575a114-b246-4a84-b051-656d2dcacca9" CodeName="Количество" IsParametersVisible="false" OnlyValueHandlersCanUsed="true" HandlerTypeName="TSLab.Script.Handlers.PositionSharesByBar, TSLab.Script.Handlers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
        </Block>
        <Pane Key="ПанельГрафика" Category="GraphPane" Location="681 33" Order="1" HideLegend="false" SizePct="42.6556733733998" LeftAxisPrecision="0" LeftAxisByPercents="false" RightAxisPrecision="0" RightAxisByPercents="false" LeftDownHysteresis="0" LeftUpHysteresis="0" RightDownHysteresis="0" RightUpHysteresis="0" IsVisible="true" />
        <Block Key="ИзменПоРынку" Category="ClosePosition" Location="707 300" TypeName="ChangePositionByMarketItem">
          <EditItem Guid="4315604b-b034-4b7f-a6ed-1fb579aa5224" CodeName="ИзменПоРынку" IsParametersVisible="false" OnlyValueHandlersCanUsed="true" />
        </Block>
        <Pane Key="Главная" Category="GraphPane" Location="-3 104" Order="0" HideLegend="false" SizePct="57.344326626600193" LeftAxisPrecision="0" LeftAxisByPercents="false" RightAxisPrecision="0" RightAxisByPercents="false" LeftDownHysteresis="0" LeftUpHysteresis="0" RightDownHysteresis="0" RightUpHysteresis="0" IsVisible="true" />
        <Block Key="Закрытие1" Category="TradeMath" Location="318 72" TypeName="ConverterItem">
          <EditItem Guid="23dab57d-48f4-45d7-be3d-17600c599fea" CodeName="Закрытие1" IsParametersVisible="false" OnlyValueHandlersCanUsed="false" HandlerTypeName="TSLab.Script.Handlers.Close, TSLab.Script.Handlers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
        </Block>
        <Block Key="Volume1" Category="TradeMath" Location="188 72" TypeName="ConverterItem">
          <EditItem Guid="c0c4ab4e-e1a8-4521-9451-c5ddbe3afb55" CodeName="Volume1" IsParametersVisible="false" OnlyValueHandlersCanUsed="false" HandlerTypeName="TSLab.Script.Handlers.Volume, TSLab.Script.Handlers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
        </Block>
        <Block Key="Commission1" Category="TradeMath" Location="439 29" TypeName="ConverterItem">
          <EditItem Guid="b2cb66dc-7530-4c5e-80f2-a798d4fd2cc9" CodeName="Commission1" IsParametersVisible="false" OnlyValueHandlersCanUsed="false" HandlerTypeName="TSLab.Script.Handlers.RelativeCommission, TSLab.Script.Handlers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
            <Parameters>
              <Parameter Name="CommissionPct" TypeName="Double" Value="0.05" />
              <Parameter Name="MarginPct" TypeName="Double" Value="10" />
            </Parameters>
          </EditItem>
        </Block>
        <Block Key="Источник1" Category="SECURITY" Location="96 21" TypeName="SecuritySourceItem">
          <EditItem Guid="78bf70a5-a98b-449c-a19c-819eec517081" CodeName="Источник1" IsParametersVisible="false" OnlyValueHandlersCanUsed="false">
            <Parameters>
              <Parameter Name="NotTradable" TypeName="Boolean" Value="false" />
            </Parameters>
          </EditItem>
        </Block>
        <Block Key="BoolBreaker" Category="TradeMath" Location="222.60000000000002 620.8" TypeName="ConverterItem">
          <EditItem Guid="724a70dd-1302-4c74-8c34-32c3f37544fa" CodeName="BoolBreaker" IsParametersVisible="false" OnlyValueHandlersCanUsed="false" HandlerTypeName="TSLab.Script.Handlers.BoolBreaker, TSLab.Script.Handlers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
        </Block>
        <Block Key="BoolConstan" Category="TradeMath" Location="566 561" TypeName="ConverterItem">
          <EditItem Guid="450bdc35-0517-4c42-bc39-29553a96e71c" CodeName="BoolConstan" IsParametersVisible="false" OnlyValueHandlersCanUsed="false" HandlerTypeName="TSLab.Script.Handlers.BoolConst, TSLab.Script.Handlers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
        </Block>
        <Block Key="InteracConstan" Category="GraphPaneHandler" Location="1022.8 139.20000000000007" TypeName="ConverterItem">
          <EditItem Guid="ee0eb603-25a5-485d-b1a6-e0b9c8a1d94f" CodeName="InteracConstan" IsParametersVisible="false" OnlyValueHandlersCanUsed="false" HandlerTypeName="TSLab.Script.Handlers.InteractiveConstGen, TSLab.Script.Handlers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
            <Parameters>
              <Parameter Name="Color" TypeName="String" Value="#ff0000" />
            </Parameters>
          </EditItem>
        </Block>
        <Block Key="ОткрПозиЕслиБоль" Category="OpenPosition" Location="374 201" TypeName="OpenPositionIfGreaterItem">
          <EditItem Guid="93b3c8c0-f5c2-4271-83f0-31afc211d8f2" CodeName="ОткрПозиЕслиБоль" IsParametersVisible="false" OnlyValueHandlersCanUsed="true">
            <Parameters>
              <Parameter Name="Shares" TypeName="Double" Value="1" />
              <Parameter Name="Long" TypeName="Boolean" Value="true" />
              <Parameter Name="Slippage" TypeName="Double" Value="0" />
            </Parameters>
          </EditItem>
        </Block>
        <Link From="Константа" To="ИзменПоРынку" FromPort="Out" ToPort="Shares" ToPortNum="2" />
        <ControlLink From="Константа" To="ControlPane" FromPort="ControlOut" Category="ControlPaneLink">
          <EditItem>
            <Property PropertyName="Value" ControlType="3" Type="TSLab.TemplatesEditor.Descriptor.ParameterControl.UpDownControlEditData, TSLab.TemplatesEditor, Version=2.0.1.542, Culture=neutral, PublicKeyToken=null">
              <UpDownControlEditData xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <IsVisible>true</IsVisible>
                <IsNeedRecalculate>true</IsNeedRecalculate>
                <HasRect>true</HasRect>
                <Left>19.200000000000003</Left>
                <Top>29.600000000000009</Top>
                <Width>91.2</Width>
                <Height>48</Height>
                <IsReadOnly>false</IsReadOnly>
                <InitialValue>4</InitialValue>
                <Step>1</Step>
                <NumberDecimalDigits>0</NumberDecimalDigits>
              </UpDownControlEditData>
            </Property>
          </EditItem>
        </ControlLink>
        <GraphLink From="Количество" To="ПанельГрафика" FromPort="Out" ToPort="RIGHT" Category="ChartLineLink">
          <Data>
            <GraphData xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ListStyle="HISTOHRAM" CandleStyle="BAR_CANDLE" LineStyle="SOLID" Color="205" AltColor="0" Opacity="0" HideLastValue="false" Thickness="1" PaneSide="RIGHT" Visible="true" ShowTrades="true" ShowPositionStop="true" ShowPositionText="true" ShowPositionIcon="true">
              <Points />
            </GraphData>
          </Data>
        </GraphLink>
        <GraphLink From="Источник1" To="Главная" FromPort="Out" ToPort="RIGHT" Category="ChartCandleLink">
          <Data>
            <GraphData xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ListStyle="LINE" CandleStyle="BAR_CANDLE" LineStyle="SOLID" Color="255" AltColor="255" Opacity="0" HideLastValue="false" Thickness="1" PaneSide="RIGHT" Visible="true" ShowTrades="true" ShowPositionStop="true" ShowPositionText="true" ShowPositionIcon="true">
              <Points />
            </GraphData>
          </Data>
        </GraphLink>
        <GraphLink From="Volume1" To="Главная" FromPort="Out" ToPort="LEFT" Category="ChartLineLink">
          <Data>
            <GraphData xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ListStyle="HISTOHRAM" CandleStyle="BAR_CANDLE" LineStyle="SOLID" Color="10044416" AltColor="0" Opacity="0" HideLastValue="false" Thickness="1" PaneSide="LEFT" Visible="true" ShowTrades="true" ShowPositionStop="true" ShowPositionText="true" ShowPositionIcon="true">
              <Points />
            </GraphData>
          </Data>
        </GraphLink>
        <Link From="Источник1" To="Закрытие1" FromPort="Out" ToPort="Src" ToPortNum="0" />
        <Link From="Источник1" To="Volume1" FromPort="Out" ToPort="Src" ToPortNum="0" />
        <Link From="Источник1" To="Commission1" FromPort="Out" ToPort="Src" ToPortNum="0" />
        <ControlLink From="BoolBreaker" To="ControlPane" FromPort="ControlOut" Category="ControlPaneLink">
          <EditItem>
            <Property PropertyName="Value" ControlType="11" Type="TSLab.TemplatesEditor.Descriptor.ParameterControl.TradeButtonControlEditData, TSLab.TemplatesEditor, Version=2.0.1.542, Culture=neutral, PublicKeyToken=null">
              <TradeButtonControlEditData xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <IsVisible>true</IsVisible>
                <IsNeedRecalculate>false</IsNeedRecalculate>
                <HasRect>true</HasRect>
                <Left>132.00000000000003</Left>
                <Top>20.800000000000011</Top>
                <Width>97.6</Width>
                <Height>55.2</Height>
                <IsReadOnly>false</IsReadOnly>
              </TradeButtonControlEditData>
            </Property>
          </EditItem>
        </ControlLink>
        <Link From="BoolBreaker" To="ИзменПоРынку" FromPort="Out" ToPort="Eq" ToPortNum="1" />
        <Link From="Главная" To="InteracConstan" FromPort="Out" ToPort="Src" ToPortNum="0" />
        <ControlLink From="InteracConstan" To="ControlPane" FromPort="ControlOut" Category="ControlPaneLink">
          <EditItem>
            <Property PropertyName="Value" ControlType="1" Type="TSLab.TemplatesEditor.Descriptor.ParameterControl.TextEntryControlEditData, TSLab.TemplatesEditor, Version=2.0.1.542, Culture=neutral, PublicKeyToken=null">
              <TextEntryControlEditData xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <IsVisible>true</IsVisible>
                <IsNeedRecalculate>false</IsNeedRecalculate>
                <HasRect>true</HasRect>
                <Left>0</Left>
                <Top>77.600000000000009</Top>
                <Width>NaN</Width>
                <Height>NaN</Height>
                <IsReadOnly>false</IsReadOnly>
                <InitialValue>100</InitialValue>
                <NumberDecimalDigits>1</NumberDecimalDigits>
              </TextEntryControlEditData>
            </Property>
          </EditItem>
        </ControlLink>
        <Link From="Источник1" To="ОткрПозиЕслиБоль" FromPort="Out" ToPort="Src" ToPortNum="0" />
        <Link From="ОткрПозиЕслиБоль" To="ИзменПоРынку" FromPort="Out" ToPort="Pos" ToPortNum="0" />
        <Link From="InteracConstan" To="ОткрПозиЕслиБоль" FromPort="Out" ToPort="Prc" ToPortNum="2" />
        <Link From="ОткрПозиЕслиБоль" To="Количество" FromPort="Out" ToPort="Src" ToPortNum="0" />
      </Model>
    </ViewModel>
  </EditData>
  <Options xsi:type="LabOptions">
    <BarSize>5</BarSize>
    <Indent>0</Indent>
    <HideValues>false</HideValues>
    <LegendTransparency>0</LegendTransparency>
    <IntervalBase>MINUTE</IntervalBase>
    <Interval>5</Interval>
    <RecalcInterval>INTERVAL</RecalcInterval>
    <DateFrom>2014-03-03T00:00:00+04:00</DateFrom>
    <UseDateFrom>true</UseDateFrom>
    <DateTo>2015-04-08T00:10:00</DateTo>
    <UseDateTo>false</UseDateTo>
    <MaxDays>0</MaxDays>
    <SessionBegin>2000-01-01T00:00:00</SessionBegin>
    <SessionEnd>2000-01-01T00:00:00</SessionEnd>
    <DecompressMethod>Method1</DecompressMethod>
    <TradeFromBar>0</TradeFromBar>
    <MaxCandels>500</MaxCandels>
    <RtUpdates>true</RtUpdates>
    <CalcForEachSecurity>true</CalcForEachSecurity>
    <NotUsePositions>false</NotUsePositions>
    <InitDeposit>0</InitDeposit>
    <LabCalcType>Default</LabCalcType>
    <TradeMode>All</TradeMode>
  </Options>
  <Mappings>
    <Sources>
      <Source DataSourceName="Finam" SecurityId="SBER:1" Name="Источник1" IsOption="false">
        <Records />
      </Source>
    </Sources>
    <Parameters>
      <Parameter xsi:type="OptimData" Name="Значение" InvariantName="Value" ItemName="ee0eb603-25a5-485d-b1a6-e0b9c8a1d94f" CodeName="InteracConstan_Value" Visible="true" UsedInOptimization="false" Value="100" TypeName="Double" MinValue="1" MaxValue="10" Step="1" NumberDecimalDigits="1" />
      <Parameter xsi:type="OptimData" Name="Значение" InvariantName="Value" ItemName="Константа" CodeName="Константа_Value" Visible="true" UsedInOptimization="false" Value="4" TypeName="Double" MinValue="-100" MaxValue="100" Step="1" NumberDecimalDigits="0" />
      <Parameter xsi:type="BoolOptimData" Name="Значение" InvariantName="Value" ItemName="724a70dd-1302-4c74-8c34-32c3f37544fa" CodeName="BoolBreaker_Value" Visible="true" UsedInOptimization="false" Value="True" />
      <Parameter xsi:type="BoolOptimData" Name="Значение" InvariantName="Value" ItemName="450bdc35-0517-4c42-bc39-29553a96e71c" CodeName="BoolConstan_Value" Visible="true" UsedInOptimization="false" Value="True" />
    </Parameters>
    <ParameterGroups />
    <AutoParameters />
  </Mappings>
  <Iterations>100</Iterations>
  <OptParametersRecords />
  <OptParametersRecordsFolders />
</GraphDataBase>]]></Code>
  <Settings2><![CDATA[<?xml version="1.0" encoding="utf-16"?>
<XmlLabSettings xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Options>
    <DefEntryApprove>false</DefEntryApprove>
    <DefExitApprove>false</DefExitApprove>
    <AutoEntryBars>0</AutoEntryBars>
    <AutoCloseBars>0</AutoCloseBars>
    <Slippage>0</Slippage>
    <SlippagePct>0</SlippagePct>
    <TakeProfitNoSlippage>false</TakeProfitNoSlippage>
    <OpenPositionNoSlippage>false</OpenPositionNoSlippage>
    <ByMarketAsLimt>false</ByMarketAsLimt>
    <InvalidStopsByMarket>false</InvalidStopsByMarket>
    <RemoveInactivePositions>true</RemoveInactivePositions>
    <WarnSkippedOpenPositions>true</WarnSkippedOpenPositions>
    <NotOpenIfHasSkippedExit>false</NotOpenIfHasSkippedExit>
    <NoCalcInfo>false</NoCalcInfo>
    <MaxBarsForSignal>0</MaxBarsForSignal>
    <WaitExecutionExitBars>0</WaitExecutionExitBars>
    <WaitExecutionEntryBars>0</WaitExecutionEntryBars>
    <SimulatePositionOrdering>true</SimulatePositionOrdering>
  </Options>
  <AppearanceOptions>
    <Background>
      <A>255</A>
      <R>245</R>
      <G>245</G>
      <B>245</B>
      <ScA>1</ScA>
      <ScR>0.913098633</ScR>
      <ScG>0.913098633</ScG>
      <ScB>0.913098633</ScB>
    </Background>
    <Foreground>
      <A>255</A>
      <R>0</R>
      <G>0</G>
      <B>0</B>
      <ScA>1</ScA>
      <ScR>0</ScR>
      <ScG>0</ScG>
      <ScB>0</ScB>
    </Foreground>
    <ShowCaption>true</ShowCaption>
    <FontSize>11</FontSize>
  </AppearanceOptions>
  <Layout>&lt;XmlLabLayout xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
	&lt;MainChartWindow Id="Main"&gt;
		&lt;Docking /&gt;
	&lt;/MainChartWindow&gt;
	&lt;LabWindows /&gt;
&lt;/XmlLabLayout&gt;</Layout>
  <ControlPaneLayout>
    <XmlItem id="ControlPane" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&#xD;&#xA;&lt;ArrayOfFrameworkElementSettings xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;&#xD;&#xA;  &lt;FrameworkElementSettings&gt;&#xD;&#xA;    &lt;Id&gt;ControlPane_Константа_Value&lt;/Id&gt;&#xD;&#xA;    &lt;Location&gt;&#xD;&#xA;      &lt;X&gt;52&lt;/X&gt;&#xD;&#xA;      &lt;Y&gt;78&lt;/Y&gt;&#xD;&#xA;    &lt;/Location&gt;&#xD;&#xA;    &lt;Size&gt;&#xD;&#xA;      &lt;Width&gt;66.48&lt;/Width&gt;&#xD;&#xA;      &lt;Height&gt;63.920000000000016&lt;/Height&gt;&#xD;&#xA;    &lt;/Size&gt;&#xD;&#xA;  &lt;/FrameworkElementSettings&gt;&#xD;&#xA;  &lt;FrameworkElementSettings&gt;&#xD;&#xA;    &lt;Id&gt;ControlPane_BoolBreaker_Value&lt;/Id&gt;&#xD;&#xA;    &lt;Location&gt;&#xD;&#xA;      &lt;X&gt;52&lt;/X&gt;&#xD;&#xA;      &lt;Y&gt;143&lt;/Y&gt;&#xD;&#xA;    &lt;/Location&gt;&#xD;&#xA;    &lt;Size&gt;&#xD;&#xA;      &lt;Width&gt;70.74666666666667&lt;/Width&gt;&#xD;&#xA;      &lt;Height&gt;47.960000000000008&lt;/Height&gt;&#xD;&#xA;    &lt;/Size&gt;&#xD;&#xA;  &lt;/FrameworkElementSettings&gt;&#xD;&#xA;&lt;/ArrayOfFrameworkElementSettings&gt;" />
    <XmlItem id="d055a243-dce8-4732-b269-bde1c5445652" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&#xD;&#xA;&lt;ArrayOfFrameworkElementSettings xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;&#xD;&#xA;  &lt;FrameworkElementSettings&gt;&#xD;&#xA;    &lt;Id&gt;d055a243-dce8-4732-b269-bde1c5445652_Константа_Value&lt;/Id&gt;&#xD;&#xA;    &lt;Location&gt;&#xD;&#xA;      &lt;X&gt;19.200000000000003&lt;/X&gt;&#xD;&#xA;      &lt;Y&gt;29.600000000000009&lt;/Y&gt;&#xD;&#xA;    &lt;/Location&gt;&#xD;&#xA;    &lt;Size&gt;&#xD;&#xA;      &lt;Width&gt;91.2&lt;/Width&gt;&#xD;&#xA;      &lt;Height&gt;48&lt;/Height&gt;&#xD;&#xA;    &lt;/Size&gt;&#xD;&#xA;    &lt;IsReadOnly&gt;false&lt;/IsReadOnly&gt;&#xD;&#xA;  &lt;/FrameworkElementSettings&gt;&#xD;&#xA;  &lt;FrameworkElementSettings&gt;&#xD;&#xA;    &lt;Id&gt;d055a243-dce8-4732-b269-bde1c5445652_724a70dd-1302-4c74-8c34-32c3f37544fa_Value&lt;/Id&gt;&#xD;&#xA;    &lt;Location&gt;&#xD;&#xA;      &lt;X&gt;132.00000000000003&lt;/X&gt;&#xD;&#xA;      &lt;Y&gt;20.800000000000011&lt;/Y&gt;&#xD;&#xA;    &lt;/Location&gt;&#xD;&#xA;    &lt;Size&gt;&#xD;&#xA;      &lt;Width&gt;97.6&lt;/Width&gt;&#xD;&#xA;      &lt;Height&gt;55.2&lt;/Height&gt;&#xD;&#xA;    &lt;/Size&gt;&#xD;&#xA;    &lt;IsReadOnly&gt;false&lt;/IsReadOnly&gt;&#xD;&#xA;  &lt;/FrameworkElementSettings&gt;&#xD;&#xA;&lt;/ArrayOfFrameworkElementSettings&gt;" />
  </ControlPaneLayout>
</XmlLabSettings>]]></Settings2>
</ExportScriptData>