<script type="text/ng-template" id="../app/directives/apexchart/apexchart.html">
<div id="{{::chartId}}" style="width: {{::width}};  height: {{::height}}; position: relative;"></div>
</script>
<script type="text/ng-template" id="../app/directives/applyMassConfig/applyMassConfig.html">
<fieldset class="task-apply-mass-config">
  <legend tsq>Settings summary</legend>

  <div class="clearfix"></div>

  <fieldset class="sq-fieldset">
    <legend tsq>Source config</legend>

    <div class="clearfix"></div>

    <div ng-if="!source" class="radio">
      <label class="sq-wradio file-line">
        <input
          type="radio"
          name="AMCSourceConfigType"
          value="file"
          ng-model="config.loadFrom.type"
          ng-change="settingsChanged()"
          ng-class="{'checked': config.loadFrom.type=='file'}"
        />
        <span class="sq-mark"></span>
        <label class="sqn-label task-file-label" tsq>Load from file</label>
        <input
          type="text"
          class="sqn-input"
          ng-model="config.loadFrom.file"
          readonly="1"
          ng-attr-title="{{config.loadFrom.file}}"
        />
        <a ng-click="openFilePicker()" tsq>Browse</a>
      </label>
    </div>

    <div ng-if="!source" class="radio">
      <label class="sq-wradio">
        <input
          type="radio"
          name="AMCSourceConfigType"
          value="task"
          ng-model="config.loadFrom.type"
          ng-change="settingsChanged()"
          ng-class="{'checked': config.loadFrom.type=='task'}"
        />
        <span class="sq-mark"></span>
        <tsq>Load from existing task</tsq>
        <div class="sqn-input sqn-select select-task">
          <span ng-bind="getSourceTaskLabel()"></span>
          <select
            ng-model="config.loadFrom.task"
            ng-options="item.taskName as item.taskTitle for item in config.availableTasks"
            onFocus="sqnSelectFocus(this)"
            onBlur="sqnSelectBlur(this)"
          ></select>
        </div>
      </label>
    </div>

    <div ng-if="source && source=='file'" class="file-line">
      <label class="sqn-label" tsq>Load from file</label>
      <input
        type="text"
        class="sqn-input"
        ng-model="config.loadFrom.file"
        readonly="1"
        ng-attr-title="{{config.loadFrom.file}}"
      />
      <a ng-click="openFilePicker()" tsq>Browse</a>
    </div>

    <div ng-if="source && source!='file'">
      <label class="sqn-label" tsq>Load from existing task:</label>
      <div class="sqn-input sqn-select">
        <span ng-bind="getSourceTaskLabel()"></span>
        <select
          class="select-task"
          ng-model="config.loadFrom.task"
          ng-options="item.taskName as item.taskTitle for item in config.availableTasks"
          onFocus="sqnSelectFocus(this)"
          onBlur="sqnSelectBlur(this)"
          ng-disabled="true"
        ></select>
      </div>
    </div>
  </fieldset>

  <fieldset class="sq-fieldset what-to-apply">
    <legend tsq>What to apply</legend>

    <div class="clearfix"></div>

    <div>
      <div class="sq-checkbox">
        <input
          type="checkbox"
          ng-model="config.whatToApply.whatToBuild"
          id="AMCWhatToBuild-{{::id}}"
        />
        <label for="AMCWhatToBuild-{{::id}}" class="sqn-label" tsq>What to build</label>
      </div>
    </div>

    <div>
      <div class="sq-checkbox tabbed">
        <input
          type="checkbox"
          ng-model="config.whatToApply.geneticOptions"
          id="AMCGeneticOptions-{{::id}}"
          ng-disabled="!config.whatToApply.whatToBuild"
        />
        <label for="AMCGeneticOptions-{{::id}}" class="sqn-label" tsq>Genetic options</label>
      </div>
    </div>

    <div>
      <div class="sq-checkbox">
        <input
          type="checkbox"
          ng-model="config.whatToApply.whatToRetest"
          id="AMCWhatToRetest-{{::id}}"
        />
        <label for="AMCWhatToRetest-{{::id}}" class="sqn-label" tsq>What to retest</label>
      </div>
    </div>

    <div>
      <div class="sq-checkbox">
        <input
          type="checkbox"
          ng-model="config.whatToApply.partsToImprove"
          id="AMCPartsToImprove-{{::id}}"
        />
        <label for="AMCPartsToImprove-{{::id}}" class="sqn-label" tsq>Parts to improve</label>
      </div>
    </div>

    <div>
      <div class="sq-checkbox">
        <input
          type="checkbox"
          ng-model="config.whatToApply.optimization"
          id="AMCOptimization-{{::id}}"
        />
        <label for="AMCOptimization-{{::id}}" class="sqn-label" tsq>Optimization</label>
      </div>
    </div>
    
    <div>
      <div class="sq-checkbox">
        <input
          type="checkbox"
          ng-model="config.whatToApply.data"
          id="AMCData0-{{::id}}"
        />
        <label for="AMCData0-{{::id}}" class="sqn-label" tsq>Data</label>
        <a tsq ng-click="selectAllData()" id="SAMCDataSelectAll-{{::id}}"
          >select all</a
        >
      </div>
      <div class="sq-checkbox tabbed">
        <input
          type="checkbox"
          ng-model="config.whatToApply.dataTradingEngine"
          id="AMCData1-{{::id}}"
          ng-disabled="!config.whatToApply.data"
        />
        <label for="AMCData1-{{::id}}" tsq>Trading engine</label>
      </div>
      <div class="sq-checkbox tabbed">
        <input
          type="checkbox"
          ng-model="config.whatToApply.dataBacktestData"
          id="AMCData2-{{::id}}"
          ng-disabled="!config.whatToApply.data"
        />
        <label for="AMCData2-{{::id}}" tsq>Backtest data</label>
      </div>
      <div class="sq-checkbox tabbed">
        <input
          type="checkbox"
          ng-model="config.whatToApply.dataTestParameters"
          id="AMCData3-{{::id}}"
          ng-disabled="!config.whatToApply.data"
        />
        <label for="AMCData3-{{::id}}" tsq>Test parameters</label>
      </div>
      <div class="sq-checkbox tabbed">
        <input
          type="checkbox"
          ng-model="config.whatToApply.dataDataRangeParts"
          id="AMCData4-{{::id}}"
          ng-disabled="!config.whatToApply.data"
        />
        <label for="AMCData4-{{::id}}" tsq>Data range parts</label>
      </div>
    </div>

    <div>
      <div class="sq-checkbox">
        <input
          type="checkbox"
          ng-model="config.whatToApply.tradingOptions"
          id="AMCTO-{{::id}}"
        />
        <label for="AMCTO-{{::id}}" class="sqn-label" tsq
          >Trading options</label
        >
      </div>
    </div>

    <div>
      <div class="sq-checkbox">
        <input
          type="checkbox"
          ng-model="config.whatToApply.blocks"
          id="AMCBlocks0-{{::id}}"
        />
        <label for="AMCBlocks0-{{::id}}" class="sqn-label" tsq
          >Building blocks</label
        >
        <a tsq ng-click="selectAllBlocks()" id="AMCBlocksSelectAll-{{::id}}"
          >select all</a
        >
      </div>
      <div class="sq-checkbox tabbed">
        <input
          type="checkbox"
          ng-model="config.whatToApply.blocksSignals"
          id="AMCBlocks1-{{::id}}"
          ng-disabled="!config.whatToApply.blocks"
        />
        <label for="AMCBlocks1-{{::id}}" tsq>Signals</label>
      </div>
      <div class="sq-checkbox tabbed">
        <input
          type="checkbox"
          ng-model="config.whatToApply.blocksIndicators"
          id="AMCBlocks2-{{::id}}"
          ng-disabled="!config.whatToApply.blocks"
        />
        <label for="AMCBlocks2-{{::id}}" tsq>Indicators</label>
      </div>
      <div class="sq-checkbox tabbed">
        <input
          type="checkbox"
          ng-model="config.whatToApply.blocksStopLimitEntry"
          id="AMCBlocks3-{{::id}}"
          ng-disabled="!config.whatToApply.blocks"
        />
        <label for="AMCBlocks3-{{::id}}" tsq>Stop/Limit entry blocks</label>
      </div>
      <div class="sq-checkbox tabbed">
        <input
          type="checkbox"
          ng-model="config.whatToApply.blocksOrderTypes"
          id="AMCBlocks4-{{::id}}"
          ng-disabled="!config.whatToApply.blocks"
        />
        <label for="AMCBlocks4-{{::id}}" tsq>Order types</label>
      </div>
      <div class="sq-checkbox tabbed">
        <input
          type="checkbox"
          ng-model="config.whatToApply.blocksExitTypes"
          id="AMCBlocks5-{{::id}}"
          ng-disabled="!config.whatToApply.blocks"
        />
        <label for="AMCBlocks5-{{::id}}" tsq>Exit types</label>
      </div>
    </div>

    <div>
      <div class="sq-checkbox">
        <input
          type="checkbox"
          ng-model="config.whatToApply.atm"
          id="AMCATM-{{::id}}"
        />
        <label for="AMCATM-{{::id}}" class="sqn-label" tsq>ATM</label>
      </div>
    </div>

    <div>
      <div class="sq-checkbox">
        <input
          type="checkbox"
          ng-model="config.whatToApply.moneyManagement"
          id="AMCMM-{{::id}}"
        />
        <label for="AMCMM-{{::id}}" class="sqn-label" tsq
          >Money management</label
        >
      </div>
    </div>

    <div>
      <div class="sq-checkbox">
        <input
          type="checkbox"
          ng-model="config.whatToApply.crossChecks"
          id="AMCCC-{{::id}}"
        />
        <label for="AMCCC-{{::id}}" class="sqn-label" tsq>Cross checks</label>
      </div>
    </div>

    <div>
      <div class="sq-checkbox">
        <input
          type="checkbox"
          ng-model="config.whatToApply.ranking"
          id="AMCRanking-{{::id}}"
        />
        <label for="AMCRanking-{{::id}}" class="sqn-label" tsq>Ranking</label>
      </div>
    </div>
  </fieldset>

  <fieldset class="sq-fieldset">
    <legend>
      <tsq>Target task(s)</tsq
      ><a
          tsq
          ng-click="selectAllTargetTasks()"
          id="AMCTargetTaskSelectAll-{{::id}}"
          >select all</a
        ><a
        tsq
        ng-click="deselectAllTargetTasks()"
        id="AMCTargetTaskDeselectAll-{{::id}}"
        >deselect all</a
      >
    </legend>

    <div class="clearfix"></div>

    <div class="gen-help">
      <tsq>Note - only the compatible configs will be applied</tsq>
    </div>

    <div
      class="sq-checkbox"
      ng-repeat="task in config.availableTasks track by $index"
    >
      <input
        type="checkbox"
        ng-model="task.apply"
        id="AMCTargetTask{{$index}}-{{::id}}"
      />
      <label
        for="AMCTargetTask{{$index}}-{{::id}}"
        ng-bind="task.taskTitle"
      ></label>
    </div>
  </fieldset>
</fieldset>

</script>
<script type="text/ng-template" id="../app/directives/applyMassConfigDialog/applyMassConfigDialog.html">
<div class="modal centered" id="applyMassConfigDialog-{{::id}}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-backdrop="static" data-keyboard="false">
    <div class="modal-dialog" role="document" style="width: 700px;">
        <div class="modal-content">
            <div class="modal-header">
                <button id="buttonTimes-18a" type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" ng-bind="title"></h4>
            </div>
            <div class="modal-body" style="min-height: 390px;">
                <apply-mass-config instance="instance" config="config" source="{{source}}"></apply-mass-config>
            </div>
            <div class="modal-footer">
                <a ng-hide="hideClose" data-dismiss="modal" tsq>Close</a>
                <button id="buttonApplyMassConfig-18b" type="button" class="btn btn-primary" ng-click="onApplyMassConfig()" tsq>Apply mass config</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../app/directives/benchmarkDialog/benchmarkDialog.html">
<div class="modal centered" id="benchmarkDialog" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-backdrop="static" data-keyboard="false">
    <div class="modal-dialog" role="document" style="width: 700px;">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" tsq>Benchmark StrategyQuant speed</h4>
            </div>
            <div class="modal-body" style="min-height: 390px;">
                <div>
                    <div ng-show="afterStart" tsq>To estimate strategy testing time we have to run some initial benchmarks of StrategyQuant speed on this computer.</div>
                    <br> <tsq>This benchmark will use your actual performance settings, which is:</tsq>
                    <br>
                    <span ng-bind="performance"></span>

                </div>

                <div ng-show="status=='beforeStart' || status=='running'">
                    <br> <tsq>Please be patient, benchmark shouldn't take more than a couple of minutes.</tsq>
                    <br>
                    <br>
                </div>

                <button id="buttonStartBenchmark-19a" ng-show="status=='beforeStart'" type="button" class="btn btn-primary" ng-click="start()" tsq>Start benchmark</button>

                <div ng-show="status=='running'" class="progress">
                    <div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100"
                        style="width:{{progress}}%">{{progress}} %</div>
                </div>

                <div ng-show="status=='showResults'">
                    <br>
                    <div class="benchmark-title" tsq>Benchmark results</div>

                    <table class="engine-project-stats">
                        <tr>
                            <td><tsq>Total duration (data preparation / test)</tsq>
                                <span ng-bind="results.duration"></span>
                            </td>
                            <td><tsq>Strategy avg. time (parallel)</tsq>
                                <span ng-bind="results.strategyAverageTime"></span>
                            </td>
                        </tr>
                        <tr>
                            <td><tsq>Time per tick</tsq>
                                <span ng-bind="results.timePerTick"></span>
                            </td>
                            <td><tsq>Total ticks</tsq>
                                <span ng-bind="results.totalTicks"></span>
                            </td>
                        </tr>
                        <tr>
                            <td><tsq>Strategies per hour</tsq>
                            </td>
                            <td>
                                <span ng-bind="results.avgStrategiesPerHour"></span>
                            </td>
                        </tr>
                    </table>

                    <br>
                    <br> <tsq>You can repeat this benchmark by choosing Benchmark... action in the global menu on the top right corner.</tsq>
                    <br> <tsq>Please note that benchmark runs using standardized artifical strategy and data, so its result can be
                    compared with other installations of SQ on another computers.</tsq>
                    <br> <tsq>It is only an estimation, real backtest time depends a lot on the complexity of the strategy, timeframe
                    and data range and precision.</tsq>
                    <br>
                </div>
            </div>
            <div class="modal-footer">
                <a ng-hide="hideClose" data-dismiss="modal" tsq>Close</a>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../app/directives/blockConfig/blockConfig.html">
<div class="block-params">
    <div class="quant-tabs">
        <div class="tabs-header">
            <div data-item="parameter-sets-item" ng-show="selectedBlock.category != categories.orderTypes && !disableParamSets"
                ng-class="{'active': selectedTab=='sets'}" ng-click="selectedTab='sets';refreshGrids()" tsq>Parameter sets</div>
            <div data-item="parameters-item" ng-class="{'active': selectedTab=='params'}" ng-click="selectedTab='params';refreshGrids()" tsq>Parameter values</div>
            <div data-item="indicator-values-item" ng-show="selectedBlock.indicatorMin != null" ng-class="{'active': selectedTab=='indicator-values'}" ng-click="selectedTab='indicator-values';refreshGrids()" tsq>Indicator values</div>
        </div>
        <div class="tabs-body">
            <div data-item="parameters-item">
                <div class="help-panel">
                    <label><tsq>Parameters of this building block. They can be generated randomly or have fixed value - you can configure
                        it for every parameter by double-clicking on it in the grid below.
                        <br/>
                        <br/> If you wish SQ to choose from some most common values (for example for periods), define them as
                        parameter sets in the
                        <strong >Predefined Parameter Sets</strong> tab.</tsq>
                    </label>
                </div>

                <div class="grid-popup-wrapper">
                    <div id="{{::parametersGridId}}" style="width: 100%!important; height: 200px;" />
                </div>

                <div class="bottom-buttons">
                    <button id="buttonApplyToAllBlocksOfTheSameIndicator-20a" class="btn btn-default" ng-show="selectedBlock.category == categories.signals" ng-click="selectedBlock.onApplyToAll(true)" tsq>Apply to all blocks of the same indicator</button>
                    <button id="buttonResetToDefault-20b" class="btn btn-default" ng-click="selectedBlock.onResetToDefault(selectedBlock, true)" tsq>Reset to default</button>
                </div>
            </div>
            <div data-item="parameter-sets-item" ng-show="selectedBlock.category != categories.orderTypes && !disableParamSets" class="active">
                <div class="help-panel">
                    <label><tsq>Parameters are either generated all randomly as defined in tab
                        <strong>Parameters</strong>, or SQ can choose one of the predefined parameter sets specified below.<br/>
                        This allows you to define most common indicator values (for example periods). Even in parameter
                        sets some of the parameers can be generated randomly (denoted by *), while others will have predefined
                        value.</tsq>
                    </label>
                </div>

                <div class="grid-popup-wrapper">
                    <div id="{{::parameterSetsGridId}}" style="width: 100%; height: 210px;" />
                </div>

                <div class="bottom-buttons">
                    <button id="buttonApplyToAllBlocksOfTheSameIndicator-20c" class="btn btn-default" ng-show="selectedBlock.category == categories.signals" ng-click="selectedBlock.onApplyToAll(false)" tsq>Apply to all blocks of the same indicator</button>
                    <button id="buttonResetToDefault-20d" class="btn btn-default" ng-click="selectedBlock.onResetToDefault(selectedBlock, false)" tsq>Reset to default</button>
                </div>
            </div>
            <div data-item="indicator-values-item" ng-show="selectedBlock.indicatorMin != null">
                <div class="help-panel">
                    <label tsq>Range of indicator output values. It will be used in conditions that compare this indicator with a numeric value</label>
                </div>

                <div class="row">
                    <div class="col-xs-12 toolbar">
                        <label class="sqn-label fixed-width">
                            <tsq>Minimum</tsq>:
                        </label>
                        <div class="sqn-spinner">
                            <input type="text" class="sqn-input" step="1" ng-model="selectedBlock.indicatorMin"
                                onFocus="sqnSpinnerFocus(this)" onBlur="sqnSpinnerBlur(this)" />
                            <div class="sqn-spinner-btns">
                                <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                                <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                            </div>
                        </div>
                    </div>
                    <div class="col-xs-12 toolbar">
                        <label class="sqn-label fixed-width">
                            <tsq>Maximum</tsq>:
                        </label>
                        <div class="sqn-spinner">
                            <input type="text" class="sqn-input" step="1" ng-model="selectedBlock.indicatorMax"
                                onFocus="sqnSpinnerFocus(this)" onBlur="sqnSpinnerBlur(this)" />
                            <div class="sqn-spinner-btns">
                                <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                                <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                            </div>
                        </div>
                    </div>
                    <div class="col-xs-12 toolbar">
                        <label class="sqn-label fixed-width">
                            <tsq>Step</tsq>:
                        </label>
                        <div class="sqn-spinner">
                            <input type="text" class="sqn-input" step="1" ng-model="selectedBlock.indicatorStep"
                                onFocus="sqnSpinnerFocus(this)" onBlur="sqnSpinnerBlur(this)" />
                            <div class="sqn-spinner-btns">
                                <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                                <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                            </div>
                        </div>
                    </div>
                </div>

                <br>
                <br>
                
                <div class="bottom-buttons">
                    <button id="buttonResetToDefault-20e" class="btn btn-default" ng-click="onResetMinMaxToDefault()" tsq>Reset to default</button>
                </div>
            </div>
        </div>
    </div>

    <div ng-include="'../app/directives/blockConfig/editParamPopup.html'" />
    <div ng-include="'../app/directives/blockConfig/editParamSetPopup.html'" />
</div>
</script>
<script type="text/ng-template" id="../app/directives/blockConfig/editParamPopup.html">
<!-- Modal window-->
<div class="modal centered edit-param-popup" id="{{::editParamPopupId}}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog modal-smaller" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button id="buttonTimes-21a" type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel" tsq>Edit parameter</h4>
            </div>
            <div class="modal-body">
                <form name="editSetupForm" class="form-horizontal" role="form" ng-class="{'submitted': errors}">
                    <form-errors errors="errors"></form-errors>

                    <label id="param-name">
                        <tsq>Parameter</tsq>:
                        <span ng-bind-html="selectedParam.name | html" />
                    </label>

                    <fieldset class="sq-fieldset">
                        <div class="row">
                            <div class="col-xs-12 toolbar type">
                                <label class="sqn-label">
                                    <tsq>Type</tsq>:
                                </label>
                                <div class="btn-group" ng-class="{'disabled':selectedParam.type == 'string'}">
                                    <button id="buttonRandomlyGenerated-21b" ng-click="selectedParam.generation = generationTypes.random" type="button"
                                        class="btn btn-default" ng-class="{active: selectedParam.generation == generationTypes.random}"
                                        ng-disabled="selectedParam.type == 'string'" tsq>Randomly generated</button>
                                    <button id="buttonFixedValue-21c" ng-click="selectedParam.generation = generationTypes.fixed" type="button"
                                        class="btn btn-default" ng-class="{active: selectedParam.generation == generationTypes.fixed}"
                                        ng-disabled="selectedParam.type == 'string'" tsq>Fixed value</button>
                                </div>
                            </div>
                        </div>

                        <span ng-if="(selectedParam.type == 'int' || selectedParam.type == 'double') && !selectedParam.isCombo"
                            ng-show="selectedParam.generation != generationTypes.fixed">
                            <div ng-if="selectedParam.genMinValue" class="special-param-settings">
                                <div class="row">
                                    <div class="col-xs-12 toolbar" ng-show="selectedParam.key != '#Shift#' && (!selectedParam.paramType || selectedParam.paramType != 'shift')">
                                        <label class="sqn-label fixed-width">
                                            <tsq>Minimum</tsq>:
                                        </label>

                                        <div class="btn-group" ng-class="{'disabled':selectedParam.type == 'string'}">
                                            <button id="buttonGlobal-21d" ng-click="selectedParam.minValue = selectedParam.genMinValue; selectedParam.customMinValue = false;"
                                                type="button" class="btn btn-default" ng-class="{active: selectedParam.minValue == selectedParam.genMinValue}"
                                                tsq>Global</button>
                                            <button id="buttonCustom-21e" ng-click="selectedParam.minValue = getRealGenValue(selectedParam, true); selectedParam.customMinValue = true;"
                                                type="button" class="btn btn-default" ng-class="{active: selectedParam.minValue != selectedParam.genMinValue}"
                                                tsq>Custom</button>
                                        </div>

                                        <div class="sqn-spinner" ng-show="selectedParam.minValue != selectedParam.genMinValue || selectedParam.customMinValue">
                                            <input type="text" class="sqn-input" min="{{selectedParam.originalMinValue}}" max="{{selectedParam.originalMaxValue}}" step="{{selectedParam.originalStep}}" ng-model="selectedParam.minValue"
                                                onFocus="sqnSpinnerFocus(this)" onBlur="sqnSpinnerBlur(this)" />
                                            <div class="sqn-spinner-btns">
                                                <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                                                <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                                            </div>
                                        </div>

                                        <label class="value-label" ng-show="selectedParam.minValue == selectedParam.genMinValue && !selectedParam.customMinValue"
                                            ng-bind="getRealGenValue(selectedParam, true)"></label>
                                    </div>
                                    <div class="col-xs-12 toolbar">
                                        <label class="sqn-label fixed-width">
                                            <tsq>Maximum</tsq>:
                                        </label>

                                        <div class="btn-group" ng-class="{'disabled':selectedParam.type == 'string'}">
                                            <button id="buttonGlobal-21f" ng-click="selectedParam.maxValue = selectedParam.genMaxValue; selectedParam.customMaxValue = false;"
                                                type="button" class="btn btn-default" ng-class="{active: selectedParam.maxValue == selectedParam.genMaxValue}"
                                                tsq>Global</button>
                                            <button id="buttonCustom-21g" ng-click="selectedParam.maxValue = getRealGenValue(selectedParam, false); selectedParam.customMaxValue = true;"
                                                type="button" class="btn btn-default" ng-class="{active: selectedParam.maxValue != selectedParam.genMaxValue}"
                                                tsq>Custom</button>
                                        </div>

                                        <div class="sqn-spinner" ng-show="selectedParam.maxValue != selectedParam.genMaxValue || selectedParam.customMaxValue">
                                            <input type="text" class="sqn-input" min="{{selectedParam.originalMinValue}}" max="{{selectedParam.originalMaxValue}}" step="{{selectedParam.originalStep}}" ng-model="selectedParam.maxValue"
                                                onFocus="sqnSpinnerFocus(this)" onBlur="sqnSpinnerBlur(this)" />
                                            <div class="sqn-spinner-btns">
                                                <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                                                <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                                            </div>
                                        </div>

                                        <label class="value-label" ng-show="selectedParam.maxValue == selectedParam.genMaxValue && !selectedParam.customMaxValue"
                                            ng-bind="getRealGenValue(selectedParam, false)"></label>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-xs-12 toolbar step">
                                        <label class="sqn-label fixed-width">
                                            <tsq>Step</tsq>:
                                        </label>
                                        <div class="sqn-spinner">
                                            <input type="text" class="sqn-input" step="1" ng-model="selectedParam.step"
                                                onFocus="sqnSpinnerFocus(this)" onBlur="sqnSpinnerBlur(this)" />
                                            <div class="sqn-spinner-btns">
                                                <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                                                <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="row help">
                                    <label>
                                        <tsq>Global Minimum and Maximum can be configured in</tsq>
                                        <br>
                                        <b tsq>What to build -> Additional build config</b>
                                    </label>
                                </div>
                            </div>
                            <div ng-if="!selectedParam.genMinValue">
                                <div class="row">
                                    <div class="col-xs-12 toolbar">
                                        <label class="sqn-label fixed-width">
                                            <tsq>Minimum</tsq>:
                                        </label>
                                        <div class="sqn-spinner">
                                            <input type="text" class="sqn-input" min="{{selectedParam.originalMinValue}}" max="{{selectedParam.originalMaxValue}}" step="{{selectedParam.originalStep}}" ng-model="selectedParam.minValue"
                                                onFocus="sqnSpinnerFocus(this)" onBlur="sqnSpinnerBlur(this)" />
                                            <div class="sqn-spinner-btns">
                                                <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                                                <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-xs-12 toolbar">
                                        <label class="sqn-label fixed-width">
                                            <tsq>Maximum</tsq>:
                                        </label>
                                        <div class="sqn-spinner">
                                            <input type="text" class="sqn-input" min="{{selectedParam.originalMinValue}}" max="{{selectedParam.originalMaxValue}}" step="{{selectedParam.originalStep}}" ng-model="selectedParam.maxValue"
                                                onFocus="sqnSpinnerFocus(this)" onBlur="sqnSpinnerBlur(this)" />
                                            <div class="sqn-spinner-btns">
                                                <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                                                <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="col-xs-12 toolbar step">
                                        <label class="sqn-label fixed-width">
                                            <tsq>Step</tsq>:
                                        </label>
                                        <div class="sqn-spinner">
                                            <input type="text" class="sqn-input" step="1" ng-model="selectedParam.step"
                                                onFocus="sqnSpinnerFocus(this)" onBlur="sqnSpinnerBlur(this)" />
                                            <div class="sqn-spinner-btns">
                                                <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                                                <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </span>

                        <div class="row" ng-if="selectedParam.isCombo" ng-show="selectedParam.generation != generationTypes.fixed">
                            <div class="col-xs-12" ng-if="selectedParam.type != 'boolean'">
                                <legend>Available options:</legend>
                                <span ng-if="selectedParam.key == '#Chart#' || (selectedParam.paramType && selectedParam.paramType == 'data')">
                                    <div class="sq-checkbox" ng-click="selectedParam.allCharts=!selectedParam.allCharts">
                                        <input type="checkbox" ng-model="selectedParam.allCharts">
                                        <label tsq>All available charts</label>
                                    </div>
                                    <label class="chart-param-hint" tsq>or pick only specific charts below:</label>
                                </span>

                                <div ng-repeat="option in selectedParam.options">
                                    <div class="sq-checkbox" ng-click="!selectedParam.allCharts?option.checked=!option.checked:void">
                                        <input type="checkbox" ng-model="option.checked" ng-disabled="selectedParam.allCharts">
                                        <label ng-bind="::option.name"></label>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div class="row" ng-if="selectedParam.generation == generationTypes.fixed">
                            <div class="col-xs-8 toolbar">
                                <label ng-if="!selectedParam.isCombo && selectedParam.type == 'string'" class="sqn-label fixed-width">
                                    <tsq>Value</tsq>:
                                    <input type="text" class="sqn-input" ng-model="selectedParam.fixedValue" />
                                </label>
                                <div class="fixed-value" ng-if="!selectedParam.isCombo && (selectedParam.type == 'int' || selectedParam.type == 'double')">
                                    <label class="sqn-label fixed-width">
                                        <tsq>Value</tsq>:
                                    </label>
                                    <div class="sqn-spinner">
                                        <input type="text" class="sqn-input" min="{{selectedParam.minValue}}" max="{{selectedParam.maxValue}}"
                                            step="{{::selectedParam.step}}" ng-model="selectedParam.fixedValue" onFocus="sqnSpinnerFocus(this)"
                                            onBlur="sqnSpinnerBlur(this)" />
                                        <div class="sqn-spinner-btns">
                                            <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                                            <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                                        </div>
                                    </div>
                                </div>
                                <div class="fixed-value" ng-if="selectedParam.isCombo || selectedParam.type == 'boolean'">
                                    <label class="sqn-label fixed-width">
                                        <tsq>Value</tsq>:
                                    </label>
                                    <div class="sqn-input sqn-select">
                                        <span>{{selectedParam.fixedValueDisplay}}</span>
                                        <select ng-model="selectedParam.fixedValue" ng-options="item.value as item.name for item in selectedParam.options"
                                            onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)" onChange="sqnSelectChange(this)"></select>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </fieldset>
                </form>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal" tsq>Close</a>
                <button id="buttonSave-21h" type="button" class="btn btn-primary" ng-click="onSaveParamConfig()" tsq>Save</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../app/directives/blockConfig/editParamSetPopup.html">
<!-- Modal window-->
<div class="modal centered editParamSetPopup" id="{{::editParamSetPopupId}}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog modal-medium" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button id="buttonTimes-22a" type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel" tsq>Edit parameter set</h4>
            </div>
            <div class="modal-body" style="height: auto;">
                <form name="editSetupForm" class="form-horizontal" role="form">
                    <label>
                        <tsq>Block:</tsq>
                        <span ng-bind-html="selectedBlock.name|html" />
                    </label>

                    <fieldset class="sq-fieldset">
                        <legend tsq>Parameter set options</legend>
                        <div class="row" style="margin-top: -10px;">
                            <div class="col-xs-5">
                                <label class="sqn-label">
                                    <tsq>Set name</tsq>
                                    <input type="text" class="sqn-input" ng-model="selectedParamSet.name" />
                                </label>
                            </div>
                            <div class="col-xs-2" ng-show="selectedParamSet.action == 'Edit'">
                                <button id="buttonDelete-22b" class="btn btn-default" style="margin-top: 23px; margin-left: -30px;" ng-click="removeParamSet()" tsq>Delete set</button>
                            </div>
                        </div>
                    </fieldset>

                    <fieldset class="sq-fieldset">
                        <legend tsq>Parameters configuration</legend>
                        <label style="font-weight: 400; font-size: 12px; color: #999;" tsq>Double click on a parameter row to edit it</label>

                        <div class="row" style="margin-top: 10px;">
                            <div class="col-xs-12">
                                <div id="{{::setParamsGridId}}" class="gridbox_compressed" style="height: 140px;" />
                            </div>
                        </div>
                    </fieldset>
                </form>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal" tsq>Close</a>
                <button id="buttonSave-22c" type="button" class="btn btn-primary" ng-click="onSaveParamSetConfig()" tsq>Save</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../app/directives/cardPanels/cardPanels.html">
<div ng-repeat="tab in instance.tabs | orderBy: '+position' track by $index" data-item="{{::tab.dataItem}}" ng-show="tab.active"
    ng-class="[{'active' : tab.active}, tab.dataItem]">
    <div ng-if="tab.templateUrl" ng-include="tab.templateUrl" ng-dynamic-controller="tab.controller" />
    <div ng-if="tab.template" ng-dynamic-controller="tab.controller" ng-bind="tab.template"></div>
</div>
</script>
<script type="text/ng-template" id="../app/directives/chartjs/chartjs.html">
<div style="width: {{width}}px;  height: {{::height}}px; position: relative;">
    <canvas id="{{::chartId}}"></canvas>
</div>
</script>
<script type="text/ng-template" id="../app/directives/columnSettings/columnSettings.html">
<div>
    <div class="paramsGroup" ng-if="onlyISOOS">
        <div class="toolbar clearfix">
            <label tsq>Sample type</label>
            <div class="btn-group pull-right">
                <button id="buttonInSample-25a" ng-click="onSampleTypeSelect(sampleTypes.in);$event.stopPropagation();" type="button"
                    class="btn btn-default" ng-class="{active: config.sampleType == sampleTypes.in}" tsq>In
                    sample</button>
                <button id="buttonOutOfSample-25b" ng-click="onSampleTypeSelect(sampleTypes.out);$event.stopPropagation();" type="button"
                    class="btn btn-default" ng-class="{active: config.sampleType == sampleTypes.out}" tsq>Out of
                    sample</button>
            </div>
        </div>
    </div>


    <div class="paramsGroup" ng-if="!onlyISOOS">
        <div class="toolbar clearfix" ng-hide="type=='wf-chart' || isFitness()">
            <label tsq>From backtest</label>
            <div class="sqn-input sqn-select from-backtest-column-setting pull-right">
                <span ng-bind="getResultTypeLabel()"></span>
                <select ng-model="config.resultType" ng-options="item.value as (item.name | tsq) for item in resultTypesList"
                    onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)" ng-change="onSettingsChange()">
                </select>
            </div>
        </div>

        <div class="toolbar clearfix"
            ng-show="(config.resultType=='MonteCarloManipulation' || config.resultType=='MonteCarloRetest') && !isFitness()">
            <label tsq>At confidence level</label>
            <div class="sqn-spinner pull-right">
                <input type="text" class="sqn-input" min="1" max="100" step="1" ng-model="config.confidenceLevel"
                    onFocus="sqnSpinnerFocus(this)" onBlur="sqnSpinnerBlur(this)" ng-change="onSettingsChange()" />
                <div class="sqn-spinner-btns">
                    <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                    <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                </div>
            </div>
        </div>

        <div class="toolbar clearfix" ng-show="config.resultType=='RetestOnAdditionalMarkets'">
            <label tsq>Market</label>
            <div class="sqn-input sqn-select pull-right">
                <span ng-bind="getMarketLabel()"></span>
                <select ng-model="config.market" ng-options="item.value as item.name for item in markets"
                    onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)" ng-change="onSettingsChange()">
                </select>
            </div>
        </div>

        <div class="clearfix wf-columns-settings" ng-show="(config.resultType=='WalkForwardMatrix' || config.resultType=='WalkForwardOptimization') && config.subresult != columnTypes.wfSpecial.value && !hideForWF();">
            <div class="sqn-label" tsq>WF result type:</div>

            <div class="radio">
                <label class="sq-wradio" ng-click="onWFResultTypeSelect(columnTypes.wf.value)">
                    <input type="radio" ng-value="columnTypes.wf.value" ng-model="config.subresult">
                    <span class="sq-mark"></span>
                    <tsq>Final WF result</tsq>
                </label>
            </div>

            <div class="radio">
                <label class="sq-wradio" ng-click="onWFResultTypeSelect(columnTypes.wfStability.value)">
                    <input type="radio" ng-value="columnTypes.wfStability.value" ng-model="config.subresult">
                    <span class="sq-mark"></span>
                    <tsq>WF Stability (%) - performance in run vs in optimization part</tsq>
                </label>
            </div>

            <div class="radio">
                <label class="sq-wradio" ng-click="onWFResultTypeSelect(columnTypes.wfScore.value)">
                    <input type="radio" ng-value="columnTypes.wfScore.value" ng-model="config.subresult">
                    <span class="sq-mark"></span>
                    <tsq>WF Score (%) - how much the optimization improved against original strategy</tsq>
                </label>
            </div>
        </div>        

        <div class="toolbar clearfix" ng-hide="isCrossCheck() && !displayWFValueOptions()">
            <sample-type selected="config.sampleType" on-change="onSampleTypeSelect" extended="extSampleType" every="conditionsEvery"></sample-type>
        </div>
        <div class="toolbar clearfix"
            ng-hide="(isCrossCheck() && !displayWFValueOptions()) || isFitness() || isMiniEquityChart()">
            <label tsq>Direction</label>
            <div class="btn-group pull-right">
                <button id="buttonBoth-25c" ng-click="onDirectionSelect(directions.both);$event.stopPropagation();" type="button"
                    class="btn btn-default" ng-class="{active: config.direction == directions.both}" tsq>Both</button>
                <button id="buttonLong-25d" ng-click="onDirectionSelect(directions.long);$event.stopPropagation();" type="button"
                    class="btn btn-default" ng-class="{active: config.direction == directions.long}" tsq>Long</button>
                <button id="buttonShort-25e" ng-click="onDirectionSelect(directions.short);$event.stopPropagation();" type="button"
                    class="btn btn-default" ng-class="{active: config.direction == directions.short}" tsq>Short</button>
            </div>
        </div>
        <div class="toolbar clearfix"
            ng-hide="(isCrossCheck() && !displayWFValueOptions()) || isFitness() || isMiniEquityChart()">
            <label tsq>Result in</label>
            <div class="btn-group pull-right">
                <button id="buttonMoney-25f" ng-click="onPlTypeSelect(plTypes.money);$event.stopPropagation();" type="button"
                    class="btn btn-default" ng-class="{active: config.plType == plTypes.money}" tsq>Money</button>
                <button id="buttonPercent-25g" ng-click="onPlTypeSelect(plTypes.percent);$event.stopPropagation();" type="button"
                    class="btn btn-default" ng-class="{active: config.plType == plTypes.percent}" tsq>Percent</button>
                <button id="buttonPips-25h" ng-click="onPlTypeSelect(plTypes.pips);$event.stopPropagation();" type="button"
                    class="btn btn-default" ng-class="{active: config.plType == plTypes.pips}" tsq>Pips</button>
            </div>
        </div>

        <div class="toolbar clearfix checkboxrow" ng-show="showCCMainResultOption() && type=='manage-views'">
            <label ng-click="config.showMainResult = !config.showMainResult; onSettingsChange()" tsq>Show
                main result if Cross check result doesn't exist</label>
            <div class="sq-checkbox pull-right">
                <input type="checkbox" ng-model="config.showMainResult" />
                <label ng-click="config.showMainResult = !config.showMainResult; onSettingsChange()"></label>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../app/directives/conditionsGrid/conditionsGrid.html">
<div style="text-align: center;">
    <div id="{{::gridId}}" class="conditions-grid gridbox_compressed" style="width: 100%; height: 300px;"></div>

    <button id="buttonAddConditions-26a" ng-click="conditionsChooser.clearSelection(); conditionsChooser.show();" class="btn btn-default" style="margin-left: 67px; margin-top: 10px;"
        tsq>Add conditions</button>

    <div class="pull-right conditions-btns">
        <button id="buttonLoad-26b" ng-click="loadConditions()" class="btn btn-default conditions-btn-load" tsq>Load</button>
        <button id="buttonSave-26c" ng-click="saveConditions()" class="btn btn-default conditions-btn-save" tsq>Save</button>
    </div>

    <items-chooser-modal instance="conditionsChooser" on-add="onAddConditions(selectedItems)" recent-items="true" title="{{'Add conditions' | tsq}}"
        placeholder="Select conditions" chooserLabel="{{'Choose conditions to add' | tsq}}" multi-select="true" after-init="afterItemsChooserModalInit"/>

    <div ng-include="'../app/directives/conditionsGrid/editConditionModal.html'" />
</div>
</script>
<script type="text/ng-template" id="../app/directives/conditionsGrid/editConditionModal.html">
<div class="modal editConditionModal" id="{{::editConditionsModal}}" tabindex="-1" role="dialog"
    aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document" style="width: 400px;">
        <div class="modal-content">
            <div class="modal-header">
                <button id="buttonTimes-27a" type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="{{::editConditionsModal}}Label">
                    <tsq>Edit condition</tsq> : {{editConditionLabel}}
                </h4>
            </div>
            <div class="modal-body" style="min-height: 330px;overflow: visible;">
                <form name="addSymbolForm" class="form-horizontal" role="form" style="text-align: left;">
                    <div class="row" style="margin-bottom: 10px;">
                        <div class="col-xs-12">
                            <items-chooser style="width: 100%" instance="editConditionChooser"
                                placeholder="{{'Search for condition' | tsq}}"
                                no-results-text="{{'No results matching' | tsq}}"></items-chooser>
                        </div>
                    </div>

                    <div class="condition-modal-line"></div>

                    <div style="min-height: 128px;">

                        <div ng-show="conditionDetails.valueType == valueTypes.numeric">
                            <div class="row row-smaller">
                                <div class="col-sm-8">
                                    <div class="sqn-label" tsq>Value</div>
                                </div>
                                <div class="col-sm-4" style="text-align: right;">
                                    <div class="sqn-spinner">
                                        <input type="text" class="sqn-input" step="{{conditionsValueStep}}"
                                            ng-model="conditionDetails.numericValue" onFocus="sqnSpinnerFocus(this)"
                                            onBlur="sqnSpinnerBlur(this)" />
                                        <div class="sqn-spinner-btns">
                                            <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                                            <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div ng-show="conditionDetails.valueType == valueTypes.column">
                            <column-settings on-change="onColumnSettingsChange" instance="columnSettings"
                                type="conditions">
                            </column-settings>
                        </div>
                    </div>

                    <div class="condition-modal-line"></div>

                    <div class="row" ng-show="conditionDetails.valueType != valueTypes.numeric">
                        <div class="col-sm-12">
                            <div class="pull-right">
                                <div class="sqn-label" tsq>Apply percentage ratio</div>
                                <div ng-show="conditionDetails.pctRatio" class="pct-ratio">
                                    <div class="sqn-spinner">
                                        <input type="text" class="sqn-input" min="1" max="1000" step="10"
                                            ng-model="conditionDetails.pctRatioValue" onFocus="sqnSpinnerFocus(this)"
                                            onBlur="sqnSpinnerBlur(this)" />
                                        <div class="sqn-spinner-btns">
                                            <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                                            <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                                        </div>
                                    </div> %
                                </div>

                                <div class="sq-checkbox">
                                    <input type="checkbox" ng-model="conditionDetails.pctRatio"
                                        id="edit-condition-pctRatio-{{editConditionsModal}}" />
                                    <label for="edit-condition-pctRatio-{{editConditionsModal}}">&nbsp;</label>
                                </div>
                            </div>
                        </div>

                        <div class="col-sm-12 text-right gen-help" ng-show="conditionDetails.pctRatio">
                            <tsq>Percentage ratio allows you to compare one value
                                <br>to a percentage of another, for example make
                                <br>a comparision like:
                                <br>Net Profit (OOS) >= 60% of Net Profit (IS)</tsq>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal" tsq>Close</a>
                <button id="buttonSave-27b" type="button" class="btn btn-primary" ng-click="onSaveCondition()" tsq>Save</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../app/directives/dashboardHeader/dashboardHeader.html">
<div class="sqn-dashboard-header">

    <div ng-if="!taskmanager || taskmanager === 'false'" class="sqn-project-name sqn-project-name-clickable"
        ng-class="{ 'sqn-project-name-running' : (activePanel != 'dashboard' && $root.project.state == projectStates.running) }"
        ng-bind="::engineTitle" ng-click="switchToPanel('dashboard')"
        ng-attr-title="{{activePanel != 'dashboard' && $root.project.state == projectStates.running ? projectInProgressTitle: ''}}">
    </div>
    <div ng-if="taskmanager === 'true'" class="sqn-project-name">
        <a ng-href="" ng-click="switchToPanel('tmprojects', true)" tsq>Custom projects</a> / <span ng-bind="engineTitle"
            ng-class="{ 'sqn-project-name-running' : (activePanel != 'dashboard' && $root.project.state == projectStates.running) }"
            ng-attr-title="{{activePanel != 'dashboard' && $root.project.state == projectStates.running ? projectInProgressTitle: ''}}"></span>
    </div>

    <div class="sqn-tabs-large">
        <div ng-class="{'active' : activePanel=='dashboard'}" ng-click="switchToPanel('dashboard')" tsq>Progress</div>
        <div ng-class="{'active' : activePanel=='settings'}" ng-click="switchToPanel('settings');" ng-show="showSettingsTab()" tsq>Full settings</div>
        <div ng-class="{'active' : activePanel=='results'}" ng-click="switchToPanel('results')" tsq>Results</div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../app/directives/datePicker/datePicker.html">
<div style="display: inline;">
    <label class="sqn-label" ng-bind="label | tsq"></label>
    <div class="input-group date sqn-input">
        <input id="{{::datePickerId}}" class="{{::sqclass}}" ng-model="picker.date" ng-blur="onDateChanged(picker.date)"
            ng-disabled="ngDisabled">
        <span class="input-group-addon" ng-show="!ngDisabled" ng-click="clickInput()">
            <span class="glyphicon glyphicon-calendar"></span>
        </span>
    </div>
</div>
</script>
<script type="text/ng-template" id="../app/directives/dateRange/dateRange.html">
<div>
    <div class="date-range-time-line">
        <date-picker label="From" date="config.dateFrom" min-date="config.dateMin" max-date="config.dateMax" format="yyyy.mm.dd"
            on-date-change="onDateFromChange(date)" sqclass="{{::sqclass}}-from" force-date-change="forceDateChange" />
        <button ng-show="sinceLastDateEnabled" id="btnLastDate" class="btn btn-dukasRange" ng-click="onSinceLastDate()" ng-class="config.lastSelection=='LastDate'?'btn-primary':'btn-default'"
            tsq>Since last date</button>
        <button id="btnLast6Months" class="btn btn-default btn-dukasRange" ng-click="onLast6Months()" ng-class="config.lastSelection=='Last6Months'?'btn-primary':'btn-default'"
            tsq>Last 6 months</button>
        <button id="btnLastYear" class="btn btn-default btn-dukasRange" ng-click="onLastYear()" ng-class="config.lastSelection=='LastYear'?'btn-primary':'btn-default'"
            tsq>Last year</button>
    </div>

    <div class="date-range-time-line">
        <date-picker label="To" date="config.dateTo" min-date="config.dateMin" max-date="config.dateMax" format="yyyy.mm.dd"
            on-date-change="onDateToChange(date)" sqclass="{{::sqclass}}-to" force-date-change="forceDateChange" />
        <button id="btnLast5Years" class="btn btn-default btn-dukasRange" ng-click="onLast5Years()" ng-class="config.lastSelection=='Last5Years'?'btn-primary':'btn-default'"
            tsq>Last 5 years</button>
        <button id="btnLast10Years" class="btn btn-default btn-dukasRange" ng-click="onLast10Years()" ng-class="config.lastSelection=='Last10Years'?'btn-primary':'btn-default'"
            tsq>Last 10 years</button>
        <button id="btnAllTime" class="btn btn-default btn-dukasRange" ng-click="onAllTime()" ng-class="config.lastSelection=='AllTime'?'btn-primary':'btn-default'"
            tsq>All time</button>
    </div>
</div>
</script>
<script type="text/ng-template" id="../app/directives/directoryPicker/directoryPicker.html">
<div id="{{::dirPickerId}}"></div>
</script>
<script type="text/ng-template" id="../app/directives/directoryPickerModal/dirPickerModal.html">
<div class="modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button id="buttonTimes-29a" type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel" ng-bind="title"></h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" role="form">
                    <div class="form-group">
                        <div class="col-sm-12">
                            <directory-picker dir-picker-id="{{::dirPickerId}}" instance='directoryTree' multiselection="{{multiselection}}" style="width:100%; height:600px; border:1px solid Silver; overflow:auto;"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-12">
                            <label style="max-width: 700px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"><tsq>Path:</tsq> {{directoryTree.selectedPath}}</label>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal" tsq>Close</a>
                <button id="buttonSelect-29b" type="button" class="btn btn-primary" data-dismiss="modal" ng-if="onSelect" ng-click="onSelectFolder()" tsq>Select</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../app/directives/freeDataDisclaimer/freeDataDisclaimer.html">
<div class="sq-checkbox">
    <input type="checkbox" ng-model="confirmed" id="free-data-disclaimer-{{datasource}}"/>
    <label for="free-data-disclaimer-{{datasource}}" style="text-align: left; margin: 1rem;">
        <tsq>I confirm that I understand the following: Data are provided for free by</tsq> {{datasource}}. 
        <tsq>SQ DataManager is only a tool to download the data directly to the program.</tsq> 
        <tsq>StrategyQuant is not responsible for quality or availability of the data.</tsq>
    </label>
</div>
</script>
<script type="text/ng-template" id="../app/directives/indicatorsCalibrationButton/indicatorsCalibrationButton.html">
<button id="buttonCalibrateIndicators-30a" class="btn btn-primary" ng-click="showCalibrationPopup()" tsq>Calibrate indicators</button>
</script>
<script type="text/ng-template" id="../app/directives/instrumentChooser/addInstrumentPopup.html">
<!-- Modal Add instrument window-->
<div class="modal" id="{{::popupId}}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document" style="width:700px; height:auto;">
        <div class="modal-content" style="width:100%; height:100%;">
            <div class="modal-header">
                <button id="buttonTimes-31a" type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel"><span ng-bind="currentAction"></span> <tsq>instrument</tsq></h4>
            </div>
            <div class="modal-body">
                <form name="addInstrumentForm" class="form-horizontal" role="form" ng-class="{'submitted': errors}" style="text-align: left;">
                    
                    <form-errors errors="errors"></form-errors> 

					<instrument-details instrument="newInstrument" instance="newDetails" current-action="currentAction" class="instrument-details-instrument" commission-settings="true" />

                </form>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal" tsq>Close</a>
                <button id="buttonSave-31b" type="button" class="btn btn-primary" ng-click="onSaveInstrument(addInstrumentForm)" tsq>Save</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../app/directives/instrumentChooser/instrumentChooser.html">
<span class="instrument-chooser">
    <fieldset class="sq-fieldset" ng-show="!infoOnly">
        <legend ng-if="!infoOnly" tsq>Choose instrument</legend>
        <div class="sq-legend-help" ng-if="helpText && !infoOnly">
            <tsq>Instrument is a specification of this symbol - it contains tick size, point value etc.</tsq>
            <br> <tsq>You can have mutiple data imported - for example EURUSD_1, EURUSD_2, EURUSD_3, but they share the same instrument
            specification for EURUSD.</tsq>
        </div>
        <div class="row instrument-select">
            <div class="col-xs-12">
                <label class="sqn-label" tsq>Instrument *</label>
                <div class="sqn-input sqn-select smallSelect" ng-class="{'disabled':ngDisabled}">
                    <span ng-bind="getBrokerProfileLabel()"></span>
                    <select ng-model="broker" ng-options="item.id as (item.name | tsq) for item in brokers" onFocus="sqnSelectFocus(this)"
                        onBlur="sqnSelectBlur(this)" ng-change="onBrokerChange(item)" ng-disabled="ngDisabled">
                        <option value="" tsq>All broker profiles</option>
                    </select>
                </div>
                <div class="sqn-input sqn-select" ng-class="{'disabled':ngDisabled}">
                    <span ng-bind="selected.instrument"></span>
                    <select ng-model="selected.instrument" ng-options="item.instrument as item.instrument for item in instruments" onFocus="sqnSelectFocus(this)"
                        onBlur="sqnSelectBlur(this)" ng-change="onInstrumentChange(item)" ng-disabled="ngDisabled">
                    </select>
                </div>
                <a ng-hide="ngDisabled" ng-click="onAddInstrument()">
                    <i class="fa fa-plus-circle data-plus-icon"></i><tsq>Add new instrument</tsq></a>
            </div>
        </div>
    </fieldset>
    <div class="row">
        <div class="col-xs-12">
            <instrument-details instrument="selectedInstrument" current-action="selectedInstrument.currentAction" disabled="true" class="instrument-details-symbol" commission-settings="commissionSettings"/>
        </div>
    </div>

    <div ng-include="'../app/directives/instrumentChooser/addInstrumentPopup.html'" />
</span>
</script>
<script type="text/ng-template" id="../app/directives/instrumentDetails/instrumentDetails.html">
<span class="instrument-details" ng-class="{'massedit': massEdit}">

    <p class="instrument-info" ng-if="!disabled" ng-bind-html="infoText"></p>

    <fieldset class="sq-fieldset">
        <div ng-if="legend" class="sq-legend-help" ng-bind="legend"></div>

        <div class="row smaller">
            <div class="col-xs-4" style="display: grid;">
                <div ng-show="!massEdit"> 
                    <label class="sqn-label" tsq>Broker profile *</label>{{massEdit}}
                    <div class="sqn-input sqn-select" ng-class="{'disabled': currentAction == 'Edit' || disabled}">
                        <span ng-bind="getBrokerProfileLabel()"></span>
                        <select ng-model="instrument.broker" ng-options="item.id as item.name for item in brokerProfiles" onFocus="sqnSelectFocus(this)"
                            onBlur="sqnSelectBlur(this)" ng-disabled="currentAction == 'Edit' || disabled"
                            ng-change="onBrokerChange()"
                            ></select>
                    </div>
                </div>               

                <div> 
                    <label class="sqn-label" tsq>Data type *</label>
                    <div class="wrapper">
                        <div style="display: inline" ng-show="massEdit">
                            <div class="sq-checkbox" ng-click="instrument.changeDataType = !instrument.changeDataType">
                                <input type="checkbox" ng-model="instrument.changeDataType">
                                <label tsq> </label>
                            </div>
                        </div>
                        <div class="sqn-input sqn-select" ng-class="{'disabled': disabled}">
                            <span ng-bind="getDataTypeLabel()"></span>
                            <select ng-model="instrument.dataType" ng-options="item.value as item.name for item in dataTypes" onFocus="sqnSelectFocus(this)"
                                onBlur="sqnSelectBlur(this)" ng-disabled="disabled"></select>
                        </div>
                    </div>
                </div>

                <div>
                    <label class="sqn-label" tsq>Pip/Tick size *</label>
                    <div class="wrapper">
                        <div style="display: inline" ng-show="massEdit">
                            <div class="sq-checkbox" ng-click="instrument.changeTickSize = !instrument.changeTickSize">
                                <input type="checkbox" ng-model="instrument.changeTickSize">
                                <label tsq> </label>
                            </div>
                        </div>
                        <div class="sqn-spinner">
                            <input type="text" class="sqn-input" min="0" step="{{getTickSizeStep()}}" ng-model="instrument.tickSize" onFocus="sqnSpinnerFocus(this)"
                                onBlur="sqnSpinnerBlur(this)" ng-disabled="disabled" />
                            <div class="sqn-spinner-btns">
                                <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                                <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                            </div>
                        </div>
                    </div>
                </div>

                <div>
                    <label class="sqn-label" tsq>Default spread * pips</label>
                    <div class="wrapper">
                        <div style="display: inline" ng-show="massEdit">
                            <div class="sq-checkbox" ng-click="instrument.changeDefaultSpread = !instrument.changeDefaultSpread">
                                <input type="checkbox" ng-model="instrument.changeDefaultSpread">
                                <label tsq> </label>
                            </div>
                        </div>
                        <div class="sqn-spinner">
                            <input type="text" class="sqn-input" min="0" step="1" ng-model="instrument.defaultSpread" onFocus="sqnSpinnerFocus(this)"
                                onBlur="sqnSpinnerBlur(this)" ng-disabled="disabled" />
                            <div class="sqn-spinner-btns">
                                <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                                <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                            </div>
                        </div>
                    </div>
                </div>

                <div>
                    <label class="sqn-label" tsq>Order size multiplier</label>
                    <div class="wrapper">
                        <div style="display: inline" ng-show="massEdit">
                            <div class="sq-checkbox" ng-click="instrument.changeSizeMultiplier = !instrument.changeSizeMultiplier">
                                <input type="checkbox" ng-model="instrument.changeSizeMultiplier">
                                <label tsq> </label>
                            </div>
                        </div>
                        <div class="sqn-spinner">
                            <input type="text" class="sqn-input" min="1" step="1" ng-model="instrument.orderSizeMultiplier" onFocus="sqnSpinnerFocus(this)"
                                onBlur="sqnSpinnerBlur(this)" ng-disabled="disabled" />
                            <div class="sqn-spinner-btns">
                                <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                                <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                            </div>
                        </div>
                    </div>
                </div>              
            </div>
            <div class="col-xs-8" style="display:grid">
                <div ng-show="!massEdit">
                    <label class="sqn-label" tsq>Instrument *</label>
                    <input type="text" class="sqn-input" ng-model="instrument.instrument" ng-disabled="currentAction == 'Edit' || disabled" /> {{brokerProfile.postfix}}
                </div>

                <div  ng-show="!massEdit" class="instrument-description">
                    <label class="sqn-label" tsq>Description</label>
                    <input type="text" class="sqn-input" ng-model="instrument.description" ng-disabled="disabled" />
                </div>

                <!-- Jine zobrazeni pro NE - mass edit mod-->
                <div class="pipWrapper"  ng-show="!massEdit">
                    <div>
                        <label class="sqn-label" tsq>Point value in $ *</label>
                        <div class="sqn-spinner">
                            <input type="text" class="sqn-input" min="0" step="1" ng-model="instrument.pointValue" onFocus="sqnSpinnerFocus(this)" onBlur="sqnSpinnerBlur(this)"
                                ng-disabled="disabled" />
                            <div class="sqn-spinner-btns">
                                <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                                <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                            </div>
                        </div>
                    </div>
                    <div style="margin-left:48px">
                        <label class="sqn-label" tsq>Pip/Tick step *</label>
                        <div class="sqn-spinner">
                            <input type="text" class="sqn-input" min="0" step="{{getTickStepStep()}}" ng-model="instrument.tickStep" onFocus="sqnSpinnerFocus(this)"
                                onBlur="sqnSpinnerBlur(this)" ng-disabled="disabled" />
                            <div class="sqn-spinner-btns">
                                <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                                <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- Jine zobrazeni pro mass edit mod-->
                <div ng-show="massEdit">
                    <label class="sqn-label" tsq>Point value in $ *</label>
                    <div class="wrapper">
                        <div style="display: inline" ng-show="massEdit">
                            <div class="sq-checkbox" ng-click="instrument.changePointValue = !instrument.changePointValue">
                                <input type="checkbox" ng-model="instrument.changePointValue">
                                <label tsq> </label>
                            </div>
                        </div>                    
                        <div class="sqn-spinner">
                            <input type="text" class="sqn-input" min="0" step="1" ng-model="instrument.pointValue" onFocus="sqnSpinnerFocus(this)" onBlur="sqnSpinnerBlur(this)"
                                ng-disabled="disabled" />
                            <div class="sqn-spinner-btns">
                                <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                                <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                            </div>
                        </div>
                    </div>
                </div>
                <div ng-show="massEdit">
                    <label class="sqn-label" tsq>Pip/Tick step *</label>
                    <div class="wrapper">
                        <div style="display: inline" ng-show="massEdit">
                            <div class="sq-checkbox" ng-click="instrument.changeTickStep = !instrument.changeTickStep">
                                <input type="checkbox" ng-model="instrument.changeTickStep">
                                <label tsq> </label>
                            </div>
                        </div>
                        <div class="sqn-spinner">
                            <input type="text" class="sqn-input" min="0" step="{{getTickStepStep()}}" ng-model="instrument.tickStep" onFocus="sqnSpinnerFocus(this)"
                                onBlur="sqnSpinnerBlur(this)" ng-disabled="disabled" />
                            <div class="sqn-spinner-btns">
                                <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                                <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="pipWrapper">
                    <div>
                        <label class="sqn-label" tsq>Default slippage * pips</label>
                        <div class="wrapper">
                            <div style="display: inline" ng-show="massEdit">
                                <div class="sq-checkbox" ng-click="instrument.changeDefaultSlippage = !instrument.changeDefaultSlippage">
                                    <input type="checkbox" ng-model="instrument.changeDefaultSlippage">
                                    <label tsq> </label>
                                </div>
                            </div>
                            <div class="sqn-spinner">
                                <input type="text" class="sqn-input" min="0" step="1" ng-model="instrument.defaultSlippage" onFocus="sqnSpinnerFocus(this)"
                                    onBlur="sqnSpinnerBlur(this)" ng-disabled="disabled" />
                                <div class="sqn-spinner-btns">
                                    <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                                    <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div ng-style="{'margin-left': !massEdit ? '48px' : null }">
                        <label class="sqn-label" tsq>Min distance</label>
                        <div class="wrapper">
                            <div style="display: inline" ng-show="massEdit">
                                <div class="sq-checkbox" ng-click="instrument.changeMinDistance = !instrument.changeMinDistance">
                                    <input type="checkbox" ng-model="instrument.changeMinDistance">
                                    <label tsq> </label>
                                </div>
                            </div>
                            <div class="sqn-spinner">
                                <input type="text" class="sqn-input" min="0" step="1" ng-model="instrument.minDistance" onFocus="sqnSpinnerFocus(this)"
                                    onBlur="sqnSpinnerBlur(this)" ng-disabled="disabled" />
                                <div class="sqn-spinner-btns">
                                    <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                                    <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                                </div>
                            </div>
                        </div>
                    </div>  
                </div>

                <div>
                    <label class="sqn-label" tsq>Order size step</label>
                    <div class="wrapper">
                        <div style="display: inline" ng-show="massEdit">
                            <div class="sq-checkbox" ng-click="instrument.changeOrderSizeStep = !instrument.changeOrderSizeStep">
                                <input type="checkbox" ng-model="instrument.changeOrderSizeStep">
                                <label tsq> </label>
                            </div>
                        </div>
                        <div class="sqn-spinner">
                            <input type="text" class="sqn-input" min="0" step="1" ng-model="instrument.orderSizeStep" onFocus="sqnSpinnerFocus(this)"
                                onBlur="sqnSpinnerBlur(this)" ng-disabled="disabled" />
                            <div class="sqn-spinner-btns">
                                <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                                <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </fieldset>

    <div style="display: inline" ng-show="massEdit">
        <div class="sq-checkbox" ng-click="instrument.changeCommisionModel = !instrument.changeCommisionModel">
            <input type="checkbox" ng-model="instrument.changeCommisionModel">
            <label tsq>Edit default commision model</label>
        </div>
    </div>
    <fieldset class="sq-fieldset" ng-show="commissionSettings">
        <multi-property-grid instance="commPGInstance" on-change="onCommPGChange" options="commissionMethods" title="Default commissions model"  ng-disabled="disabled"/>
    </fieldset>

    <div style="display: inline" ng-show="massEdit">
        <div class="sq-checkbox" ng-click="instrument.changeSwap = !instrument.changeSwap">
            <input type="checkbox" ng-model="instrument.changeSwap">
            <label tsq>Edit swap</label>
        </div>
    </div>
    <swap-settings sq-model="instrument.swap" />    

    <fieldset class="sq-fieldset" ng-show="false">
        <legend tsq>Optional fields</legend>

        <div class="row smaller" style="margin-top: -15px;">
            <div class="col-xs-6">
                <sq-combo-input sq-model="instrument.exchange" label="Exchange" options="exchanges" ng-disabled="disabled" single="true" />
            </div>
            <div class="col-xs-6">
                <sq-combo-input sq-model="instrument.country" label="Country" options="countries" ng-disabled="disabled" single="true" />
            </div>
        </div>
        <div class="row smaller" ng-show="instrument.dataType == 1" style="margin-top: -15px;">
            <div class="col-xs-6">
                <sq-combo-input sq-model="instrument.sector" label="Sector" options="sectors" ng-disabled="disabled" single="true" />
            </div>
        </div>
    </fieldset>
</span>
</script>
<script type="text/ng-template" id="../app/directives/itemsChooser/itemsChooser.html">
<div id="{{::chooserId}}">
    <select id="{{::chooserId}}-chosen-select" data-placeholder="{{::placeholder}}" style="width: 100%; display: none;" multiple="" class="chosen-select" tabindex="-1">
        <option value=""></option>
        <option value="{{::option.value}}" ng-repeat="option in categories[0].options" ng-if="categories.length==1">{{::(option.name | tsq)}}</option>
                
        <optgroup label="{{::category.name}}" ng-repeat="category in categories" ng-if="categories.length>1">
            <option value="{{::option.value}}" ng-repeat="option in category.options">{{::(option.name | tsq)}}</option>
        </optgroup>
    </select>
</div>
</script>
<script type="text/ng-template" id="../app/directives/itemsChooserModal/itemsChooserModal.html">
<div class="modal item-chooser-modal" id="{{::popupId}}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document" style="width: 426px;">
        <div class="modal-content">
            <div class="modal-header">
                <button id="buttonTimes-32a" type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="{{::popupId}}Label" ng-bind="::title"></h4>
            </div>
            <div class="modal-body" style="height: auto; min-height: 303px">
                <form name="addItemsForm" class="form-horizontal" role="form" style="text-align: left;">
                    <div class="sqn-label" style="margin-left: 0; margin-bottom: 6px;" ng-bind="::chooserLabel"></div>
                    <items-chooser ng-if="itemsChooser" style="width: 100%" instance="itemsChooser" placeholder="{{::placeholder}}"
                        multi-select="{{::multiSelect}}" no-results-text="{{::noResultsText}}"
                        after-init="onItemsChooserInit" class="item-chooser-minheight"></items-chooser>
                    <br />
                    <div class="recent-cloud-title" tsq><label>Frequently used</label></div>
                    <div class="recent-cloud" ng-click="cloudWordsClicked($event)"></div>
                    <!-- <fieldset class="sq-fieldset recent-items" ng-if="recentItems">
                        <label style="margin: 4px 0px 10px 4px; width: 100%;" class="sqn-label" tsq>Or choose from
                            frequently used</label>
                        <div class=""></div>
                        <div ng-repeat="item in recentItemsList" class="col-sm-6" style="padding: 4px;">
                            <button ng-click="onAddRecentItem(item.class)" style="width: 100%;"
                                ng-bind="::(item.name | tsq)" class="btn btn-default"></button>
                        </div>
                    </fieldset> -->
                </form>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal" tsq>Close</a>
                <button id="buttonAdd-32b" type="button" class="btn btn-primary" ng-click="onAddItems()" tsq>Add</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../app/directives/languageMenu/languageMenu.html">
<ul class="dropdown-menu lang-menu">
    <li ng-repeat="language in languages" ng-click="downloadLanguage(language);">
        <a ng-class="{ 'dropdown-item-checked': language.title == $root.selectedLanguage.title }">
            {{::language.title}}
            <i class="fa fa-check" aria-hidden="true"></i>
        </a>
    </li>
</ul>
</script>
<script type="text/ng-template" id="../app/directives/manageViewsDialog/manageViews.html">
<!-- Modal manage views window-->
<div class="modal manageViewsDialog" id="{{popupId}}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button id="buttonTimes-33a" type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel" tsq>Manage views</h4>
            </div>
            <div class="modal-body" style="height: auto;">
                <form class="form-horizontal dbViewsForm" role="form">
                    <fieldset class="sq-fieldset">

                        <div class="row">
                            <div class="col-sm-12">
                                <label class="sqn-label" tsq>Select view to edit</label>
                                <div class="sqn-input sqn-select">
                                    <span>{{selectedView.originalName}}</span>
                                    <select ng-model="selectedView.originalName"
                                        ng-options="item.name as item.name for item in views"
                                        onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)"
                                        ng-change="onViewSelect()"></select>
                                </div>

                                <label class="sqn-label" tsq>or</label>
                                <button id="buttonCreateNewView-33b" class="btn btn-default btn-create-new-view" ng-click="onAdd()" tsq>Create new view</button>
                            </div>
                        </div>
                    </fieldset>
                </form>

                <form class="form-horizontal dbViewDetailsForm" role="form">
                    <fieldset class="sq-fieldset">
                        <div class="row">
                            <div class="col-sm-12">
                                <label class="sqn-label">
                                    <tsq>View name</tsq>
                                </label>
                                <input type="text" class="sqn-input view-name-input" ng-model="selectedView.name"
                                    ng-disabled="isDefaultViewSelected()" ng-change="onViewNameChange()" />
                            </div>
                        </div>
                        <div class="columnsGroup">
                            <div class="sqn-label" tsq>Columns in view</div>
                            <label class="help-text" tsq>Use drag and drop to change columns order</label>

                            <div class="view-columns-selector-wrapper">
                                <div class="view-columns-selector">
                                    <div dnd-list="selectedView.columns">
                                        <div class="overlay" ng-if="isDefaultViewSelected()" />
                                        <div ng-repeat="column in selectedView.columns" dnd-draggable="column"
                                            dnd-effect-allowed="move" dnd-selected=""
                                            ng-dblclick="onSelectColumn(column)"
                                            ng-class="{'active': selectedView.selectedColumn == column}"
                                            dnd-moved="onColumnMoved($index)"
                                            ng-if="column.entryName != 'Confidence level'">
                                            <div>{{column.entryName}}</div>
                                            <div dnd-nodrag class="arrow-move" ng-click="onMoveColumnBy($index, -1)">
                                                <i class="fa fa-arrow-up" title="Move up" aria-hidden="true"></i>
                                            </div>
                                            <div dnd-nodrag class="arrow-move" ng-click="onMoveColumnBy($index, 1)">
                                                <i class="fa fa-arrow-down" title="Move down" aria-hidden="true"></i>
                                            </div>
                                            <div dnd-nodrag class="remove" ng-click="onRemoveColumn($index)">
                                                <i class="fa fa-times" aria-hidden="true"></i>
                                            </div>
                                        </div>

                                    </div>
                                </div>

                                <button id="buttonAddColumns-33c" class="btn btn-default" ng-click="openColumnsChooser()"
                                    ng-disabled="isDefaultViewSelected()" tsq>Add columns</button>
                            </div>

                            <div class="views-manage-buttons">
                                <button id="buttonCloneThisView-33d" class="btn btn-default" ng-click="onClone()" tsq>Clone this view</button>
                                <button id="buttonDeleteThisView-33e" class="btn btn-default" ng-click="onDelete()"
                                    ng-disabled="isDefaultViewSelected()" tsq>Delete this view</button>
                                <button id="buttonSaveChanges-33f" type="button" class="btn btn-primary" ng-click="onSave()"
                                    ng-disabled="isDefaultViewSelected() || changesSaved" tsq>Save changes</button>
                            </div>

                        </div>
                    </fieldset>
                </form>
            </div>
            <div class="modal-footer">
                <a ng-click="onClose()" tsq>Close</a>
            </div>
        </div>
    </div>

</div>

<items-chooser-modal instance="columnsChooser" on-add="onAddColumns(selectedItems)" title="Add columns"
    placeholder="Select columns" chooserLabel="Choose columns to add" multi-select="true" recent-items="true" />

<div class="modal column-settings-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
    id="{{::columnSettingsModalId}}">
    <div class="modal-dialog modal-lg" role="document" style="width: 432px;">
        <div class="modal-content">
            <div class="modal-header">
                <button id="buttonTimes-33g" type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel">
                    <tsq>Column properties</tsq>
                </h4>
            </div>
            <div class="modal-body" style="height: auto;">
                <fieldset class="sq-fieldset">
                    <div class="paramsGroup">
                        <div class="toolbar clearfix">
                            <label tsq>
                                <tsq>Column</tsq>
                            </label>
                            <span>
                                {{selectedView.selectedColumn.entryName}}
                            </span>
                        </div>
                    </div>
                    <column-settings instance="columnSettings" on-change="onColumnSettingsChange" type="manage-views"
                        ng-show="displayColumnSettings();"></column-settings>
                </fieldset>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal" tsq>Close</a>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../app/directives/multiPropertyGrid/multiPropertyGrid.html">
<fieldset class="sq-fieldset sq-fieldset-select-property" id="multi-property-grid-{{::id}}">
    <legend ng-bind="title"></legend>

    <div class="clearfix"></div>

    <div class="row row-smaller">
        <div class="col-lg-4 col-md-3">
            <div class="sq-input-fixed-size-container">
                <div ng-repeat="option in options" class="radio"><label class="sq-wradio"><input type="radio" name="type-{{::id}}"
                            value="{{::option.class}}" ng-model="type" ng-click="onTypeChange(option.class)"><span
                            class="sq-mark"></span>{{(option.name
                        | tsq)}}</label></div>
            </div>
        </div>
        <div class="col-lg-8 col-md-9">
            <property-grid id="property-grid-{{::id}}" ng-if="propGridInstance" instance="propGridInstance" after-init="afterPGInit"
                on-change="onPGChange" note-on-side="true" />
        </div>
    </div>
</fieldset>
</script>
<script type="text/ng-template" id="../app/directives/oosRange/oosRange.html">
<div class="oos-range-single">
    <label class="sqn-label oos-range-label" ng-bind="getPartLabel()"></label>

    <div class="sqn-input sqn-select" ng-class="[type]">
        <span ng-bind="getTypeLabel()"></span>
        <select ng-model="type" ng-options="item.value as (item.name | tsq) for item in types"
            ng-change="onTypeChange(item.value)" onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)"></select>
    </div>

    <date-picker label="{{'Start' | tsq}}" date="dates.dateFrom" format="yyyy.mm.dd" min-date="bounds.dateFrom"
        max-date="bounds.dateTo" on-date-change="onDateFromChange(date)" force-date-change="reloading" />
    <date-picker label="{{'End' | tsq}}" date="dates.dateTo" format="yyyy.mm.dd" min-date="bounds.dateFrom"
        max-date="bounds.dateTo" on-date-change="onDateToChange(date)" force-date-change="reloading" />
    <button id="buttonClose-34a" class="sq-oos-btn-close"
        ng-click="onRemove({index: index}); $event.stopPropagation(); $event.preventDefault();"></button>
</div>
</script>
<script type="text/ng-template" id="../app/directives/parametersGrid/parametersGrid.html">
<div class="parameters-grid">
    <div id="{{::gridId}}" class="sq-grid-nonselect" />
</div>
</script>
<script type="text/ng-template" id="../app/directives/projectConditions/addConditionModal.html">
<!-- Modal window-->
<div class="modal centered" id="{{id}}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content add-project-condition">
            <div class="modal-header">
                <button id="buttonTimes-35a" type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel" tsq>Add new condition</h4>
            </div>
            <div class="modal-body" style="height: auto;">
                <fieldset class="sq-fieldset sq-fieldset-select-property">
                    <legend tsq>Choose condition</legend>
                    <div class="row">
                        <div class="col-sm-6">
                            <div class="sqn-input sqn-select condition-choose">
                                <span ng-bind="getConditionTitle()"></span>
                                <select ng-model="curCondition.type" ng-options="item.type as item.title for item in conditionTypes"
                                    onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)" ng-change="onSelectConditionType()"></select>
                            </div>
                        </div>
                    </div>

                </fieldset>
                <fieldset class="sq-fieldset sq-fieldset-select-property">
                    <legend tsq>Condition parameters</legend>

                    <div class="condition-param" ng-repeat="field in curCondition.fields">
                        <div class="row row-smaller" ng-if="field.type == projectConditionFields.databank">
                            <div class="col-sm-3">
                                <label class="sqn-label"><span ng-bind="field.name"></span>:</label>
                            </div>
                            <div class="col-sm-9">
                                <div class="sqn-input sqn-select">
                                    <span>{{field.value}}</span>
                                    <select ng-model="field.value" ng-options="item.name as item.name for item in databanks"
                                        onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)"></select>
                                </div>
                            </div>
                        </div>
                        <div class="row row-smaller" ng-if="field.type == projectConditionFields.comparator">
                            <div class="col-sm-3">
                                <label class="sqn-label"><span ng-bind="field.name"></span>:</label>
                            </div>
                            <div class="col-sm-9">
                                <div class="sqn-input sqn-select">
                                    <span ng-bind="getComparatorLabel(field.value)"></span>
                                    <select ng-model="field.value" ng-options="item.value as item.name for item in comparators"
                                        onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)"></select>
                                </div>
                            </div>
                        </div>
                        <div class="row row-smaller" ng-if="field.type == projectConditionFields.duration" class="duration">
                            <div class="col-sm-3">
                                <label class="sqn-label"><span ng-bind="field.name"></span>:</label>
                            </div>
                            <div class="col-sm-9">
                                <div>
                                    <div class="sqn-spinner run-time">
                                        <input type="text" class="sqn-input" min="0" step="1" ng-model="field.days"
                                            onFocus="sqnSpinnerFocus(this)" onBlur="sqnSpinnerBlur(this)" />
                                        <div class="sqn-spinner-btns">
                                            <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                                            <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                                        </div>
                                    </div>
                                    <tsq>days</tsq>
                                    <div class="sqn-spinner run-time">
                                        <input type="text" class="sqn-input" min="0" step="1" max="23" ng-model="field.hours"
                                            onFocus="sqnSpinnerFocus(this)" onBlur="sqnSpinnerBlur(this)" />
                                        <div class="sqn-spinner-btns">
                                            <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                                            <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                                        </div>
                                    </div>
                                    <tsq>hours</tsq>
                                    <div class="sqn-spinner run-time">
                                        <input type="text" class="sqn-input" min="0" step="1" max="59" ng-model="field.minutes"
                                            onFocus="sqnSpinnerFocus(this)" onBlur="sqnSpinnerBlur(this)" />
                                        <div class="sqn-spinner-btns">
                                            <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                                            <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                                        </div>
                                    </div>
                                    <tsq>minutes</tsq>
                                </div>
                            </div>
                        </div>
                        <div class="row row-smaller" ng-if="field.type == projectConditionFields.number">
                            <div class="col-sm-3">
                                <label class="sqn-label"><span ng-bind="field.name"></span>:</label>
                            </div>
                            <div class="col-sm-9">
                                <div class="sqn-spinner">
                                    <input type="text" class="sqn-input" min="0" step="1" ng-model="field.value"
                                        onFocus="sqnSpinnerFocus(this)" onBlur="sqnSpinnerBlur(this)" />
                                    <div class="sqn-spinner-btns">
                                        <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                                        <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </fieldset>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal" tsq>Close</a>
                <button id="buttonSave-35b" type="button" class="btn btn-primary" ng-click="onSaveCondition()" tsq>Save</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../app/directives/projectConditions/projectConditions.html">
<span>
    <div class="goto-conditions-wrapper">
        <div ng-repeat="condition in conditions">
            <div class="goto-condition" ng-click="onConditionClick(condition, $index)">
                <label class="left-side" ng-bind="getConditionDescription(condition)"></label>
                <span class="delete-btn" ng-click="onRemoveCondition($index);$event.stopPropagation()">&times;</span>
            </div>
        </div>
    </div>
    <button id="buttonAddNewCondition-36a" class="btn btn-primary goto-conditions-button" ng-click="onAddCondition()">Add new condition</button>
    <span class="goto-conditions-info" tsq>If no conditions exist then it is evaluated as true</span>
    
    <div ng-include="'../app/directives/projectConditions/addConditionModal.html'"/>
</span>
</script>
<script type="text/ng-template" id="../app/directives/projectControlPanel/projectControlPanel.html">
<div class="project-control-panel" ng-class="{'active':!startBtnEnabled}">

    <label class="pull-left progress-info" style="display:none;" ng-bind="progressInfo" ng-if="!hideButtons"></label>

    <button id="buttonStop-37a" type="button" class="btn btn-default sq-btn-process sq-btn-stop" ng-click="stop()" ng-disabled="!stopBtnEnabled"
        ng-if="!hideButtons" id="{{::projectName}}-button-stop">
        <i class="fa fa-stop-circle-o" aria-hidden="true"></i>
        <span tsq>Stop</span>
    </button>
    <button id="buttonPause-37b" type="button" class="btn btn-default sq-btn-process sq-btn-pause" ng-click="pause()" ng-disabled="!pauseBtnEnabled"
        ng-if="!hideButtons" id="{{::projectName}}-button-pause" ng-hide="isPortfolioMaster">
        <i class="fa fa-pause-circle-o" aria-hidden="true"></i>
        <span ng-bind="pauseBtnTitle"></span>
    </button>
    <button id="buttonStart-37c" type="button" class="btn btn-primary sq-btn-process sq-btn-start" ng-click="start()" ng-disabled="!startBtnEnabled || disabled"
        ng-if="!hideButtons" id="{{::projectName}}-button-start">
        <i class="fa fa-play-circle-o" aria-hidden="true"></i>
        <span tsq>Start</span>
    </button>
    <div class="clearfix" ng-if="!hideButtons"></div>

    <div class="progress sq-build-progress">
        <div class="progress-bar progress-bar-infinite" role="progressbar" aria-valuenow="70" aria-valuemin="0"
            aria-valuemax="100" style="width: {{progressPercent}}%;" ng-show="!startBtnEnabled"></div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../app/directives/propertyGrid/propertyGrid.html">
<div>
    <div class="property-grid" ng-class="{'property-grid-with-sidenote' : noteOnSide}">
        <div class="categories-wrapper" ng-show="categories.length>0">
            <div class="category" ng-repeat="category in categories | orderBy:'+position'"
                ng-hide="checkHiddenCategory(category)">
                <div class="category-title" ng-click="toggleCategory(category)">
                    <span class="toggleBtn expanded" ng-class="category.expanded ? 'expanded' : 'collapsed'"></span>
                    <label ng-bind="category.name | tsq"></label>
                </div>
                <ul class="category" ng-class="category.expanded ? 'expanded' : 'collapsed'">
                    <li ng-repeat="property in properties" ng-hide="checkHidden(property)">
                        <ul class="property" ng-if="property.category == category.name">
                            <li class="property-title" ng-attr-title="{{property.name | tsq}}">{{property.name | tsq}}<i
                                    ng-if="property.note && property.note!='Null' && property.note!=''"
                                    class="fa fa-question-circle-o" aria-hidden="true" title="{{property.note | tsq}}"
                                    data-toggle="tooltip" data-container="body" data-placement="right"></i>
                            </li>

                            <li ng-if="shouldShowInput(property)" class="property-value">
                                <div class="sqn-spinner">
                                    <input type="text" class="sqn-input" min="{{::property.min}}"
                                        max="{{::property.max}}" step="{{::property.step}}" ng-model="property.value"
                                        onFocus="sqnSpinnerFocus(this)" onBlur="sqnSpinnerBlur(this)" ng-disabled="!enabled || checkDisabled(property)" />
                                    <div class="sqn-spinner-btns">
                                        <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                                        <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                                    </div>
                                </div>
                            </li>

                            <li ng-if="shouldShowSelect(property)" class="property-value">
                                <div class="sqn-input sqn-select">
                                    <span>{{property.display | tsq}}</span>
                                    <select ng-model="property.value"
                                        ng-options="item.name as item.value for item in property.options"
                                        onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)"
                                        ng-disabled="!enabled || checkDisabled(property)"></select>
                                </div>
                            </li>

                            <li ng-if="shouldShowCheckbox(property)" class="property-value">
                                <div class="sq-checkbox"
                                    ng-click="(!(!enabled || checkDisabled(property)))?property.value=!property.value:void">
                                    <input type="checkbox" ng-model="property.value"
                                        ng-disabled="!enabled || checkDisabled(property)">
                                    <label></label>
                                </div>
                            </li>

                            <li ng-if="shouldShowTimeSpinner(property)" class="property-value">
                                <time-spinner min="0" max="86340" step="120" sq-model="property.value"
                                    sq-disabled="!enabled || checkDisabled(property)"></time-spinner>
                            </li>
                        </ul>
                    </li>
                </ul>
            </div>
            <div class="property-grid-note" ng-if="!noteOnSide">
                <div ng-bind-html="note | tsq | html"></div>
            </div>
        </div>
        <div class="property-grid-note property-grid-note-side" ng-if="noteOnSide"
            ng-class="{'property-grid-note-nocats' : categories.length<=0}">
            <div ng-bind-html="note | tsq | html"></div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../app/directives/quantTabs/quantTabs.html">
<div class="quant-tabs">
    <div class="tabs-header">
        <div ng-repeat="tab in instance.tabs | orderBy: '+position'" data-item="{{::tab.dataItem}}"
            id="{{::tab.htmlId}}" ng-class="{'active': tab.active}" ng-click="onSelectTab(tab)"
            ng-show="tab.display === undefined || tab.display">
            {{translateHeaders ? (tab.title | tsq) : tab.title}} <span ng-show="showNumberOfRecords">(<span
                    ng-bind="tab.records"></span>)</span>
            <!-- Delete button -->
            <span ng-if="tab.tooltipHelp" class="help" data-container="body" data-placement="right"
                ng-attr-title="{{tab.tooltipHelp}}"><i class="fa fa-question-circle-o" aria-hidden="true"></i></span>
            <span ng-if="tab.hasDeleteButton" class="ico-tab-delete" ng-click="tab.onClose(tab);"></span>
            <!-- Menu items -->
            <div ng-if="tab.hasMenu" data-toggle="dropdown" class="tab-menu dropdown-toggle"
                ng-click="showMenu($event, tab)">
            </div>
        </div>
        <div class="{{::control.class}}" ng-repeat="control in instance.controls track by $index"
            ng-click="control.onClick();">
            <i ng-if="control.iconClass!=''" class="{{::control.iconClass}}"></i>
            {{::control.title | tsq}}
        </div>
    </div>
    <div class="tabs-body">
        <div ng-repeat="tab in instance.tabs | orderBy: '+position'" data-item="{{::tab.dataItem}}"
            ng-class="{'active': tab.active}" ng-show="tab.display === undefined || tab.display">
            <div ng-if="tab.templateUrl" ng-include="tab.templateUrl" ng-dynamic-controller="tab.controller" />
            <div ng-if="tab.template" ng-dynamic-controller="tab.controller" ng-bind="tab.template"></div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../app/directives/quantTabsVirtual/quantTabsVirtual.html">
<div class="quant-tabs">
    <div class="tabs-header">
        <div ng-repeat="tab in instance.tabs | orderBy: '+position' track by $index" ng-class="{'active': tab.active}" ng-click="onSelectTab(tab)" ng-show="tab.active === undefined || tab.active">
             {{::tab.title}}
        </div>
    </div>
    <div class="tabs-body">
        <div ng-repeat="tab in instance.tabs | orderBy: '+position'" data-item="{{::tab.dataItem}}" ng-class="{'active': tab.active}" ng-show="tab.active === undefined || tab.active">
            <div ng-include="tab.templateUrl"/>
        </div>
    </div>
</div> 
</script>
<script type="text/ng-template" id="../app/directives/resultsToolbar/toolbar.html">
<div class="toolbar">
    <label tsq>Data</label>
    <div class="sqn-input sqn-select">
        <span>{{resultKey}}</span>
        <select ng-model="resultKey" ng-options="item for item in dataItems" onFocus="sqnSelectFocus(this)"
            onBlur="sqnSelectBlur(this)" ng-change="onKeySelect()"></select>
    </div>

    <label ng-hide="displayOnlyData" tsq>Direction</label>
    <div ng-hide="displayOnlyData" class="btn-group">
        <button id="LSbtn" ng-click="onDirectionSelect(directions.both)" type="button" class="btn btn-default"
            ng-class="{active: direction == directions.both}" tsq>L+S</button>
        <button id="Lngbtn" ng-click="onDirectionSelect(directions.long)" type="button" class="btn btn-default"
            ng-class="{active: direction == directions.long}" tsq>Lng</button>
        <button id="Shrbtn" ng-click="onDirectionSelect(directions.short)" type="button" class="btn btn-default"
            ng-class="{active: direction == directions.short}" tsq>Shr</button>
    </div>

    <sample-type ng-hide="displayOnlyData || isAWCloud || isMTAnalyzer" selected="sampleType" on-change="onSampleTypeChange" extended="extSampleType" instance="sampleTypeInstance"></sample-type>

    <span ng-transclude></span>
</div>
</script>
<script type="text/ng-template" id="../app/directives/sampleType/sampleType.html">
<div
 class="sample-type-selector-wrapper">
    <label tsq>Sample</label>

    <div ng-show="!extended || displaySimpleButtons" class="btn-group">
        <button id="buttonFull-39a" ng-click="onSampleSelect(sampleTypes.full)" type="button" class="btn btn-default"
            ng-class="{active: selected == sampleTypes.full}" tsq>Full</button>
        <button id="buttonIS-39b" ng-click="onSampleSelect(sampleTypes.in)" type="button" class="btn btn-default"
            ng-class="{active: selected == sampleTypes.in}" tsq>IS</button>
        <button id="buttonOOS-39c" ng-click="onSampleSelect(sampleTypes.out)" type="button" class="btn btn-default"
            ng-class="{active: selected == sampleTypes.out}" tsq>OOS</button>
    </div>

    <div ng-show="extended && !displaySimpleButtons" class="btn-group sample-type-selector">
        <button id="buttonfull-39d" ng-click="onSampleSelect(sampleTypes.full)" type="button" class="btn btn-default"
            ng-class="{active: selectedType=='full'}" tsq>Full</button>
        <div class="btn-group">
            <button id="buttonSelectSampleIn-39e" type="button" class="btn btn-default" ng-class="{active: selectedType=='in'}"
                ng-click="onSampleSelectIn(inPreselected)"><span ng-bind="getSampleTypeLabel(inPreselected)"
                    class="sample-type-btn-name"></span></button>
            <button id="buttonToggleDropdown-39f" type="button" class="btn btn-default dropdown-toggle" ng-class="{active: selectedType=='in'}"
                data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                <span class="caret"></span>
                <span class="sr-only">Toggle Dropdown</span>
            </button>
            <ul class="dropdown-menu" ng-click="closeDropdown($event)">
                <li ng-repeat="item in sampleTypeListIn"><a ng-click="onSampleSelectIn(item.value)"
                        ng-bind="item.name | tsq"></a></li>
            </ul>
        </div>
        <div class="btn-group">
            <button id="buttonSelectSampleOut-39g" type="button" class="btn btn-default" ng-class="{active: selectedType=='out'}"
                ng-click="onSampleSelectOut(outPreselected)"><span ng-bind="getSampleTypeLabel(outPreselected)"
                    class="sample-type-btn-name"></span></button>
            <button id="buttonToggleDropdown-39h" type="button" class="btn btn-default dropdown-toggle" ng-class="{active: selectedType=='out'}"
                data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                <span class="caret"></span>
                <span class="sr-only">Toggle Dropdown</span>
            </button>
            <ul class="dropdown-menu" ng-click="closeDropdown($event)">
                <li ng-repeat="item in sampleTypeListOut"><a ng-click="onSampleSelectOut(item.value)"
                        ng-bind="item.name | tsq"></a></li>
            </ul>
        </div>
    </div>

</div>
</script>
<script type="text/ng-template" id="../app/directives/saveFileDialog/saveFileDialog.html">
<span>
    <!-- Modal window-->
    <div class="modal" id="{{::popupId}}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button id="buttonTimes-40a" type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                    <h4 class="modal-title" id="myModalLabel" ng-bind="title"></h4>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal saveFileDialog" role="form" ng-class="{'submitted': errors}">

                        <form-errors errors="errors"></form-errors>

                        <fieldset class="sq-fieldset">
                            <legend tsq>Target file path</legend>
                            <div class="clearfix"></div>
                            <div class="input-line">
                                <label class="sqn-label input-elem">
                                    <tsq>Directory</tsq>
                                </label>
                                <input type="text" class="sqn-input" ng-model="selectedFolder" />
                                &nbsp;
                                <a ng-click="openLastDir();" tsq>Browse</a>
                            </div>
                            <div class="input-line">
                                <label class="sqn-label input-elem">
                                    <tsq>File name</tsq>
                                </label>
                                <input type="text" class="sqn-input" ng-model="newFile.name" ng-init="newFile.name=''" />
                                &nbsp;
                                <label>.{{fileExtension}}</label>
                            </div>
                        </fieldset>

                        <ng-transclude></ng-transclude>

                    </form>
                </div>
                <div class="modal-footer">
                    <a data-dismiss="modal" tsq>Close</a>
                    <button id="buttonSave-40b" type="button" class="btn btn-primary" ng-click="onSaveFile(form)" tsq>Save</button>
                </div>
            </div>
        </div>
    </div>
</span>
</script>
<script type="text/ng-template" id="../app/directives/searchFilter/searchFilter.html">
<form>
    <input class="sqn-input instSearchInput" id="{{::filterId}}" name="search" type="text" ng-model="filter.text"
        placeholder="{{'Filter items' | tsq}}" ng-change="filter.onSearch()" />
    <div class="sqn-input-clear-icon" ng-if="filter.text!=''" ng-click="filter.text='';filter.onSearch();"></div>
</form>
</script>
<script type="text/ng-template" id="../app/directives/settingsPanel/settingsPanel.html">
<div id="settings-panel">
    <div class="settings-group" ng-click="showAdvancedSettings($event)">
        <div ng-repeat="settingsGroup in settingsGroups" ng-click="openSettings()">
            <label class="settings-title" ng-if="settingsGroup.title">{{settingsGroup.title | tsq}}</label>
            <table>
                <tr ng-repeat="setting in settingsGroup.settings" ng-show="setting.name != 'Trading options' || (dataConfig.setups[0].engine != 'Stockpicker' && dataConfig.setups[0].engine != 'Single-asset cloud strategy')">
                    <td ng-bind="setting.name | tsq" />
                    <td ng-bind-html="setting.value | tsq" />
                </tr>
            </table>
            <br/>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../app/directives/settingsTable/settingsTable.html">
<div class="row row-smaller">
	<div class="col-lg-8">
		<div class="gridbox_compressed settings-grid" id="grid-{{gridId}}" width="550"
			style="width:550px; min-height: 250px;"></div>
	</div>
	<div class="col-lg-4">
		<div style="position:relative;">
			<property-grid id="property-grid-{{gridId}}" class='sgPropertyGrid' instance="propGridInstance" after-init="" on-change="onPGChange" style="width: 280px; height: auto;" ng-show="propGridShowed" />
		</div>
	</div>
</div>
</script>
<script type="text/ng-template" id="../app/directives/settingsTabs/settingsTabs.html">
<div>
    <div class="advanced-settings-window-title">
        <tsq>Advanced settings</tsq>
        <span ng-show="isTaskManager">
            <tsq>for</tsq> '{{taskName}}'</span>
    </div>

    <div ng-show="instance.tabs.length==0" tsq>Create some tasks first</div>

    <div class="quant-tabs tabs-settings-tabs">
        <div class="tabs-header">
            <div ng-repeat="tab in instance.tabs | orderBy: '+position'" ng-class="{'active' : tab.active, 'error' : tab.hasErrors}"
                ng-click="onSelectTab(tab)" title="{{tab.currentText | tsq}}" ng-show="tab.display === undefined || tab.display" id="tab-{{::tab.dataItem}}">{{tab.translatedTitle}}
            </div>
        </div>
        <div class="tabs-body">
            <div ng-repeat="tab in instance.tabs" ng-class="{'active':tab.active}" ng-show="tab.display === undefined || tab.display">
                <div class="sqn-settings-body-header" ng-class="tab.dataItem">
                    <div class="sqn-settings-tab-desc" title="" ng-bind-html="(tab.help | tsq)"></div>
                    <button id="buttonHelp-41a" type="button" class="btn btn-default sqn-btn-help" ng-click="onHelp(tab)">
                        <span tsq>Help</span>
                    </button>
                </div>
                <div class="sqn-settings-body-inner" ng-class="[{'disabled-panel': $root.project.state == projectStates.running || $root.project.state == projectStates.paused},tab.dataItem]">
                    <div class="disabled-area-placeholder">
                        <i class="fa fa-lock" title="Setting changes locked, they will be applied next time you start the project."></i>
                    </div>

                    <div ng-if="tab.templateUrl" ng-include="tab.templateUrl" ng-dynamic-controller="tab.controller" />
                    <div ng-if="tab.template" ng-dynamic-controller="tab.controller">{{::tab.template}}</div>
                </div>
            </div>
            <div class="sqn-settings-nextbtns clearfix">
                <button id="buttonSwitchToPrevTab-41b" type="button" class="btn btn-primary pull-left" ng-show="prevButtonLabel" ng-click="instance.switchToPrevTab()" ng-bind="prevButtonLabel"></button>
                <button id="buttonClose-41c" type="button" class="btn btn-default sqn-settings-closebtn-bottom" ng-click="onClose()" tsq>Close</button>
                <button id="buttonSwitchToNextTab-41d" type="button" class="btn btn-primary pull-right" ng-show="nextButtonLabel" ng-click="instance.switchToNextTab()"
                    ng-bind="nextButtonLabel"></button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../app/directives/simpleCrossCheck/simpleCrossCheck.html">
<span class="simple-cross-check">
    <label class="settings-title">
        <tsq>Cross checks (strategy robustness tests)</tsq>
        <span ng-show="!$root.license.isProVersion" class="only-pro" ng-bind="onlyInProTitle"></span>
        <div ng-show="$root.license.isProVersion" class="sq-checkbox disable-all-checkbox">
            <label class="sqn-label" ng-click="config.disabled = !config.disabled; onDisableAll()" tsq>Disable all</label>
            <input type="checkbox" ng-model="config.disabled" ng-change="onDisableAll()" id="cc-config-disabled-all" ng-disabled="!$root.license.isProVersion" />
            <label class="sqn-label disable-all-switch" for="cc-config-disabled-all"></label>
        </div>
    </label>
            
    <br><br>

    <div class="settings-table-cross-check">
        <div ng-repeat="category in categories | orderBy: '+position'" ng-show="!config.useRecommended" class="simple-cs-section">
            <div class="simple-cs-line category">
                <label class="categoryName" id="cc-category-open-{{::$index}}"><span class="categoryNameBold">{{category.name | tsq}}</span></label>
            </div>

            <div ng-repeat="crossCheck in category.crossChecks | orderBy: '+position'" class="simple-cs-line items">
                <label ng-click="crossCheck.use = config.disabled ? crossCheck.use : !crossCheck.use; onCrossCheckChecked(crossCheck)">{{crossCheck.title | tsq}}</label>
                <div class="sq-checkbox pull-right">
                    <input type="checkbox" ng-model="crossCheck.use" ng-change="onCrossCheckChecked(crossCheck)"
                        ng-disabled="config.disabled || !$root.license.isProVersion || crossCheck.disabled"
                        id="cc-ccrossCheck-{{::$parent.$index}}-{{::$index}}" />
                    <label class="sqn-label" for="cc-ccrossCheck-{{::$parent.$index}}-{{::$index}}"></label>
                </div>
            </div>
        </div>
    </div>
</span>
</script>
<script type="text/ng-template" id="../app/directives/simpleDataSettings/simpleDataSettings.html">
<span class="simple-data-settings">
    <label class="settings-title" tsq>Data</label>

    <div class="setting-row">
        <label class="sqn-label fixed-width" tsq>Engine</label>
        <div class="pull-right"></div>
        <div class="sqn-input sqn-select">
            <span ng-bind="getEngineLabel()"></span>
            <select ng-model="config.engine" ng-options="engine.value as (engine.name | tsq) for engine in engineTypes"
                onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)"></select>
        </div>
    </div>

    <div class="setting-row">
        <label ng-show="config.engine == 'Stockpicker'" class="sqn-label fixed-width" tsq>Group</label>
        <label ng-show="config.engine != 'Stockpicker'" class="sqn-label fixed-width" tsq>Symbol</label>
        <div class="pull-right">
            <sq-data-box sq-model="config.symbol" engine="config.engine"/>
            <timeframe-picker timeframe="config.timeframe" class="timeframe" min-timeframe="config.minTimeframe" higher-tfs-disabled="config.engine == 'Stockpicker' || config.engine == 'Single-asset cloud strategy'"/>
        </div>
    </div>
    <div class="setting-row">
        <label class="sqn-label fixed-width"></label>
        <label class="date range" ng-bind="dateRange"></label>
        <label class="oos range" ng-bind="oosRanges"></label>
    </div>
</span>
</script>
<script type="text/ng-template" id="../app/directives/skinPicker/skinPicker.html">
<ul class="dropdown-menu lang-menu">
    <li ng-repeat="skin in skins | orderBy: '+position' track by $index" ng-click="changeSkin(skin)">
        <a ng-class="{ 'dropdown-item-checked': skin.name == selectedSkin.name }">
            {{::skin.name}}
            <i class="fa fa-check" aria-hidden="true"></i>
        </a>
    </li>
</ul>

</script>
<script type="text/ng-template" id="../app/directives/sqComboButton/sqComboButton.html">
<div class="dropdown">
	<div class="menu-button dropdown-toggle" type="button" data-toggle="dropdown" ng-class="{'disabled':ngDisabled}">
		{{::title}}
		<div class="caret"></div>
	</div>
	<ul class="dropdown-menu">
		<li ng-repeat="action in actions track by $index">
			<a ng-if="action.items" ng-repeat="item in action.items track by $index" ng-click="onSelect({action: action, item: item})" ng-class="::action.controller" id="{{item.id}}">{{item.title | tsq}}</a>

			<a  ng-if="!action.items" ng-click="onSelect({action: action})" ng-class="::action.controller" id="{{action.id}}">{{action.title | tsq}}</a>
			<div ng-dynamic-controller="action.controller" ng-include="action.templateUrl" />
		</li>
	</ul>
</div>
</script>
<script type="text/ng-template" id="../app/directives/sqComboInput/sqComboInput.html">
<div class="sq-combo-input">
	<span class="sqn-label" ng-if="label">{{::label}}</span>
	<div class="sqn-input sqn-select" ng-click="inputClick()">
		<input type="text" ng-model="sqModel" name="{{::name}}" ng-disabled="ngDisabled" ng-model-options="ngModelOptions" />

		<select ng-if="::(!single && optionsValue && optionsDisplay)" ng-options="o.{{::optionsValue}} as o.{{::optionsDisplay}} for o in options"
		 name="{{::name}}" ng-model="sqModel" style="display: none;" ng-disabled="ngDisabled" size="{{selectHeight}}" ng-change="selectChange(sqModel)" multiple></select>
		
		<select ng-if="::(!single && (!optionsValue || !optionsDisplay))" ng-options="o as o for o in options" name="{{::name}}" ng-model="sqModel"
		 ng-disabled="ngDisabled" size="{{selectHeight}}" style="display: none;" ng-change="selectChange(sqModel)" multiple></select>

		<select ng-if="::(single && optionsValue && optionsDisplay)" ng-options="o.{{::optionsValue}} as o.{{::optionsDisplay}} for o in options"
		 name="{{::name}}" ng-model="sqModel" style="display: none;" ng-disabled="ngDisabled" size="{{selectHeight}}" ng-change="selectChange(sqModel)"></select>
		
		<select ng-if="::(single && (!optionsValue || !optionsDisplay))" ng-options="o as o for o in options" name="{{::name}}" ng-model="sqModel"
		 ng-disabled="ngDisabled" size="{{selectHeight}}" style="display: none;" ng-change="selectChange(sqModel)"></select>
	</div>
</div>
</script>
<script type="text/ng-template" id="../app/directives/sqDataBox/sqDataBox.html">
<div class="sq-data-box">
    <div class="sq-data-box-overlay" ng-show="dropdownOpened" ng-click="dropdownClose()"></div>
    <div ng-style="{'background-color': disabled ? '#eeeef4' : null }" class="sqn-input sqn-select" ng-click="dropdownOpen()">
        <span ng-if="filterText=='' && !dropdownOpened" ng-bind="sqModel"></span>
        <span ng-if="filterText!=''" ng-bind="filterText"></span>
        <span ng-if="filterText=='' && dropdownOpened" class="pulsing-text" tsq>search by typing...</span>
    </div>
    <div class="sq-data-box-dropdown" ng-show="dropdownOpened" ng-click="dropdownClicked($event)">
        <div class="sq-data-box-left">
            <div class="data-selector"></div>
            <!--
			<select class="sq-data-box-select" ng-if="filterTypeValue == -1 && filterText==''" ng-model="innerModel"
				ng-change="selectChange(innerModel)" ng-click="selectClicked()" ng-keyup="onSelectKeyUp($event)"
				ng-mouseover="hoveredSelect($event)" multiple>
				<optgroup label="{{dataTypesList[filterOption]}}" ng-repeat="filterOption in filterTypeOptions">
					<option value="{{data.symbol}}" ng-repeat="data in availableData track by $index"
						ng-if="shouldShowItem(data) && data.dataType==filterOption">
						{{data.symbol}}</option>
				</optgroup>
			</select>
			<select class="sq-data-box-select" ng-if="!(filterTypeValue == -1 && filterText=='')" ng-model="innerModel"
				ng-change="selectChange(innerModel)" ng-click="selectClicked()" ng-keyup="onSelectKeyUp($event)"
				ng-mouseover="hoveredSelect($event)" multiple>
				<option value="{{data.symbol}}" ng-repeat="data in availableData track by $index"
					ng-if="shouldShowItem(data)">
					{{data.symbol}}</option>
			</select>-->
        </div>
        <div class="sq-data-box-right">
            <div class="selectTypeButtons toolbar">
                <label tsq>Type:</label>
                <div class="btn-group">
                    <button id="buttonAll-42a" class="btn btn-default" ng-class="{'active':filterTypeValue == -1}" ng-click="selectFilterType(-1)" tsq>All</button>
                    <button id="buttonSelectFilter-42b" class="btn btn-default" ng-class="{'active':filterTypeValue == filterOption}" ng-repeat="filterOption in filterTypeOptions" ng-click="selectFilterType(filterOption)">{{dataTypesList[filterOption]}}</button>
                </div>
            </div>
            <div class="recent-cloud-title" tsq><label>Recently used</label></div>
            <div class="recent-cloud"></div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../app/directives/sqDataInput/sqDataInput.html">
<div class="sq-data-input">
	<div class="sqn-input sqn-select" ng-if="availableData.length<10">
		<span ng-bind="sqModel"></span>
		<select ng-model="sqModel" ng-options="data.symbol as data.symbol for data in availableData"
			onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)" ng-change="selectChange(sqModel)"></select>
	</div>
	<div class="sqn-input sqn-select bx" ng-class="{'active': dropdownOpened}" ng-if="availableData.length>=10"
		ng-click="inputClick()">
		<span ng-bind="sqModel" ng-if="!dropdownOpened"></span>
		<div class="sq-data-input-dropdown" ng-click="dropdownClicked($event)">
			<input type="text" class="sqn-input sq-data-input-input" ng-model="searchString"
				ng-keyup="onInputKeyUp($event)" ng-blur="onInputBlur($event)" />
			<!-- <select ng-model="innerModel" ng-options="data as data for data in filteredData"
				ng-click="selectChange(innerModel)" multiple></select> -->
			<select ng-model="innerModel" ng-click="selectChange(innerModel)" ng-keyup="onSelectKeyUp($event)" multiple>
				<option value="{{data}}" ng-repeat="data in filteredData track by $index"
					ng-class="{'recent': isRecentItem(data)}">{{data}}</option>
			</select>
		</div>
	</div>
</div>
</script>
<script type="text/ng-template" id="../app/directives/sqInput/sqInput.html">
<div class="sq-input {{::inputtype=='select' ? 'sq-input-select' : ''}}" ng-class="{'sq-input-disabled':ngDisabled}">
	<div class="sq-tooltip" ng-if="::(!hideTooltip && tooltip)" ng-bind="::tooltip"></div>
	<label ng-if="::label" ng-bind="::label"></label>
	<input ng-if="::(inputtype!='select' && req)" type="{{::inputtype}}" ng-model="modelSQ.val" ng-attr-min="{{::min}}" ng-attr-max="{{::max}}" ng-attr-step="{{::step}}"  ng-model-options="::ngModelOptions" name="{{::name}}" required ng-readonly="currentAction == 'Edit'" ng-disabled="ngDisabled"/>
	<input ng-if="::(inputtype!='select' && !req)" type="{{::inputtype}}" ng-model="modelSQ.val" ng-attr-min="{{::min}}" ng-attr-max="{{::max}}" ng-attr-step="{{::step}}"  ng-model-options="::ngModelOptions" name="{{::name}}" ng-readonly="currentAction == 'Edit' || readonly" ng-disabled="ngDisabled" />
	<div class="sq-input-spinner-btns" ng-if="((inputtype=='number' || numbertype=='time')) && !ngDisabled"><span class="sq-input-spinner-minus" ng-click="changeValue('-')"></span><span class="sq-input-spinner-plus" ng-click="changeValue('+')"></span></div>
	<div ng-if="::(inputtype=='select' && req)" class="sq-input-select-overlay">
		<span ng-bind="modelSQ.selectSpan"></span>
		<select ng-if="::(optionsValue && optionsDisplay)" ng-options="o.{{::optionsValue}} as o.{{::optionsDisplay}} for o in options" name="{{::name}}" ng-model="modelSQ.val" ng-change="onSelect()" ng-disabled="ngDisabled" required ></select>
		<select ng-if="::(!optionsValue || !optionsDisplay)" ng-options="o as o for o in options" name="{{::name}}" ng-model="modelSQ.val" ng-change="onSelect()" ng-disabled="ngDisabled" required ></select> 
	</div>
	<div ng-if="::(inputtype=='select' && !req)" class="sq-input-select-overlay">
		<span ng-bind="modelSQ.selectSpan"></span>
		<select ng-if="::(optionsValue && optionsDisplay)" ng-options="o.{{::optionsValue}} as o.{{::optionsDisplay}} for o in options" name="{{::name}}" ng-model="modelSQ.val" ng-change="onSelect()" ng-disabled="ngDisabled" ></select>
		<select ng-if="::(!optionsValue || !optionsDisplay)" ng-options="o as o for o in options" name="{{::name}}" ng-model="modelSQ.val" ng-change="onSelect()" ng-disabled="ngDisabled" ></select> 
	</div>
</div>
</script>
<script type="text/ng-template" id="../app/directives/sqSlider/sqSlider.html">
<div class="sq-slider" style="display: inline-flex">
    <label ng-if="valueAlign == alignTypes.left" style="min-width: 40px!important; margin-right: 10px; margin-top: -1px;"><span ng-bind="value"/> <span ng-bind="postfix"/></label>
    <input type="hidden" class="sq-slider-input" value="{{::sqModel}}" />
    <label ng-if="valueAlign == alignTypes.right" style="min-width: 40px!important; margin-left: 10px; margin-top: -1px;"><span ng-bind="value"/> <span ng-bind="postfix"/></label>
</div>
</script>
<script type="text/ng-template" id="../app/directives/sqUtils/sqUtils.html">
<div ng-repeat="popup in popups track by $index">
    <div ng-if="popup.templateUrl" ng-include="popup.templateUrl" ng-dynamic-controller="popup.controller"/>
    <div ng-if="popup.template" ng-dynamic-controller="popup.controller" ng-bind="popup.template"></div>
</div>

<span ng-if="isMainApp">
    <directory-picker-modal 
        id='defaultFilePickerModal' 
        instance='filePicker' 
        title='{{filePicker.title}}'
        multiselection='{{filePicker.multiselection}}'
        on-select='filePicker.onSelect' 
        show-files='{{filePicker.showFiles}}' 
        action-type='{{filePicker.actionType}}'
        current-dir='{{filePicker.currentDir}}'
        extension='filePicker.extension'
        file-name='{{filePicker.fileName}}'
    />
    
    <save-file-dialog popup-id="saveFileDialog" title="{{saveFile.title}}" file-extension='{{saveFile.extension.name}}' path-key="{{saveFile.pathKey}}" on-save="saveFile.callback(path)" file-name="saveFile.fileName">
        <fieldset ng-if="saveFile.extensions.length > 0" class="sq-fieldset">
            <div class="input-line">
                <label class="sqn-label input-elem" tsq>Format</label>
                <div class="radio" ng-click="saveFile.extension.name = extension.name" style="margin-left: 20px; margin-bottom: 10px; margin-top: -2px;" ng-repeat="extension in saveFile.extensions">
                    <input type="radio" name="SCExtensionRadios" ng-model="saveFile.extension.name" value="{{::extension.name}}" />
                    <span class="sq-mark"></span>
                    <span ng-bind="extension.description" tsq></span>
                </div>
            </div>
        </fieldset>
    </save-file-dialog>

    <div ng-include="'../app/layout/views/confirmDialog.html'"/>
    <div ng-include="'../app/layout/views/optionsDialog.html'"/>
    <div ng-include="'../app/layout/views/progressModal.html'"/>
    <div ng-include="'../app/layout/views/saveStrategiesProgressModal.html'"/>
    <div ng-include="'../app/layout/views/errorDialog.html'"/>
    <div ng-include="'../app/layout/views/performanceDialog.html'"/>
    <div ng-include="'../app/layout/views/remoteAccessDialog.html'"/>
    <div ng-include="'../app/layout/views/smtpDialog.html'"/>
	<div ng-include="'../app/layout/views/noNewVersionDialog.html'"/>
	<div ng-include="'../app/layout/views/newVersionDialog.html'"/>
	<div ng-include="'../app/layout/views/CSVXLSXExportDialog.html'"/>
	<div ng-include="'../app/layout/views/moveDatabankDialog.html'"/>
    <div ng-include="'../app/layout/views/awExamplesDialog.html'"/>

    <benchmark-dialog instance="benchmark"></benchmark-dialog>
</span>
</script>
<script type="text/ng-template" id="../app/directives/strategyConfigList/strategyConfigList.html">
<table ng-repeat="tab in settings track by $index" class="ss-settings-table">
    <thead>
        <tr ng-click="tab.opened=!tab.opened">
            <td class="key">{{tab.name | tsq}}<span ng-class="{'active':tab.diffs>0}">{{tab.diffs}} <tsq
                        ng-if="tab.diffs==1">diff</tsq>
                    <tsq ng-if="tab.diffs!=1">diffs</tsq>
                </span></td>
            <td class="value"></td>
            <td class="value"><i class="fa" ng-class="{'fa-chevron-up': tab.opened, 'fa-chevron-down': !tab.opened}"
                    aria-hidden="true"></i>
            </td>
        </tr>
    </thead>

    <tbody class="block" ng-show="tab.opened">
        <tr ng-repeat="value in tab.settings track by $index">
            <td class="key" title="{{value.key}}">{{value.key | tsq}}</td>
            <td>
                <div ng-repeat="value_str in value.value_strs" ng-bind-html="value_str.html | html"></div>
            </td>
            <td>
                <div ng-repeat="value_task in value.value_tasks" ng-bind-html="value_task.html | html"></div>
            </td>
        </tr>
    </tbody>
</table>

</script>
<script type="text/ng-template" id="../app/directives/swapSettings/swapSettings.html">
<fieldset class="sq-fieldset swapFieldset">
    <legend tsq>Swap
        <button id="buttonHelp-swapSettings" type="button" class="btn btn-default sqn-btn-help" onClick='showPopup("#swapAndCommissionHelp")'>
            <span tsq="">Help</span>
        </button>
    </legend>

    <table class="swap-table">
        <tr>
            <td colspan="2">
                <div style="display: inline">
                    <div class="sq-checkbox" ng-click="config.useSwap = !config.useSwap">
                        <input type="checkbox" ng-model="config.useSwap">
                        <label tsq>Use</label>
                    </div>
                </div>
            </td>
        </tr>
        <tr>
            <td><label class="sqn-label" tsq>Swap type</label></td>
            <td>
                <div class="sqn-input sqn-select" ng-class="{'disabled': !config.useSwap}">
                    <span ng-bind="config.swapType"></span>
                    <select ng-model="config.swapType" ng-options="item as item for item in swapTypes" onFocus="sqnSelectFocus(this)"
                        onBlur="sqnSelectBlur(this)" ng-disabled="!config.useSwap"></select>
                </div>
            </td>
        </tr>
        <tr>
            <td><label class="sqn-label" tsq>Long</label></td>
            <td>
                <div class="sqn-spinner">
                    <input type="text" class="sqn-input" step="0.1" ng-model="config.swapLong" onFocus="sqnSpinnerFocus(this)" 
                        onBlur="sqnSpinnerBlur(this)" ng-disabled="!config.useSwap" ng-model-options="{ updateOn: 'blur' }" />
                    <div class="sqn-spinner-btns">
                        <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                        <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                    </div>
                </div>
                <tsq ng-show="config.swapType === swapTypes.percent">% per year</tsq>
                <tsq ng-show="config.swapType === swapTypes.money">$ per day</tsq>
                <tsq ng-show="config.swapType === swapTypes.points">points per day</tsq>
            </td>
        </tr>
        <tr>
            <td><label class="sqn-label" tsq>Short</label></td>
            <td>
                <div class="sqn-spinner">
                    <input type="text" class="sqn-input" step="0.1" ng-model="config.swapShort" onFocus="sqnSpinnerFocus(this)"
                        onBlur="sqnSpinnerBlur(this)" ng-disabled="!config.useSwap" ng-model-options="{ updateOn: 'blur' }" />
                    <div class="sqn-spinner-btns">
                        <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                        <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                    </div>
                </div>
                <tsq ng-show="config.swapType === swapTypes.percent">% per year</tsq>
                <tsq ng-show="config.swapType === swapTypes.money">$ per day</tsq>
                <tsq ng-show="config.swapType === swapTypes.points">points per day</tsq>
            </td>
        </tr>
        <tr>
            <td>
                <label class="sqn-label" tsq>Triple swap on</label>
            </td>
            <td>
                <div class="sqn-input sqn-select" ng-class="{'disabled': !config.useSwap}">
                    <span ng-bind="config.tripleSwapOn"></span>
                    <select ng-model="config.tripleSwapOn" ng-options="item as item for item in tripleSwapOptions" onFocus="sqnSelectFocus(this)"
                        onBlur="sqnSelectBlur(this)" ng-disabled="!config.useSwap"></select>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <label class="sqn-label" tsq>Rollout hour</label>
            </td>
            <td>
                <div class="sqn-spinner">
                    <time-spinner min="0" max="86340" step="1800" sq-model="config.rolloutHour" not-convert="true" sq-disabled="!config.useSwap"></time-spinner>
                </div>
            </td>
        </tr>
    </table>
    <div class="modal" id="swapAndCommissionHelp" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document" style="width: 800px;">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="myModalLabel" tsq>Commission & Swap Explanation</h4>
                </div>
                <div class="modal-body" style="height: auto;">
                    In MetaTrader 4 and 5, a swap is the interest rate charged or paid for holding a trading position overnight. If the interest rate on the currency you are buying is higher than the interest rate on the currency you are selling, you will earn a positive swap. If the interest rate on the currency you are buying is lower than the interest rate on the currency you are selling, you will incur a negative swap. The swap rate varies depending on the currency pair and broker. It can affect your trading profitability, so it's important to be aware of the swap rates for the currency pairs you trade.
                    <br/><br />
                    Positive swap: If you are long on the AUD/JPY currency pair and the interest rate on the Australian dollar is higher than the interest rate on the Japanese yen, you will earn a positive swap. This means that you will receive a small amount of money in your trading account for holding the position overnight.
                    <br/><br />
                    Negative swap: If you are short on the EUR/USD currency pair and the interest rate on the euro is lower than the interest rate on the US dollar, you will incur a negative swap. This means that you will have to pay a small amount of money from your trading account for holding the position overnight.
                    <br/><br />
                    The swap is calculated on a daily basis at 11pm (Rollover time). If you have any trades that were opened after 11pm, they will not incur any swap charges until the next day's 11pm calculation.
                </div>
                <div class="modal-footer">
                    <a data-dismiss="modal">Close</a>
                </div>
            </div>
        </div>
    </div>
</fieldset>
</script>
<script type="text/ng-template" id="../app/directives/timeSpinner/timeSpinner.html">
<div class="sqn-spinner">
	<input type="text" class="sqn-input" ng-model="modelSQ.val" ng-disabled="sqDisabled" ng-attr-min="{{::min}}" ng-attr-max="{{::max}}"
	 ng-attr-step="{{::step}}" ng-blur="changeValue()" ng-model-options="{ updateOn : 'blur' }" />
	<div class="sqn-spinner-btns">
		<div class="sqn-spinner-minus" ng-click="spinnerMinus()"></div>
		<div class="sqn-spinner-plus" ng-click="spinnerPlus()"></div>
	</div>
</div>
</script>
<script type="text/ng-template" id="../app/directives/timeframePicker/timeframePicker.html">
<span>
    <span>
        <label class="sqn-label" ng-show="label">{{::label}}</label>
        <div class="sqn-input sqn-select" ng-class="{'disabled':ngDisabled}">
            <span ng-bind="timeframe"></span>
            <select class="sq-timeframe-select" ng-model="innerTimeframe"
                ng-options="item for item in availableTimeframes" onFocus="sqnSelectFocus(this)"
                onBlur="sqnSelectBlur(this)" ng-disabled="ngDisabled"></select>
        </div>
    </span>
    <a class="add-timeframe" ng-if="false" ng-click="showTFPopup()"></a>

    <!-- Modal window-->
    <div class="modal centered timeframe-popup" id="{{::timeframesPopupId}}" tabindex="-1" role="dialog"
        aria-labelledby="myModalLabel-{{::timeframesPopupId}}">
        <div class="modal-dialog modal-smaller" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button id="buttonTimes-43a" type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                    <h4 class="modal-title" id="myModalLabel" tsq>Add new timeframe</h4>
                </div>
                <div class="modal-body">
                    <fieldset class="sq-fieldset">
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="radio">
                                    <label>
                                        <input type="radio" name="TFRadios" ng-model="newTF.prefix" value="S"
                                            ng-disabled="minTFSeconds > 1" />
                                        <tsq>Seconds</tsq>
                                    </label>
                                </div>
                            </div>
                            <div class="col-sm-6">
                                <div class="sqn-spinner">
                                    <input type="text" class="sqn-input" min="0" step="1" ng-model="newTF.seconds"
                                        onFocus="sqnSpinnerFocus(this)" onBlur="sqnSpinnerBlur(this)"
                                        ng-disabled="newTF.prefix != 'S'" />
                                    <div class="sqn-spinner-btns">
                                        <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                                        <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="radio">
                                    <label>
                                        <input type="radio" name="TFRadios" ng-model="newTF.prefix" value="M"
                                            ng-disabled="minTFSeconds > 60" />
                                        <tsq>Minutes</tsq>
                                    </label>
                                </div>
                            </div>
                            <div class="col-sm-6">
                                <div class="sqn-spinner">
                                    <input type="text" class="sqn-input" min="0" step="1" ng-model="newTF.minutes"
                                        onFocus="sqnSpinnerFocus(this)" onBlur="sqnSpinnerBlur(this)"
                                        ng-disabled="newTF.prefix != 'M'" />
                                    <div class="sqn-spinner-btns">
                                        <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                                        <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="radio">
                                    <label>
                                        <input type="radio" name="TFRadios" ng-model="newTF.prefix" value="H"
                                            ng-disabled="minTFSeconds > 3600" />
                                        <tsq>Hours</tsq>
                                    </label>
                                </div>
                            </div>
                            <div class="col-sm-6">
                                <div class="sqn-spinner">
                                    <input type="text" class="sqn-input" min="0" step="1" ng-model="newTF.hours"
                                        onFocus="sqnSpinnerFocus(this)" onBlur="sqnSpinnerBlur(this)"
                                        ng-disabled="newTF.prefix != 'H'" />
                                    <div class="sqn-spinner-btns">
                                        <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                                        <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="radio">
                                    <label>
                                        <input type="radio" name="TFRadios" ng-model="newTF.prefix" value="D"
                                            ng-disabled="minTFSeconds > 86400" />
                                        <tsq>Days</tsq>
                                    </label>
                                </div>
                            </div>
                            <div class="col-sm-6">
                                <div class="sqn-spinner">
                                    <input type="text" class="sqn-input" min="0" step="1" ng-model="newTF.days"
                                        onFocus="sqnSpinnerFocus(this)" onBlur="sqnSpinnerBlur(this)"
                                        ng-disabled="newTF.prefix != 'D'" />
                                    <div class="sqn-spinner-btns">
                                        <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                                        <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </fieldset>
                </div>
                <div class="modal-footer">
                    <a data-dismiss="modal" tsq>Close</a>
                    <button id="buttonSave-43b" class="btn btn-primary" ng-click="saveTimeframe()" data-dismiss="modal" tsq>Save</button>
                </div>
            </div>
        </div>
    </div>

</span>
</script>
<script type="text/ng-template" id="../app/directives/variablesSettings/variablesSettings.html">
<div class="dropdown dropdown-parameters-settings" id="{{::menuId}}">
    <a data-toggle="dropdown" aria-expanded="false" title="Settings" tsq>Parameter variables</a>
    <ul class="dropdown-menu" onclick="event.stopPropagation();">
        <strong tsq>What to parametrize</strong>

        <div>
            <div class="radio">
                <label class="sq-wradio">
                    <input type="radio" name="WhatToRarametrizeRadios" ng-model="config.parametrizeType" ng-value="0" />
                    <span class="sq-mark"></span>
                    <tsq>Recommended parameters</tsq>

                    <div class="sq-data-help">
                        <tsq>Only meaningful parameters. It is not a good idea to optimize everything</tsq><br>
                        <tsq>Recommended params are: periods, entry + exit settings &amp; multipliers</tsq>
                    </div>
                </label>
            </div>

            <div class="radio">
                <label class="sq-wradio">
                    <input type="radio" name="WhatToRarametrizeRadios" ng-model="config.parametrizeType" ng-value="1" />
                    <span class="sq-mark"></span>
                    <tsq>Your own settings</tsq>

                    <div class="sq-data-help">
                        <tsq>Choose your own categories</tsq>
                    </div>

                    <div class="row" ng-show="config.parametrizeType==1">
                        <div class="optimize-settings col-xs-5">
                            <div class="sq-checkbox" ng-click="config.periodParams=!config.periodParams;onChange()">
                                <input type="checkbox" ng-model="config.periodParams">
                                <label>
                                    <tsq>Periods</tsq>
                                </label>
                            </div>
                            <div class="sq-checkbox"
                                ng-click="config.constantsParams=!config.constantsParams;onChange()">
                                <input type="checkbox" ng-model="config.constantsParams">
                                <label>
                                    <tsq>Constants</tsq>
                                </label>
                            </div>
                            <div class="sq-checkbox" ng-click="config.shiftParams=!config.shiftParams;onChange()">
                                <input type="checkbox" ng-model="config.shiftParams">
                                <label>
                                    <tsq>Shifts</tsq>
                                </label>
                            </div>
                            <div class="sq-checkbox" ng-click="config.otherParams=!config.otherParams;onChange()">
                                <input type="checkbox" ng-model="config.otherParams">
                                <label>
                                    <tsq>Other params</tsq>
                                </label>
                            </div>
                        </div>
                        <div class="optimize-settings col-xs-7">
                            <div class="sq-checkbox" ng-click="config.entryParams=!config.entryParams;onChange()">
                                <input type="checkbox" ng-model="config.entryParams">
                                <label>
                                    <tsq>Entry (levels)</tsq>
                                </label>
                            </div>
                            <div class="sq-checkbox" ng-click="config.entryLogic=!config.entryLogic;onChange()">
                                <input type="checkbox" ng-model="config.entryLogic">
                                <label>
                                    <tsq>Entry (logic)</tsq>
                                </label>
                            </div>
                            <div class="sq-checkbox" ng-click="config.exitParamsUsed=!config.exitParamsUsed;onChange()">
                                <input type="checkbox" ng-model="config.exitParamsUsed">
                                <label>
                                    <tsq>Exit params (SL, PT,...) only used</tsq>
                                </label>
                            </div>
                            <div class="sq-checkbox"
                                ng-click="config.exitParamsUnused=!config.exitParamsUnused;onChange()">
                                <input type="checkbox" ng-model="config.exitParamsUnused">
                                <label>
                                    <tsq>Exit params (SL, PT,...) unused</tsq>
                                </label>
                            </div>
                            <div class="sq-checkbox" ng-click="config.booleanParams=!config.booleanParams;onChange()">
                                <input type="checkbox" ng-model="config.booleanParams">
                                <label>
                                    <tsq>Boolean params</tsq>
                                </label>
                            </div>
                        </div>
                        <div class="optimize-settings col-xs-12">
                            <hr />
                            <div class="sq-checkbox"
                                ng-click="config.symmetricVariables=!config.symmetricVariables;onChange()">
                                <input type="checkbox" ng-model="config.symmetricVariables">
                                <label>
                                    <tsq>Symmetric variables for Long / Short</tsq>
                                </label>
                            </div>
                        </div>
                    </div>
                </label>
            </div>

            <div class="radio">
                <label class="sq-wradio">
                    <input type="radio" name="WhatToRarametrizeRadios" ng-model="config.parametrizeType" ng-value="2" />
                    <span class="sq-mark"></span>
                    <tsq>Don't use parameters</tsq>
                </label>
            </div>

            <br />

        </div>
    </ul>
</div>
</script>
<script type="text/ng-template" id="../app/directives/appsZoom/views/appsZoom.html">
<span>
    <a class="zoom-out" ng-click="zoomOut()" data-toggle="tooltip" title="Zoom Out"><i class="fa fa-search-minus" aria-hidden="true"></i></a>
    <span class="zoom-current-value"><span ng-bind="zoomCurrentPercent"></span>%</span>
    <a class="zoom-in" ng-click="zoomIn()" data-toggle="tooltip" title="Zoom In"><i class="fa fa-search-plus" aria-hidden="true"></i></a>
</span>
</script>
<script type="text/ng-template" id="../app/directives/chartSetup/views/chartSetup.html">
<form name="editSetupForm" class="form-horizontal chart-setup" role="form">
    <fieldset class="sq-fieldset">
        <legend tsq>Trading engine</legend>

        <div class="row row-smaller chart-setup-engine">
            <div class="col-sm-5 chart-setup-box-1">
                <label class="sqn-label" tsq>Engine</label>
                <div class="sqn-input sqn-select input-engine">
                    <span ng-bind="getEngineLabel()"></span>
                    <select ng-model="setup.engine" ng-options="engine.value as (engine.name | tsq) for engine in constants.engineTypes"
                        onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)"></select>
                </div>
            </div>
            <div class="col-sm-7 chart-setup-box-2 subchart-count" ng-show="showSubchartSpinner">
                <label class="sqn-label" tsq>Additional charts</label>
                <div class="sqn-spinner">
                    <input type="text" class="sqn-input" min="0" step="1" ng-model="additionalCharts.count" onFocus="sqnSpinnerFocus(this)" onBlur="sqnSpinnerBlur(this)" ng-change="onSubchartsChangeEvent()"/>
                    <div class="sqn-spinner-btns">
                        <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                        <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                    </div>
                </div>
                <div class="subcharts-help">
                    <label tsq>these are additional charts that strategy has access to</label>
                </div>
            </div>
        </div>
    </fieldset>

    <fieldset class="sq-fieldset">
        <legend tsq>Backtest data settings</legend>

        <div class="row row-smaller">
            <div class="col-sm-5 chart-setup-box-1">
                <div class="setup-input-symbol-wrapper">
                    <label ng-show="setup.engine == 'Stockpicker'" class="sqn-label" tsq>Group</label>
                    <label ng-show="setup.engine != 'Stockpicker'" class="sqn-label labelAlignRight" ng-bind="setup.subcharts.length > 0 ? ('Main chart' | tsq) : ('Symbol' | tsq)"></label>
                    
                    <sq-data-box sq-model="setup.symbol" class="setup-input" engine="setup.engine" />
                </div>
            </div>
            <div class="col-sm-5 chart-setup-box-2">
                <label class="sqn-label" tsq>Timeframe</label>
                <timeframe-picker timeframe="setup.timeframe" class="timeframe" min-timeframe="setup.minTimeframe"
                    ng-disabled="ngDisabled" main-chart="mainSetup" higher-tfs-disabled="setup.engine == 'Stockpicker' || setup.engine == 'Single-asset cloud strategy'"/>
            </div>
        </div>

        <div class="row row-smaller">
            <div class="col-sm-5 chart-setup-box-1">
                <date-picker label="{{'Start day' | tsq}}" date="setup.dateFrom" min-date="symbolDateRangeFrom"
                    max-date="symbolDateRangeTo" format="yyyy.mm.dd" on-date-change="onDateFromChange(date)"
                    ng-disabled="ngDisabled" force-date-change="forceDateChange" />
            </div>
            <div class="col-sm-7 chart-setup-box-2">
                <date-picker label="{{'End day' | tsq}}" date="setup.dateTo" min-date="symbolDateRangeFrom"
                    max-date="symbolDateRangeTo" format="yyyy.mm.dd" on-date-change="onDateToChange(date)"
                    ng-disabled="ngDisabled" force-date-change="forceDateChange" />
                <button id="buttonResetDates-23a" class="btn btn-normal btn-default btn-thin" ng-click="resetDates()"
                    class="chart-setup-reset-dates" tsq>Reset dates</button>
            </div>
        </div>

        <div class="row row-smaller chart-setup-available-data">
            <div class="col-sm-5 chart-setup-box-1">
                <div class="sq-input">
                    <label tsq>Available from</label>
                    <label ng-bind="symbolDateRangeFrom"></label>
                </div>
            </div>
            <div class="col-sm-5 chart-setup-box-2">
                <div class="sq-input">
                    <label tsq>to</label>
                    <label ng-bind="symbolDateRangeTo"></label>
                </div>
            </div>
        </div>

        <div class="clearfix"></div>

        <div class="subcharts" ng-if="setup.subcharts.length > 0">
            <div class="subcharts-title">
                <tsq>Subcharts</tsq> ({{setup.subcharts.length}})
            </div>
            <div class="row row-smaller" ng-repeat="subchart in setup.subcharts">
                <div class="col-sm-5 chart-setup-box-1">
                    <div class="setup-input-symbol-wrapper">
                        <label class="sqn-label">
                            <tsq>Subcharts</tsq> {{($index + 1)}}
                        </label>
                        <sq-data-box sq-model="subchart.symbol" class="setup-input" engine="'MetaTrader4'" />
                    </div>
                </div>
                <div class="col-sm-5 chart-setup-box-2">
                    <label class="sqn-label" tsq>Timeframe</label>
                    <timeframe-picker timeframe="subchart.timeframe" class="timeframe"
                        min-timeframe="(setup.engine == 'Stockpicker' || setup.engine == 'Single-asset cloud strategy') ? 'D1' :subchart.minTimeframe" 
                        custom-tfs-disabled="setup.engine == 'Stockpicker' || setup.engine == 'Single-asset cloud strategy'"/>
                </div>
            </div>
        </div>
    </fieldset>

    <fieldset class="sq-fieldset">
        <legend tsq>Test parameters</legend>

        <div class="row row-smaller">
            <div class="col-sm-5 chart-setup-box-1">
                <label class="sqn-label precision-label" tsq>Precision</label>
                <div class="sqn-input sqn-select precision-input">
                    <span ng-bind="getPrecisionLabel()"></span>
                    <select ng-model="setup.precision" ng-options="item.value as (item.name | tsq) for item in precisions"
                        onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)"></select>
                </div>
            </div>
            <div class="col-sm-7 chart-setup-box-2">
                <label class="sqn-label precision-label" tsq>Commisions & swap</label>
                <label class="sqn-label precision-label comission-label-value" ng-bind="getCommisionSwapLabel()"></label>
                <i class="fa fa-cog" ng-click="showOtherSettingsPopup()"></i>
            </div>
        </div>

        <div class="row row-smaller">
            <div class="col-sm-5 chart-setup-box-1">
                <label ng-hide="setup.engine == 'Stockpicker' || setup.engine == 'Single-asset cloud strategy'" class="sqn-label" ng-show="setup.precision != 4" tsq>Spread</label>
                <div ng-hide="setup.engine == 'Stockpicker' || setup.engine == 'Single-asset cloud strategy'" class="sqn-spinner setup-input setup-input-small" ng-show="setup.precision != 4">
                    <input type="text" class="sqn-input" min="0" step="1" ng-model="setup.spread"
                        onFocus="sqnSpinnerFocus(this)" onBlur="sqnSpinnerBlur(this)" />
                    <div class="sqn-spinner-btns">
                        <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                        <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                    </div>
                </div>
                <label ng-hide="setup.engine == 'Stockpicker' || setup.engine == 'Single-asset cloud strategy'" class="pipsLabel"  ng-show="setup.precision != 4" tsq>pips</label>
            </div>
            <div class="col-xs-4 chart-setup-box-2"
                ng-class="{'col-sm-7': setup.engine == 'Tradestation' || setup.engine == 'MultiCharts'}">
                <label class="sqn-label">{{setup.engine == 'Stockpicker' || setup.engine == 'Single-asset cloud strategy' ? ('Slippage / Spread' | tsq) : ('Slippage' | tsq)}}</label>
                <div class="sqn-spinner setup-input setup-input-small slippage-spinner">
                    <input type="text" class="sqn-input" min="0" step="1" ng-model="setup.slippage"
                        onFocus="sqnSpinnerFocus(this)" onBlur="sqnSpinnerBlur(this)" />
                    <div class="sqn-spinner-btns">
                        <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                        <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                    </div>
                </div>
                <label ng-hide="setup.engine == 'Tradestation' || setup.engine == 'MultiCharts'" class="pipsLabel" tsq>pips</label>
                <tsq ng-show="setup.engine == 'Tradestation' || setup.engine == 'MultiCharts'">$ per trade</tsq>
            </div>
            <div class="col-sm-3 chart-setup-box-2"
                ng-hide="setup.engine == 'Tradestation' || setup.engine == 'MultiCharts'">
                <label class="sqn-label" tsq>Min. distance</label>
                <div class="sqn-spinner setup-input setup-input-small">
                    <input type="text" class="sqn-input" min="0" step="1" ng-model="setup.minDistance"
                        onFocus="sqnSpinnerFocus(this)" onBlur="sqnSpinnerBlur(this)" />
                    <div class="sqn-spinner-btns">
                        <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                        <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                    </div>
                </div>
                <label class="pipsLabel" tsq>pips</label>
            </div>
        </div>
    </fieldset>

    <!-- Modal window-->
    <div class="modal centered other-params-popup" id="{{::otherParamsPopupId}}" tabindex="-1" role="dialog"
        aria-labelledby="myModalLabel-{{::otherParamsPopupId}}">
        <div class="modal-dialog modal-smaller" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button id="buttonTimes-23b" type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                    <h4 class="modal-title" id="myModalLabel" tsq>Commission & swap settings</h4>
                </div>
                <div class="modal-body">
                    <multi-property-grid ng-if="commPGInstance" instance="commPGInstance" on-change="onCommPGChange" options="commissionMethods" after-init="afterPGInit()" title="Commission" ng-disabled="ngDisabled"/>
                    <hr>

                    <swap-settings sq-model="setup.swap" />
                </div>
                <div class="modal-footer">
                    <a data-dismiss="modal" class="btn-only-close" tsq>Close</a>
                </div>
            </div>
        </div>
    </div>

</form>
</script>
<script type="text/ng-template" id="../app/directives/chartSetupSimple/views/chartSetupSimple.html">
<form name="editSetupForm" class="form-horizontal chart-setup" role="form">
    <div class="row row-smaller">
        <div class="col-sm-6 chart-setup-box-1">
            <div class="setup-input-symbol-wrapper">
                <label class="sqn-label" ng-bind="setup.subcharts.length > 0 ? 'Main chart' : 'Symbol'"></label>
                <sq-data-box sq-model="setup.symbol" class="setup-input" engine="setup.engine"/>
            </div>
        </div>
        <div class="col-sm-6 chart-setup-box-2 switch">
            <label class="sqn-label">
                <tsq>Timeframe</tsq>
                <div class="sq-checkbox">
                    <input type="checkbox" ng-model="setup.useCustomTF" ng-change="settingsChanged()"
                        id="cc-config-tf-{{::id}}" />
                    <label class="sqn-label" for="cc-config-tf-{{::id}}"></label>
                </div>
            </label>
            <timeframe-picker timeframe="setup.timeframe" class="timeframe" min-timeframe="setup.minTimeframe"
                main-chart="true" ng-disabled="!setup.useCustomTF" />
        </div>
    </div>

    <div class="row row-smaller" ng-show="detailedConfig">
        <div class="col-sm-6 chart-setup-box-1 switch">
            <label class="sqn-label">
                <tsq>Start day</tsq>
                <div class="sq-checkbox">
                    <input type="checkbox" ng-model="setup.useCustomDates" ng-change="settingsChanged(setup.useCustomDates, 'date')"
                        id="cc-config-startday-{{::id}}" />
                    <label class="sqn-label" for="cc-config-startday-{{::id}}"></label>
                </div>
            </label>
            <date-picker label="" date="setup.dateFrom" min-date="symbolDateRangeFrom" max-date="symbolDateRangeTo"
                format="yyyy.mm.dd" on-date-change="onDateFromChange(date)"
                ng-disabled="ngDisabled || !setup.useCustomDates" force-date-change="forceDateChange" class="no-label"
                ng-class="{'disabled': ngDisabled || !setup.useCustomDates}" />
        </div>
        <div class="col-sm-6 chart-setup-box-2">
            <date-picker label="{{ 'End day' | tsq}}" date="setup.dateTo" min-date="symbolDateRangeFrom"
                max-date="symbolDateRangeTo" format="yyyy.mm.dd" on-date-change="onDateToChange(date)"
                ng-disabled="ngDisabled || !setup.useCustomDates" force-date-change="forceDateChange"
                ng-class="{'disabled': ngDisabled || !setup.useCustomDates}" />
        </div>
    </div>

    <div class="row row-smaller chart-setup-available-data" ng-show="detailedConfig">
        <div class="col-sm-6 chart-setup-box-1">
            <div class="sq-input">
                <label tsq>Available from</label>
                <label ng-bind="symbolDateRangeFrom"></label>
            </div>
        </div>
        <div class="col-sm-6 chart-setup-box-2">
            <div class="sq-input">
                <label tsq>to</label>
                <label ng-bind="symbolDateRangeTo"></label>
            </div>
        </div>
    </div>

    <div class="clearfix "></div>

    <div class="row row-smaller chart-setup-available-data" ng-show="detailedConfig">
        <div class="col-sm-6 chart-setup-box-1">
        </div>
        <div class="col-sm-6 chart-setup-box-2">
            <label class="sqn-label"></label>
            <button id="buttonResetDates-24a" class="btn btn-normal btn-default btn-thin" ng-click="resetDates()"
                ng-disabled="ngDisabled || !setup.useCustomDates" tsq>Reset dates</button>
        </div>
    </div>

    <div class="clearfix"></div>

    <div ng-if="setup.subcharts.length > 0" style="display: flex;">
        <div style="display: inline-block">
            <legend style="margin-bottom: 0px" ng-show="detailedConfig">Sub Charts</legend>
        </div>
        <div style="display: inline-block; float: none;" class="sq-checkbox">
            <input type="checkbox" ng-model="setup.useCustomSubCharts" ng-change="settingsChanged(setup.useCustomSubCharts, 'subcharts')"
                id="cc-config-subchart-{{::id}}" />
            <label class="sqn-label" for="cc-config-subchart-{{::id}}"></label>
        </div>
    </div>

    <div class="subcharts " ng-if="setup.subcharts.length> 0">
        <div class="row row-smaller" ng-repeat="subchart in setup.subcharts">
            <div class="col-sm-6 chart-setup-box-1">
                <div class="setup-input-symbol-wrapper">
                    <label class="sqn-label">
                        <tsq>Subchart</tsq> {{($index + 1)}}
                    </label>
                    <sq-data-box disabled="!setup.useCustomSubCharts" sq-model="subchart.symbol" class="setup-input" engine="'MetaTrader4'"/>
                </div>
            </div>
            <div class="col-sm-6 chart-setup-box-2">
                <label class="sqn-label" tsq>Timeframe</label>
                <timeframe-picker ng-disabled="!setup.useCustomSubCharts" timeframe="subchart.timeframe" class="timeframe" min-timeframe="subchart.minTimeframe"
                    main-data-option="true" />
            </div>
        </div>
    </div>

    <legend ng-show="detailedConfig">Test parameters</legend>

    <div class="row row-smaller" ng-show="detailedConfig">
        <div class="col-sm-6 chart-setup-box-1 switch">
            <label class="sqn-label precision-label">
                <tsq>Precision</tsq>
                <div class="sq-checkbox">
                    <input type="checkbox" ng-model="setup.useCustomPrecision" ng-change="settingsChanged(setup.useCustomPrecision)"
                        id="cc-config-precision-{{::id}}" />
                    <label class="sqn-label" for="cc-config-precision-{{::id}}"></label>
                </div>
            </label>
            <div class="sqn-input sqn-select precision-input" ng-class="{'disabled': !setup.useCustomPrecision}">
                <span ng-bind="getPrecisionLabel()"></span>
                <select ng-model="setup.precision" ng-options="item.value as (item.name | tsq) for item in precisions"
                    onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)"
                    ng-disabled="!setup.useCustomPrecision"></select>
            </div>
        </div>

        <div class="col-sm-6 chart-setup-box-2 switch"
            ng-hide="setup.engine == 'Tradestation' || setup.engine == 'MultiCharts'">
            <label class="sqn-label">
                <tsq>Min. distance</tsq>
                <div class="sq-checkbox">
                    <input type="checkbox" ng-model="setup.useCustomDistance" ng-change="settingsChanged(setup.useCustomDistance)"
                        id="cc-config-mindist-{{::id}}" />
                    <label class="sqn-label" for="cc-config-mindist-{{::id}}"></label>
                </div>
            </label>
            <div class="sqn-spinner setup-input setup-input-small">
                <input type="text" class="sqn-input" min="0" step="1" ng-model="setup.minDistance"
                    onFocus="sqnSpinnerFocus(this)" onBlur="sqnSpinnerBlur(this)"
                    ng-disabled="!setup.useCustomDistance" />
                <div class="sqn-spinner-btns">
                    <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                    <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                </div>
            </div>
        </div>
    </div>

    <div class="row row-smaller" ng-show="detailedConfig">
        <div class="col-sm-6 chart-setup-box-1 switch">
            <label class="sqn-label" ng-show="setup.precision != 4">
                <tsq>Spread</tsq>
                <div class="sq-checkbox">
                    <input type="checkbox" ng-model="setup.useCustomSpread" ng-change="settingsChanged(setup.useCustomSpread, 'spread')"
                        id="cc-config-spread-{{::id}}" />
                    <label class="sqn-label" for="cc-config-spread-{{::id}}"></label>
                </div>
            </label>
            <div class="sqn-spinner setup-input setup-input-small" ng-show="setup.precision != 4">
                <input type="text" class="sqn-input" min="0" step="1" ng-model="setup.spread"
                    onFocus="sqnSpinnerFocus(this)" onBlur="sqnSpinnerBlur(this)"
                    ng-disabled="!setup.useCustomSpread" />
                <div class="sqn-spinner-btns">
                    <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                    <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                </div>
            </div>
        </div>
        <div class="col-sm-6 chart-setup-box-2 switch">
            <label class="sqn-label">
                {{setup.engine == 'Stockpicker' || setup.engine == 'Single-asset cloud strategy' ? ('Slippage / Spread' | tsq) : ('Slippage' | tsq)}}
                <div class="sq-checkbox">
                    <input type="checkbox" ng-model="setup.useCustomSlippage" ng-change="settingsChanged(setup.useCustomSlippage, 'slippage')"
                        id="cc-config-slippage-{{::id}}" />
                    <label class="sqn-label" for="cc-config-slippage-{{::id}}"></label>
                </div>
            </label>
            <div class="sqn-spinner setup-input setup-input-small"
                ng-class="{'slippage-spinner-small':setup.engine == 'Tradestation' || setup.engine == 'MultiCharts'}">
                <input type="text" class="sqn-input" min="0" step="1" ng-model="setup.slippage"
                    onFocus="sqnSpinnerFocus(this)" onBlur="sqnSpinnerBlur(this)"
                    ng-disabled="!setup.useCustomSlippage" />
                <div class="sqn-spinner-btns">
                    <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                    <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                </div>
            </div>
            <tsq ng-show="setup.engine == 'Tradestation' || setup.engine == 'MultiCharts'">$ per trade</tsq>
        </div>
    </div>

    <div class="row row-smaller">
        <div class="col-sm-6 chart-setup-box-1 switch">
            <label class="sqn-label">
                <tsq>Commission</tsq>
                <div class="sq-checkbox">
                    <input type="checkbox" ng-model="setup.useCustomCommission" ng-change="settingsChanged(setup.useCustomCommission)"
                        id="cc-config-commission-{{::id}}" />
                    <label class="sqn-label" for="cc-config-commission-{{::id}}"></label>
                </div>
            </label>
            <label class="sqn-label precision-label" ng-bind="getCommissionLabel()"></label>
            <i class="fa fa-cog" ng-click="showCommissionsPopup()" ng-show="setup.useCustomCommission"></i>
        </div>
        <div class="col-sm-6 chart-setup-box-2 switch">
            <label class="sqn-label">
                <tsq>Swap</tsq>
                <div class="sq-checkbox">
                    <input type="checkbox" ng-model="setup.useCustomSwap" ng-change="settingsChanged(setup.useCustomSwap)"
                        id="cc-config-swap-{{::id}}" />
                    <label class="sqn-label" for="cc-config-swap-{{::id}}"></label>
                </div>
            </label>
            <label style="width:auto; margin-left: 0px; margin-right: 5px;" class="sqn-label precision-label" ng-bind="getSwapLabel()"></label>
            <i class="fa fa-cog" ng-click="showSwapPopup()" ng-show="setup.useCustomSwap"></i>
        </div>
    </div>

    
    <div class="row row-smaller">
        <div class="col-sm-6 chart-setup-box-1 switch" ng-show="setup.engine == 'Tradestation' || setup.engine == 'Multicharts'">
            <label class="sqn-label">
                <tsq>Session</tsq>
                <div class="sq-checkbox">
                    <input type="checkbox" ng-model="setup.useCustomSession" ng-change="settingsChanged()"
                        id="cc-config-session-{{::id}}" />
                    <label class="sqn-label" for="cc-config-session-{{::id}}"></label>
                </div>
            </label>
            <div class="sqn-input sqn-select precision-input" ng-class="{'disabled': !setup.useCustomSession}">
                <span ng-bind="setup.session"></span>
                <select ng-model="setup.session" ng-options="session.name as session.name for session in constants.sessions"
                    onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)" ng-change="settingsChanged()"
                    ng-disabled="!setup.useCustomSession"></select>
            </div>
        </div>
    </div>

    <!-- Modal window-->
    <div class="modal centered other-params-popup" id="commissionsPopup-{{::id}}" tabindex="-1" role="dialog"
        aria-labelledby="myModalLabel-commissionsPopup-{{::id}}">
        <div class="modal-dialog modal-smaller" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button id="buttonTimes-24b" type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                    <h4 class="modal-title" id="myModalLabel" tsq>Commission settings</h4>
                </div>
                <div class="modal-body">
                    <multi-property-grid ng-if="commPGInstance" instance="commPGInstance" on-change="onCommPGChange" options="commissionMethods" after-init="afterPGInit()" title="Commission" ng-disabled="ngDisabled"/>
                    <hr>
                </div>
                <div class="modal-footer">
                    <a data-dismiss="modal" class="btn-only-close" tsq>Close</a>
                </div>
            </div>
        </div>
    </div>
    
    <!-- Modal window-->
    <div class="modal centered other-params-popup" id="swapPopup-{{::id}}" tabindex="-1" role="dialog"
        aria-labelledby="myModalLabel-swapPopup-{{::id}}">
        <div class="modal-dialog modal-smaller" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button id="buttonTimes-24c" type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                    <h4 class="modal-title" id="myModalLabel" tsq>Swap settings</h4>
                </div>
                <div class="modal-body">
                    <swap-settings sq-model="setup.swap">
                    <hr>
                </div>
                <div class="modal-footer">
                    <a data-dismiss="modal" class="btn-only-close" tsq>Close</a>
                </div>
            </div>
        </div>
    </div>
</form>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataManagerData/addBrPopup.html">
<div class="modal no-enter" id="brFuturesDataModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document" style="width: 800px">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel" tsq>Add BMF Futures Data</h4>
            </div>
            <div class="modal-body" style="height: auto;">
                <form name="sqFuturesDataForm" class="form-horizontal" role="form" ng-class="{'submitted': errors}">

                    <form-errors errors="errors"></form-errors>
                    <fieldset class="sq-fieldset">
                        <div>
                            <div class="sq-data-help">
                                <tsq>Choose from the found symbols below the ones that you want to add</tsq>
                                <div class="pull-right">
                                    <tsq>Found</tsq>: {{tickers.length}}, <tsq>selected</tsq>: {{tickersSelected}}
                                </div>
                            </div>

                            <div id="brDataGrid" style="height: 280px"></div>
                            <br />

                            <div class="row row-smaller sq-data-line sq-data-details-line">
                                <div class="col-sm-5">
                                    <legend>
                                        <tsq>Data details</tsq>
                                    </legend>
                                    <label class="sqn-label">
                                        <tsq>Name postfix</tsq>
                                    </label>
                                    <input type="text" class="sqn-input" ng-model="brConfig.postfix" />
                                </div>
                                <div class="col-sm-7">
                                    <legend>
                                        <tsq>Bar type</tsq>
                                    </legend>
                                    <div class="radio">
                                        <label class="sq-wradio">
                                            <input type="radio" name="sqFuturesBarType" ng-model="brConfig.barType"
                                                ng-value="barDataTypes.startOfBar" id="optionsRadios1" />
                                            <span class="sq-mark"></span>
                                            <tsq>Timestamp is start of bar time (MetaTrader, Dukascopy, forex
                                                data)</tsq>
                                        </label>
                                    </div>
                                    <div class="radio">
                                        <label class="sq-wradio">
                                            <input type="radio" name="sqFuturesBarType" ng-model="brConfig.barType"
                                                ng-value="barDataTypes.endOfBar" id="optionsRadios2" />
                                            <span class="sq-mark"></span>
                                            <tsq>Timestamp is end of bar time (NinjaTrader, Tradestation,
                                                futures data)</tsq>
                                        </label>
                                    </div>
                                </div>
                            </div>

                            <br />

                            <legend>
                                <tsq>Data timezone</tsq>
                            </legend>

                            <div class="clearfix"></div>

                            <div class="radio">
                                <label class="sq-wradio">
                                    <input type="radio" name="FuturesTimezoneTypeRadio" ng-value="2"
                                        ng-model="brConfig.timezoneType" />
                                    <span class="sq-mark"></span>
                                    <tsq>Exchange (default)</tsq>
                                </label>
                            </div>

                            <div class="radio">
                                <label class="sq-wradio" style="display: inline-block;">
                                    <input type="radio" name="FuturesTimezoneTypeRadio" ng-value="0"
                                        ng-model="brConfig.timezoneType" />
                                    <span class="sq-mark"></span>
                                    <tsq>add fixed shift</tsq>
                                </label>
                                &nbsp;&nbsp;
                                <div class="sqn-spinner" style="width: 100px;">
                                    <input type="text" class="sqn-input" min="-23" step="1" max="23"
                                        ng-model="brConfig.timezoneShift" onFocus="sqnSpinnerFocus(this)"
                                        onBlur="sqnSpinnerBlur(this)" ng-disabled="brConfig.timezoneType!=0" />
                                    <div class="sqn-spinner-btns">
                                        <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                                        <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                                    </div>
                                </div>
                                &nbsp;
                                <tsq>hours</tsq>
                            </div>

                            <div class="radio">
                                <label class="sq-wradio" style="display: inline-block;">
                                    <input type="radio" name="FuturesTimezoneTypeRadio" ng-value="1"
                                        ng-model="brConfig.timezoneType" />
                                    <span class="sq-mark"></span>
                                    <tsq>choose timezone</tsq>
                                </label>
                                &nbsp;&nbsp;
                                <div class="sqn-input sqn-select" style="width: 380px;">
                                    <span ng-bind="getTimezoneLabel()"></span>
                                    <select ng-model="brConfig.timezone"
                                        ng-options="item.value as item.name for item in timezones"
                                        onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)"
                                        onChange="sqnSelectChange(this)" ng-disabled="brConfig.timezoneType!=1"></select>
                                </div>
                            </div>

                        </div>
                    </fieldset>
                </form>
            </div>
            <div class="modal-footer">
                <div class="text-center">
                    <div class="sq-checkbox">
                        <input type="checkbox" ng-model="brConfig.brAgreed">
                        <label ng-click="brConfig.brAgreed=!brConfig.brAgreed" tsq>I confirm that I agree to</label>
                        <a ng-click="$root.showPopup('#futuresDataUsageConditions')" tsq>StrategyQuant Data Usage
                            Conditions</a>
                    </div>
                </div>

                <a data-dismiss="modal" tsq>Close</a>
                <button type="button" class="btn btn-primary" ng-click="onAddBr(sqFuturesDataForm)"
                    ng-show="brTickers.length>0" tsq>Add</button>
            </div>
        </div>
    </div>
</div>

<div ng-include="'../../../plugins/DataSourceSQFuturesData/add/dataUsageConditionsPopup.html'" />
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataManagerData/data.html">
<div class="data-manager-data">
    <div class="data-manager-data-header">
        <div>
            <div class="datamanager-help" ng-bind-html="tab.help | tsq"></div>
            <div class="toolbar">
                <search-filter filter="filter" style="display: inline-block;" filter-id="datamanaget-data-filter" />
                <div class="sqn-input sqn-select">
                    <span ng-bind="getDataSourceLabel()"></span>
                    <select ng-model="filter.dataSource"
                        ng-options="item.value as (item.name | tsq) for item in dataSources"
                        ng-change="filter.onSearch()" onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)"
                        id="datamanager-datasources-select">
                        <option value="" tsq>All data sources</option>
                    </select>
                </div>
                <div class="sqn-input sqn-select">
                    <span ng-bind="getDataTypeLabel()"></span>
                    <select ng-model="filter.dataType"
                        ng-options="item.value as (item.name | tsq) for item in dataTypes" ng-change="filter.onSearch()"
                        onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)" id="datamanager-datatypes-select">
                        <option value="" tsq>All data types</option>
                    </select>
                </div>
                <div ng-if="!isQuantDataManager" class="sqn-input sqn-select">
                    <span ng-bind="getGroupLabel()"></span>
                    <select ng-model="filter.group"
                        ng-options="item.name as (item.name | tsq) for item in groups" ng-change="filter.onSearch()"
                        onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)" id="datamanager-group-select">
                        <option value="" tsq>By stock group - none</option>
                    </select>
                </div>
                <div class="sqn-input sqn-select">
                    <span ng-bind="getBrokerProfileLabel()"></span>
                    <select ng-model="filter.brokerId" ng-options="item.id as (item.name | tsq) for item in brokerProfiles" ng-change="filter.onSearch()"
                     onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)" id="datamanager-data-brokers-select">
                        <option value="" tsq>All broker profiles</option>
                    </select>
                </div>

                <label class="sqn-label">
                    <tsq>Records</tsq>: {{totalRecords}}
                </label>
            </div>
        </div>
    </div>

    <div id="dataGrid" style="overflow: hidden;position:absolute;width:100%;height:100%;"></div>

    <div ng-include="'../../../plugins/DataManagerData/dataDeleteConfirmPopup.html'"></div>
    <div ng-include="'../../../plugins/DataManagerData/dataEdit.html'"></div>
    <div ng-if="!isQuantDataManager" ng-include="'../../../plugins/DataManagerData/addBrPopup.html'"></div>
</div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataManagerData/dataDeleteConfirmPopup.html">
<!-- Modal window-->
<div class="modal" id="dataDeleteConfirmPopup" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
	<div class="modal-dialog" role="document" style="width: 600px;">
		<div class="modal-content">
			<div class="modal-header modal-header-red">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close">
					<span aria-hidden="true">&times;</span>
				</button>
				<h4 class="modal-title" id="myModalLabel" tsq>Delete data</h4>
			</div>
			<div class="modal-body">
				{{dataDeleteConfirmText | tsq}}
			</div>
			<div class="modal-footer">
				<a data-dismiss="modal" tsq>Close</a>
				<button type="button" class="btn btn-primary" ng-click="callAction('clear')" tsq>Clear data</button>
				<button type="button" class="btn btn-primary" ng-click="callAction('deleteconfirm')" tsq>Delete</button>
			</div>
		</div>
	</div>
</div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataManagerData/dataEdit.html">
<!-- Modal Connection details window-->
<div class="modal" id="editSymbolModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
	<div class="modal-dialog" role="document" style="width: 700px;">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close">
					<span aria-hidden="true">&times;</span>
				</button>
				<h4 class="modal-title" id="myModalLabel" tsq>Edit symbol</h4>
			</div>
			<div class="modal-body">
				<form name="editSymbolForm" class="form-horizontal" role="form" ng-class="{'submitted': errors}" style="text-align: left;">

					<form-errors errors="errors"></form-errors>

					<fieldset class="sq-fieldset edit-symbol-settings">
						<legend tsq>Data settings</legend>
						<div class="clearfix">
							<label class="sqn-label" tsq>Data symbol name</label>
							<input type="text" class="sqn-input" ng-model="dataDetails.symbol" ng-hide="true" name="Data symbol name" />
							<input type="text" class="sqn-input symbol-short-input" ng-model="dataDetails.symbolNew" ng-required="true" name="Data symbol name"
							/>
						</div>

						<div class="clearfix symbol-full-row">
							<label class="sqn-label" tsq>Bar type</label>
							<input type="text" class="sqn-input" ng-model="dataDetails.barTypeText" ng-disabled="true" />
						</div>

						<div class="clearfix symbol-full-row">
							<label class="sqn-label" tsq>Timezone</label>
							<input type="text" class="sqn-input" ng-model="dataDetails.timezone" ng-disabled="true" />
						</div>

					</fieldset>

					<instrument-chooser instance="instrumentChooser" help-text="true" ng-disabled="!instrumentEditable" />

				</form>
			</div>
			<div class="modal-footer">
				<a data-dismiss="modal" tsq>Close</a>
				<button type="button" class="btn btn-primary" ng-click="onEditSave(editSymbolForm)" tsq>Save</button>
			</div>
		</div>
	</div>
</div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataManagerHome/home.html">
<div class="qdm-home-container">
	<iframe id="qdm-home-iframe" style="width:100%; height:100%; border:none;"></iframe>
</div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataManagerLog/dataLog.html">
<div class="data-manager-log">
	<div class="data-manager-log-log">
		<div class="datamanager-help" ng-bind-html="tab.help | tsq"></div>
		
		<div class="data-manager-log-buttons">
			<label class="settings-title" tsq>Log</label>
			<a ng-click="clearLog()" class="log-clear-button" tsq>Clear log</a>
		</div>
		<div class="log-container">
			<div class="log-scroll-content" ng-bind-html="totalLog">
			</div>
		</div>
	</div>
</div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataManagerActions/cloneToTimezone/cloneToTimezone.html">
<!-- Modal window-->
<div class="modal" id="cloneToTimezoneModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document" style="width: 600px;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel">
                    <tsq>Clone to Timezone for</tsq> '{{selectedFor}}'
                </h4>
            </div>
            <div class="modal-body" style="height: auto;">
                <form name="cloneToTimezoneForm" class="form-horizontal" role="form" ng-class="{'submitted': errors}"
                    style="text-align: left;">

                    <form-errors errors="errors"></form-errors>

                    <tsq>Clone to Timezone creates a copy of the source data with all times recomputed in a different
                        timezone.</tsq>
                    <br>
                    <tsq>This way you can use one source data to create multiple "clones", each in its own timezone.
                    </tsq>
                    <br>
                    <br>

                    <fieldset class="sq-fieldset">
                        <legend tsq>Data settings</legend>

                        <div>
                            <label class="sqn-label" tsq>Source data symbol name</label>
                            <input type="text" class="sqn-input" ng-model="selectedFor" readonly="1" />
                        </div>
                        <div>
                            <label class="sqn-label" tsq>Cloned data symbol postfix</label>
                            <input type="text" class="sqn-input" ng-model="config.postfix" ng-required="true"
                                name="Cloned data symbol postfix" />
                        </div>
                        <div>
                            <label class="sqn-label" tsq></label>
                            <span class="sq-data-help-small">Constants: {timeframe}, {cloneTime}</span>
                        </div>
                    </fieldset>

                    <fieldset class="sq-fieldset">
                        <legend tsq>Cloned data timezone</legend>

                        <div class="clearfix"></div>

                        <div class="radio">
                            <label class="sq-wradio">
                                <input type="radio" name="TimezoneTypeRadio" ng-value="0"
                                    ng-model="config.cloneTimezoneType" />
                                <span class="sq-mark"></span>
                                <tsq>add fixed shift</tsq>
                            </label>
                            <div class="sqn-spinner">
                                <input type="text" class="sqn-input" min="-23" step="1" max="23"
                                    ng-model="config.cloneTimezoneShift" onFocus="sqnSpinnerFocus(this)"
                                    onBlur="sqnSpinnerBlur(this)" ng-disabled="config.cloneTimezoneType==1" />
                                <div class="sqn-spinner-btns">
                                    <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                                    <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                                </div>
                            </div>
                        </div>


                        <div class="radio">
                            <label class="sq-wradio">
                                <input type="radio" name="TimezoneTypeRadio" ng-value="1"
                                    ng-model="config.cloneTimezoneType" />
                                <span class="sq-mark"></span>
                                <tsq>choose timezone</tsq>
                            </label>
                            <div class="sqn-input sqn-select">
                                <span ng-bind="getCloneTimezoneLabel()"></span>
                                <select ng-model="config.cloneTimezone"
                                    ng-options="item.value as item.name for item in timezones"
                                    onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)"
                                    onChange="sqnSelectChange(this)" ng-disabled="config.cloneTimezoneType==0"></select>
                            </div>
                        </div>

                        <div class="remove-weekends">
                            <label class="sqn-label" for="clone-removeWeekends" tsq>Remove weekends</label>
                            <div class="sq-checkbox" ng-click="config.removeWeekends=!config.removeWeekends"
                                style="display: inline-block;">
                                <input type="checkbox" ng-model="config.removeWeekends" id="clone-removeWeekends">
                                <label>&nbsp;</label>
                            </div>
                        </div>

                    </fieldset>
                </form>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal" tsq>Close</a>
                <button type="button" class="btn btn-primary" ng-click="onCloneToTimezone(cloneToTimezoneForm)"
                    tsq>Proceed</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataManagerActions/exportToCsv/exportToCSV.html">
<!-- Modal window-->
<div class="modal" id="exportDataModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel">
                    <tsq>Export data for</tsq> '{{selectedFor}}'
                </h4>
            </div>
            <div class="modal-body" style="height: auto;">
                <form name="exportDataForm" class="form-horizontal" role="form" ng-class="{'submitted': errors}"
                    style="text-align: left;">

                    <form-errors errors="errors"></form-errors>

                    <fieldset class="sq-fieldset">
                        <legend tsq>Choose data range to export</legend>

                        <date-range instance="dateRange" on-date-change="onDateRangeChange" />
                        
                        <br>
                        <legend tsq>Select timeframe, session and target timezone</legend>
                        <div class="row">
                            <div class="col-xs-6">
                                <label class="sqn-label timeframe-label" tsq>Timeframe</label>
                                <timeframe-picker timeframe="dataDetails.timeframe" min-timeframe="minTimeframe"
                                    enable-tick-tf="true" />
                            </div>
                            <div class="col-xs-6">
                                <label class="sqn-label timeframe-label" tsq>Session</label>
                                <div class="sqn-input sqn-select">
                                    <span ng-bind="dataDetails.session"></span>
                                    <select class="sq-select" ng-model="dataDetails.session"
                                        ng-options="session.name as session.name for session in availableSessions"
                                        onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)"></select>
                                </div>
                            </div>
                        </div>

                        <div class="row" style="margin-top:16px;">
                           <div class="col-xs-12">
                                <label class="sqn-label timeframe-label" tsq>Timezone</label>
                                <div class="sqn-input sqn-select">
                                    <span ng-bind="getTimezoneLabel()"></span>
                                    <select ng-model="dataDetails.targetTimezone"
                                        ng-options="item.value as item.name for item in timezones"
                                        onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)"
                                        onChange="sqnSelectChange(this)"></select>
                                </div>
                            </div> 
                        </div>     
                        <div class="row">
                            <div class="col-xs-12 desc">
                                Select a target time zone for the export. Choose Original to keep all timestamps unchanged.
                             </div>
                        </div>     
                    </fieldset>

                    <fieldset class="sq-fieldset csv-export-file-format">
                        <legend tsq>File format</legend>

                        <div class="row form-group">
                            <div class="col-xs-12">
                                <label class="sqn-label" tsq>Predefined</label>
                                <div class="sqn-input sqn-select sqn-select-predefined-format">
                                    <span ng-bind="dataDetails.fileFormat"></span>
                                    <select ng-model="dataDetails.fileFormat"
                                        ng-options="item.name as item.name for item in fileFormats"
                                        onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)"
                                        ng-change="onFileFormatChange()" readonly="1"></select>
                                </div>
                                <div class="line pull-right format-actions" style="display: inline-flex;">
                                    <button class="btn btn-default" ng-disabled="dataDetails.predefined"
                                        ng-click="onSaveFormat()" tsq>Save</button>
                                    <button class="btn btn-default" ng-click="onSaveFormatAs()">Save as</button>
                                    <button class="btn btn-default"
                                        ng-disabled="dataDetails.predefined || dataDetails.fileFormat == 'Custom'"
                                        ng-click="onDeleteFormat()" tsq>Delete</button>
                                </div>
                            </div>
                        </div>

                        <div>
                            <label class="sqn-label" for="include-header" tsq>Include header</label>
                            <div class="sq-checkbox" ng-click="onIncludeHeaderChange()" style="display: inline-block;">
                                <input type="checkbox" ng-model="dataDetails.includeHeader" id="include-header">
                                <label>&nbsp;</label>
                            </div>
                        </div>

                        <div>
                            <label class="sqn-label file-label" tsq>Header</label>
                            <input type="text" class="sqn-input format-input" ng-model="dataDetails.header"
                                ng-disabled="!dataDetails.includeHeader" ng-change="setCustomFormat()" />

                            <div class="dropdown">
                                <button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown">
                                    <i class="fa fa-plus-circle" aria-hidden="true"></i></button>
                                <ul class="dropdown-menu">
                                    <li ng-repeat="item in items"><a
                                            ng-click="onHeaderItemChange(item)">{{item.name}}</a></li>
                                </ul>
                            </div>

                        </div>

                        <div>
                            <label class="sqn-label file-label" tsq>Format</label>
                            <input type="text" class="sqn-input format-input" ng-model="dataDetails.format"
                                ng-change="setCustomFormat()" />

                            <div class="dropdown">
                                <button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown">
                                    <i class="fa fa-plus-circle" aria-hidden="true"></i></button>
                                <ul class="dropdown-menu">
                                    <li ng-repeat="item in items"><a
                                            ng-click="onFormatItemChange(item)">{{item.name}}</a></li>
                                </ul>
                            </div>

                        </div>

                    </fieldset>

                    <fieldset class="sq-fieldset">
                        <legend tsq>Select target</legend>

                        <div class="select-directory">
                            <label class="sqn-label file-label" tsq>Directory</label>
                            <input type="text" class="sqn-input" ng-model="dataDetails.directory" readonly="1" />
                            <a ng-click="openExportFilePicker();" tsq>Browse</a>
                        </div>

                        <div>
                            <label class="sqn-label file-label" tsq>File prefix</label>
                            <input type="text" class="sqn-input" ng-model="dataDetails.filePrefix" />
                            <span ng-bind="targetFile.name"></span>
                        </div>

                    </fieldset>

                </form>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal" tsq>Close</a>
                <button type="button" class="btn btn-primary" ng-click="onExport()" tsq>Export</button>
            </div>
        </div>
    </div>

    <div ng-include="'../../../plugins/DataManagerActions/exportToCsv/newFormatPopup.html'"></div>
</div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataManagerActions/exportToCsv/newFormatPopup.html">
<!-- Modal Connection details window-->
<div class="modal" id="exportToCsvNewFormatModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel">New file format</h4>
            </div>
            <div class="modal-body">
                <form name="addSymbolForm" class="form-horizontal" role="form" style="text-align: left;">

                    <fieldset class="sq-fieldset">
                        <div class="sq-legend-help">Enter the name of the new file format</div>

                        <div class="row">
                            <div class="col-xs-6">
                                <label class="sqn-label">Name
                                    <input type="text" class="sqn-input" ng-model="dataDetails.newFormatName" />
                                </label>
                            </div>
                        </div>
                    </fieldset>

                </form>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal">Close</a>
                <button type="button" class="btn btn-primary" ng-click="saveNewFileFormat()">Save</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataManagerActions/exportToMT4/exportToMT4.html">
<!-- Modal window-->
<div class="modal" id="exportToMT4Modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document" style="width: 800px; height: auto">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel">
                    <tsq>Export to MetaTrader 4 FXT and HST for</tsq> '{{dataDetails.symbol}}'
                </h4>
            </div>
            <div class="modal-body" style="height: auto;">
                <form name="exportToMT4Form" class="form-horizontal" role="form" ng-class="{'submitted': errors}"
                    style="text-align: left;">

                    <form-errors errors="errors"></form-errors>

                    <fieldset class="sq-fieldset">
                        <legend tsq>Choose data range to export</legend>

                        <date-range instance="dateRange" on-date-change="onDateRangeChange" />

                        <div class="data-export-time-help" tsq>
                            Please note that MT4 has file-size limit of maximum 4GB, it won't be able to process bigger
                            data files.
                        </div>

                    </fieldset>

                    <fieldset class="sq-fieldset data-export-output-folder">
                        <legend tsq>Output folder</legend>

                        <div class="clearfix"></div>

                        <div class="folder-line">
                            <label class="sqn-label" tsq>MT4 Installation</label>
                            <input type="text" class="sqn-input" ng-model="config.appPath"
                                ng-attr-title="{{config.appPath}}" readonly="1" />
                            <a href ng-click="onSelectInstallFolder();" tsq>Select</a>
                        </div>

                        <div class="folder-line">
                            <label class="sqn-label" tsq>MT4 Data Folder</label>
                            <input type="text" class="sqn-input" ng-model="config.dataPath"
                                ng-attr-title="{{config.dataPath}}" readonly="1" />
                            <a href ng-click="onSelectDataFolder();" tsq>Select</a>
                        </div>

                        <div class="folder-line">
                            <label class="sqn-label" tsq>Server name</label>
                            <div class="sqn-input sqn-select">
                                <span ng-bind="config.serverName"></span>
                                <select ng-model="config.serverName" ng-options="item for item in serverNames"
                                    onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)"></select>
                            </div>
                        </div>
                    </fieldset>

                    <fieldset class="sq-fieldset data-export-properties">

                        <div class="row">
                            <div class="col-sm-6">
                                <label class="sqn-label" tsq>Symbol</label>
                                <div class="sqn-input sqn-select">
                                    <span ng-bind="config.specSymbol"></span>
                                    <select ng-model="config.specSymbol"
                                        ng-options="item.symbol as item.symbol for item in symbols"
                                        ng-change="onSymbolChange()" onFocus="sqnSelectFocus(this)"
                                        onBlur="sqnSelectBlur(this)"></select>
                                </div>
                            </div>

                            <div class="col-sm-6">
                                <label class="sqn-label" tsq>Name in MT4</label>
                                <input type="text" class="sqn-input data-export-mt4-name" ng-model="config.mt4Symbol" />
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-sm-6">
                                <label class="sqn-label" tsq>Timeframe</label>
                                <div class="sqn-input sqn-select">
                                    <span ng-bind="config.timeframe"></span>
                                    <select ng-model="config.timeframe" ng-options="item for item in timeframes"
                                        onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)"></select>
                                </div>
                                <div>
                                    <label class="sqn-label" tsq>Target timezone</label>
                                    <div class="sqn-input sqn-select">
                                        <span ng-bind="getTimezoneLabel()"></span>
                                        <select ng-model="config.targetTimezone"
                                            ng-options="item.value as item.name for item in timezones"
                                            onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)"
                                            onChange="sqnSelectChange(this)"></select>
                                    </div>
                                    <div class="small">Select a target time zone for the export. Choose Original to keep all timestamps unchanged.</div>                                
                                </div>                                          
                            </div>
                            <div class="col-sm-6">
                                <label class="sqn-label" tsq>Encoding</label>
                                <input type="text" list="mt4_list_encodings" class="sqn-input data-export-mt4-name" ng-model="config.encoding" />
                                <datalist id="mt4_list_encodings">
                                    <option value="windows-1250">
                                    <option value="windows-1252">
                                    <option value="ISO-8859-1">
                                    <option value="ISO-8859-2">
                                </datalist>

                                <div class="small">If your symbol names contain special characters, specify the export encoding (usually windows-1252). Leave the field empty to use the system default.</div>
                            </div>                            
                        </div>

                        <div class="row">
                            <div class="col-sm-6">
                                <label class="sqn-label" tsq>Export mode</label>
                                <div class="sqn-input sqn-select">
                                    <span ng-bind="config.exportMode"></span>
                                    <select ng-model="config.exportMode" ng-options="item for item in exportModes"
                                        onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)"></select>
                                </div>
                            </div>                   
                            <div class="col-sm-6"></div>
                        </div>                                                              

                        <div class="mt4-properties">
                            <a href ng-click="onSelectConfigFile();" tsq>Load other MT4 data specification file</a>
                            <br />
                            <br />

                            <div class="row row-smaller">
                                <div ng-repeat="property in properties" class="col-sm-4">
                                    <span ng-bind="property.name" /></span>: <span ng-bind="property.value" />
                                </div>
                            </div>
                        </div>

                        <label class="warning" tsq>Warning - there was a change in MT4 from Build 8xx up - it does not
                            respect the spread setting from FXT file, instead it applies spread configured in Strategy
                            Tester.</label>
                    </fieldset>

                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default sqn-btn-help" ng-click="onHelp()" tsq>Help</button>
                <a data-dismiss="modal" tsq>Close</a>
                <button type="button" class="btn btn-primary" ng-click="onStartExport(exportToMT4Form)" tsq>Start
                    export</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataManagerActions/exportToMT5/exportToMT5.html">
<!-- Modal window-->
<div class="modal" id="exportToMT5Modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel">
                    <tsq>Export to MT5 data (99% history quality) for</tsq> '{{dataDetails.symbol}}'
                </h4>
            </div>
            <div class="modal-body" style="height: auto;">
                <form name="exportDataForm" class="form-horizontal" role="form" ng-class="{'submitted': errors}" style="text-align: left;">

                    <form-errors errors="errors"></form-errors>

                    <fieldset class="sq-fieldset">
                        <legend tsq>Choose data range to export</legend>

                        <date-range instance="dateRange" on-date-change="onDateRangeChange" />
                    </fieldset>

                    <fieldset class="sq-fieldset">
                        <legend tsq>Select timeframe to export</legend>
                        <div class="clearfix"></div>
                        <div class="row">
                            <div class="col-xs-12">
                                <div class="radio">
                                    <label class="sq-wradio"><input type="radio" name="timeframe" value="{{::TF.TICK}}"
                                            ng-model="dataDetails.timeframe" ng-disabled="!isTickData" /><span class="sq-mark"></span>
                                        <tsq>Tick data</tsq>
                                    </label>
                                </div>
                                <div class="radio">
                                    <label class="sq-wradio"><input type="radio" name="timeframe" value="{{::TF.M1}}"
                                            ng-model="dataDetails.timeframe" /><span class="sq-mark"></span>
                                        <tsq>M1 data</tsq>
                                    </label>
                                </div>

                                <div class="timeframeM1Settings">
                                    <div class="radio">
                                        <label class="sq-wradio"><input type="radio" name="spread" value="points" ng-model="dataDetails.spread" /><span class="sq-mark"></span>
                                            <tsq>Use fixed spread</tsq>
                                            <div class="sqn-spinner">
                                                <input type="text" class="sqn-input" min="0" max="1000" step="1"
                                                    ng-model="dataDetails.spreadPoints" onFocus="sqnSpinnerFocus(this)"
                                                    onBlur="sqnSpinnerBlur(this)" />
                                                <div class="sqn-spinner-btns">
                                                    <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                                                    <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                                                </div>
                                            </div>
                                            <tsq>points</tsq>
                                        </label>
                                    </div>

                                    <div class="radio">
                                        <label class="sq-wradio"><input type="radio" name="spread" value="pips" ng-model="dataDetails.spread" /><span class="sq-mark"></span>
                                            <tsq>Use fixed spread</tsq>
                                            <div class="sqn-spinner">
                                                <input type="text" class="sqn-input" min="0" max="1000" step="1"
                                                    ng-model="dataDetails.spreadValue" onFocus="sqnSpinnerFocus(this)"
                                                    onBlur="sqnSpinnerBlur(this)" />
                                                <div class="sqn-spinner-btns">
                                                    <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                                                    <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                                                </div>
                                            </div>
                                            <tsq>pips</tsq>
                                        </label>
                                    </div>

                                    <div class="radio">
                                        <label class="sq-wradio"><input type="radio" name="spread" value="real"
                                                ng-model="dataDetails.spread" ng-disabled="!isTickData" /><span
                                                class="sq-mark"></span>
                                            <tsq>User real spread from Tick data</tsq>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row" style="margin-top:24px;">
                           <div class="col-xs-12">
                                <label class="sqn-label" tsq>Target timezone</label>
                                <div class="sqn-input sqn-select">
                                    <span ng-bind="getTimezoneLabel()"></span>
                                    <select ng-model="dataDetails.targetTimezone"
                                        ng-options="item.value as item.name for item in timezones"
                                        onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)"
                                        onChange="sqnSelectChange(this)"></select>
                                </div>
                            </div> 
                        </div>   
                        <div class="row">
                            <div class="col-xs-12 desc">
                                Select a target time zone for the export. Choose Original to keep all timestamps unchanged.
                             </div>
                        </div>                                                                
                    </fieldset>

                    <fieldset class="sq-fieldset">
                        <legend tsq>Select target</legend>

                        <div class="select-directory">
                            <label class="sqn-label file-label" tsq>Directory</label>&nbsp;
                            <input type="text" class="sqn-input" ng-model="dataDetails.directory" readonly="1" />
                            <a ng-click="openExportFilePicker();" tsq>Browse</a>
                        </div>

                        <div>
                            <label class="sqn-label file-label" tsq>File name</label>
                            <input type="text" class="sqn-input" ng-model="dataDetails.fileName" />
                            .csv
                        </div>

                    </fieldset>

                </form>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal" tsq>Close</a>
                <button type="button" class="btn btn-primary" ng-click="onExport()" tsq>Export</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataManagerActions/review/review.html">
<!-- Modal window-->
<div class="modal modal-autoheight" id="reviewDataModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
	<div class="modal-dialog" role="document" style="width: 800px;">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close">
					<span aria-hidden="true">&times;</span>
				</button>
				<h4 class="modal-title" id="myModalLabel"><tsq>View data for</tsq> '{{dataDetails.symbol}}'</h4>
			</div>
			<div class="modal-body" style="height: 600px;">
				<form name="reviewDataForm" class="form-horizontal" role="form" ng-class="{'submitted': errors}">

					<form-errors errors="errors"></form-errors>

					<fieldset class="sq-fieldset">
						<div class="row">
							<div class="col-sm-6">
								<label class="sqn-label" tsq>Symbol name</label>
								<input type="text" class="sqn-input" ng-model="dataDetails.symbol" disabled />
							</div>
							<div class="col-sm-6">
								<label class="sqn-label" tsq>Instrument</label>
								<input type="text" class="sqn-input" ng-model="dataDetails.instrument" disabled />
							</div>
						</div>
						<div class="row">
							<div class="col-sm-6">
								<label class="sqn-label" tsq>Date from</label>
								<input type="text" class="sqn-input" ng-model="dataDetails.dateFrom" disabled />
							</div>
							<div class="col-sm-6">
								<label class="sqn-label" tsq>Date to</label>
								<input type="text" class="sqn-input" ng-model="dataDetails.dateTo" disabled />
							</div>
						</div>
						<div class="row">
							<div class="col-sm-6">
								<label class="sqn-label" tsq>Imported timeframe</label>
								<input type="text" class="sqn-input" ng-model="importedTimeframe" disabled />
							</div>
							<div class="col-sm-6">
								<label class="sqn-label" tsq>Imported records</label>
								<input type="text" class="sqn-input" ng-model="dataDetails.totalRecords" disabled />
							</div>
						</div>

						<div class="row">
							<div class="col-sm-6">
								<label class="sqn-label" tsq>View timeframe</label>
								<div class="sqn-input sqn-select">
									<span>{{timeframe}}</span>
									<select ng-model="timeframe" ng-options="item.type as item.type for item in timeframes" onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)"
									 ng-change="onSettingsChange()"></select>
								</div>
							</div>
							<div class="col-sm-6">
								<label class="sqn-label" tsq>Session</label>
								<div class="sqn-input sqn-select">
									<span>{{session}}</span>
									<select ng-model="session" ng-options="item.name as item.name for item in sessions" onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)"
									 ng-change="onSettingsChange()"></select>
								</div>
							</div>
						</div>
					</fieldset>

					<quant-tabs id="reviewTabs" instance='mainTabs' translate-headers="true" />
				</form>
			</div>
			<div class="modal-footer">
				<div ng-show="dataEditing.changed" style="color:red;float:left;" tsq>Data contains unsaved changes</div>			
				<a data-dismiss="modal" tsq>Close</a>
                <button type="button" class="btn btn-primary" ng-click="onSave()" tsq>Save</button>
			</div>

		</div>
	</div>
</div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataManagerBroker/views/addBrokerModal.html">
<!-- Modal Add broker window-->
<div class="modal" id="addBrokerModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document" style="width:700px; height:auto;">
        <div class="modal-content" style="width:100%; height:100%;">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel"><span ng-bind="currentAction | tsq"></span> <tsq>Broker profile</tsq></h4>
            </div>
            <div class="modal-body">
                <form name="addBrokerForm" class="form-horizontal" role="form" ng-class="{'submitted': errors}" style="text-align: left;">
                    <fieldset class="sq-fieldset">
                        <form-errors errors="errors"></form-errors> 

                        <div class="row sq-data-line">
                            <div class="col-sm-3">
                                <label class="sqn-label" tsq="">Broker profile name *</label>
                            </div>
                            <div class="col-sm-9">
                                <input type="text" class="sqn-input ng-pristine ng-untouched ng-empty ng-invalid ng-invalid-required" 
                                ng-model="currentBroker.name" ng-required="true" name="Broker profil name" required="required">
                            </div>
                        </div>
                        <div class="row sq-data-line">
                            <div class="col-sm-3">
                                <label class="sqn-label" tsq="">Description</label>
                            </div>
                            <div class="col-sm-9">
                                <textarea ng-model="currentBroker.desc" style="height: 200px; width: 100%" class="ng-pristine ng-untouched ng-valid ng-empty"></textarea>
                            </div>
                        </div>                 
                    </fieldset>  
                    <fieldset class="sq-fieldset" ng-show="stockPickerVisible">
                        <legend tsq>Stockpicker functionality</legend>
                        <div class="row sq-data-line">
                            <div class="col-sm-12">
                                <div class="sq-checkbox">
                                    <input ng-disabled="!canSetSpUse" type="checkbox" ng-model="currentBroker.stockPickerUse" id="stockPickerUse"/>
                                    <label for="stockPickerUse" style="text-align: left; margin: 1rem;">
                                        <tsq>Use this broker profile for filtering stocks</tsq><br>
                                        <tsq>You will be able to edit available list using grid action</tsq>
                                    </label>
                                </div>
                            </div>
                        </div>
                    </fieldset>

                    <fieldset class="sq-fieldset">
                        <legend tsq>Metatrader 4/5 functionality</legend>
                            <div class="row sq-data-line">
                                <div class="col-sm-12">
                                    <div class="sq-checkbox">
                                        <input ng-disabled="!canSetMtUse" type="checkbox" ng-model="currentBroker.mtUse" id="mtUse"/>
                                        <label for="mtUse" style="text-align: left; margin: 1rem;">
                                            <tsq>Use this broker profile for instruments setting for MT4/5</tsq>
                                        </label>
                                    </div>      
                                </div>  
                            </div>   
                            
                            <div class="row sq-data-line">
                                <div class="col-sm-3">
                                    <label class="sqn-label" tsq="">Broker timezone</label>
                                </div>
                                <div class="col-sm-9">                                  
                                    <div class="sqn-input sqn-select" style="width: 380px;"  ng-class="{'disabled': !canSetTimezone}">
                                        <span ng-bind="getTimezoneLabel()"></span>
                                        <select ng-model="currentBroker.mtTimezone"
                                            ng-options="item.value as item.name for item in timezones"
                                            ng-disabled="!canSetTimezone"
                                            onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)"
                                            onChange="sqnSelectChange(this)"></select>
                                    </div>
                                </div>
                            </div>  
                            
                            <div class="row sq-data-line">
                                <div class="col-sm-3">
                                    <label class="sqn-label" tsq="">Instrument/data postfix</label>
                                </div>
                                <div class="col-sm-9">
                                    <input type="text" class="sqn-input" 
                                    ng-model="currentBroker.postfix" ng-required="currentBroker.mtUse" name="Instrument / data postfix">
                                </div>
                            </div>

                    </fieldset>                  
                </form>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal" tsq>Close</a>
                <button type="button" class="btn btn-primary" ng-click="onSaveBroker(addBrokerForm)" tsq>Save</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataManagerBroker/views/brokers.html">
<div class="data-manager-data">
    <div class="datamanager-help" >
        <span ng-show="!isQuantDataManager" ng-bind-html="tab.help | tsq"></span>
        <span ng-show="isQuantDataManager" ng-bind-html="tab.helpQDM | tsq"></span>
        <span><a ng-click="openHelp()" tsq>Learn more</a></span>
    </div>

	<div id="brokersGrid" style="overflow: hidden;position:absolute;width:100%;height:100%;"></div>
</div>

<div ng-include="'../../../plugins/DataManagerBroker/views/addBrokerModal.html'"></div>
<div ng-include="'../../../plugins/DataManagerBroker/views/editStocksModal.html'"></div>
<div ng-include="'../../../plugins/DataManagerBroker/views/importInstrumentsModal.html'"></div>
<div ng-include="'../../../plugins/DataManagerBroker/views/importSessionsModal.html'"></div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataManagerBroker/views/editStocksModal.html">
<!-- Modal Add basket window-->
<div class="modal" id="editBrokerStocksModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document" style="width:700px; height:auto;">
        <div class="modal-content" style="width:100%; height:100%;">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                        aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">Edit stocks {{currentBroker.name}}</h4>
            </div>
            <div class="modal-body">
                <form name="editBrokerStocksForm" class="form-horizontal" role="form" ng-class="{'submitted': errors}"
                    style="text-align: left;">
                    <fieldset class="sq-fieldset">
                        <form-errors errors="errors"></form-errors>
                        <div class="row">
                            <div class="col-sm-12">
                                Use the textarea below to define the individual stocks for broker, separated by
                                lines.
                                <br>
                                Example:
                                <br>
                                <pre>
AAPL
TSLA
AMZN
                                </pre>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-12 text-right">
                                <button ng-click="onImport()">Import from file</button>
                                <button ng-click="onExport()">Export to file</button>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-12 text-right">
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-12">
                                <textarea ng-model="currentBroker.stocks" style="height: 400px; width: 100%"
                                    ></textarea>
                            </div>
                        </div>
                    </fieldset>
                </form>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal" tsq>Close</a>
                <button type="button" class="btn btn-primary" ng-click="onEditBrokerStocks(editBrokerStocksForm)" tsq>Save</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataManagerBroker/views/importInstrumentsModal.html">
<!-- Modal window-->
<div class="modal dataImport" id="importInstrumentsModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content" style="width: 730px">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel">
                    <tsq>Instruments import from XML</tsq>
                </h4>
            </div>
            <div class="modal-body">
                <form name="importDataForm" class="form-horizontal" role="form" ng-class="{'submitted': errors}" style="text-align: left;">

                    <form-errors errors="errors"></form-errors>

                    <fieldset class="sq-fieldset">
                        <legend tsq>Choose file</legend>

                        <div class="row form-group">
                            <div class="col-xs-12 file-input">
                                <label class="sqn-label" tsq>Data file</label>
                                <input type="text" class="sqn-input" ng-model="dataDetails.importFile" readonly="1"
                                    ng-required="true" name="Data file" />
                                <a class="browse-button" ng-click="openImportFilePicker();" tsq>Browse</a>
                            </div>
                        </div>
                        <div class="row form-group">
                            <div class="col-xs-12 timezone-input">
                                <label class="sqn-label" tsq>Broker profile</label>
                                <div class="sqn-input sqn-select">
                                    <span ng-bind="getBrokerProfileLabel()"></span>
                                    <select ng-model="dataDetails.broker" ng-options="item.id as item.name for item in mtBrokerProfiles" onFocus="sqnSelectFocus(this)"
                                        onBlur="sqnSelectBlur(this)"  ng-change="onImportBrokerChange()"
                                        ></select>
                                </div>  
                            </div>
                        </div>
                        <div class="row form-group">
                            <div class="col-xs-12 file-input">
                                <label class="sqn-label" tsq="">Postfix</label>
                                <div>
                                    <input type="text" class="sqn-input" 
                                    ng-model="dataDetails.postfix" name="data postfix">
                                </div>
                            </div>
                        </div>
                    </fieldset>

                    <fieldset class="sq-fieldset">
                        <legend tsq>Select instruments to import</legend>    

                        <div class="row form-group">
                            <div class="col-xs-12">
                                <div id="importInstrumentsGrid" class="gridbox_compressed" style="height: 205px" />
                            </div>
                        </div>

                    </fieldset>
                </form>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal" tsq>Close</a>
                <button type="button" class="btn btn-primary" ng-click="onStartImport(importDataForm)" tsq>Start Import</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataManagerBroker/views/importSessionsModal.html">
<!-- Modal window-->
<div class="modal dataImport" id="importSessionsModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content" style="width: 730px">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel">
                    <tsq>Session import from XML</tsq>
                </h4>
            </div>
            <div class="modal-body">
                <form name="importDataForm" class="form-horizontal" role="form" ng-class="{'submitted': errors}" style="text-align: left;">

                    <form-errors errors="errors"></form-errors>

                    <fieldset class="sq-fieldset">
                        <legend tsq>Choose file</legend>

                        <div class="row form-group">
                            <div class="col-xs-12 file-input">
                                <label class="sqn-label" tsq>Data file</label>
                                <input type="text" class="sqn-input" ng-model="dataDetails.importFile" readonly="1"
                                    ng-required="true" name="Data file" />
                                <a class="browse-button" ng-click="openImportFilePicker();" tsq>Browse</a>
                            </div>
                        </div>
                        <div class="row form-group">
                            <div class="col-xs-12 timezone-input">
                                <label class="sqn-label" tsq>Broker profile</label>
                                <div class="sqn-input sqn-select">
                                    <span ng-bind="getBrokerProfileLabel()"></span>
                                    <select ng-model="dataDetails.broker" ng-options="item.id as item.name for item in mtBrokerProfiles" onFocus="sqnSelectFocus(this)"
                                        onBlur="sqnSelectBlur(this)" ng-change="onImportBrokerChange()"
                                        ></select>
                                </div>  
                            </div>
                        </div>
                        <div class="row form-group">
                            <div class="col-xs-12 file-input">
                                <label class="sqn-label" tsq="">Postfix</label>
                                <div>
                                    <input type="text" class="sqn-input" 
                                    ng-model="dataDetails.postfix" name="data postfix">
                                </div>
                            </div>
                        </div>
                    </fieldset>

                    <fieldset class="sq-fieldset">
                        <legend tsq>Select sessions to import</legend>    

                        <div class="row form-group">
                            <div class="col-xs-12">
                                <div id="importSessionsGrid" class="gridbox_compressed" style="height: 205px" />
                            </div>
                        </div>

                    </fieldset>
                </form>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal" tsq>Close</a>
                <button type="button" class="btn btn-primary" ng-click="onStartImport(importDataForm)" tsq>Start Import</button>
            </div>
        </div>
    </div>
</div>

</script>
<script type="text/ng-template" id="../../../internal/plugins/DataManagerHome/offline/index.html">
<!DOCTYPE html>
<html lang="cs">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>QDM Offline - Documentation</title>
  
  <!-- Google Fonts -->
  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&family=Open+Sans:wght@300;400;600&display=swap" rel="stylesheet">
  
  <!-- Material Symbols -->
  <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" rel="stylesheet">
  
  <!-- Styles -->
  <link rel="stylesheet" href="./assets/styles.css2">
  <script src="./assets/config.js"></script>
  <script src="./assets/theme-switcher.js"></script>
</head>
<body>
  <main class="offline-main">
    <div class="container">
      
      <!-- Header -->
      <header class="offline-header">
        <img src="./img/qdm-logo.png" alt="QuantDataManager" class="qdm-logo">
        <h1 class="offline-title">You are offline - cannot load QDM Home page</h1>
        <p class="offline-subtitle">Access documentation and FAQ below</p>
      </header>

      <!-- Documentation Links Grid -->
      <section class="doc-links-section">
        <div class="doc-grid">
          <a href="#" onclick="openLink('https://strategyquant.com/doc/quantdatamanager/import-history-data-metatrader-4/'); return false;" class="doc-card">
            <div class="doc-icon">
              <span class="material-symbols-outlined">download</span>
            </div>
            <h3 class="doc-title">Import History Data MT4</h3>
            <p class="doc-description">Learn how to import historical data to MetaTrader 4</p>
          </a>
          <a href="#" onclick="openLink('https://strategyquant.com/doc/quantdatamanager/test-strategy-metatrader-4-tick-precision/'); return false;" class="doc-card">
            <div class="doc-icon">
              <span class="material-symbols-outlined">speed</span>
            </div>
            <h3 class="doc-title">Test Strategy MT4</h3>
            <p class="doc-description">Test your strategy in MT4 with tick precision</p>
          </a>
          <a href="#" onclick="openLink('https://strategyquant.com/doc/quantdatamanager/how-to-import-data-to-metatrader-5/'); return false;" class="doc-card">
            <div class="doc-icon">
              <span class="material-symbols-outlined">input</span>
            </div>
            <h3 class="doc-title">Import Data to MT5</h3>
            <p class="doc-description">How to import data to MetaTrader 5</p>
          </a>
          <a href="#" onclick="openLink('https://strategyquant.com/doc/quantdatamanager/how-to-export-data-from-metatrader-5/'); return false;" class="doc-card">
            <div class="doc-icon">
              <span class="material-symbols-outlined">output</span>
            </div>
            <h3 class="doc-title">Export Data from MT5</h3>
            <p class="doc-description">How to export data from MetaTrader 5</p>
          </a>
          <a href="#" onclick="openLink('https://strategyquant.com/doc/cli-command-line/introduction-to-cli/'); return false;" class="doc-card">
            <div class="doc-icon">
              <span class="material-symbols-outlined">terminal</span>
            </div>
            <h3 class="doc-title">Introduction to CLI</h3>
            <p class="doc-description">What is CLI and how to use it</p>
          </a>
          <a href="#" onclick="openLink('https://strategyquant.com/doc/quantdatamanager/'); return false;" class="doc-card">
            <div class="doc-icon">
              <span class="material-symbols-outlined">menu_book</span>
            </div>
            <h3 class="doc-title">Full Documentation</h3>
            <p class="doc-description">Browse complete QDM documentation</p>
          </a>
        </div>
      </section>

      <!-- FAQ Section -->
      <section class="faq-section">
        <div class="faq-header">
          <h2 class="section-title">Frequently Asked Questions</h2>
          <p class="section-subtitle">Have a different question about Quant Data Manager? Get in touch with one of our specialists.</p>
        </div>
        
        <div class="faq-list">
          
          <div class="faq-item">
            <button class="faq-question" data-faq="1">
              <span class="faq-question-text">Is the data provided for free? What is the data source?</span>
              <span class="material-symbols-outlined faq-icon">expand_more</span>
            </button>
            <div class="faq-answer">
              <p>High quality tick data for forex and CFDs are provided for free by Dukascopy (available directly in app) and by several other providers.

QuantDataManager downloads these data more conveniently, and – in case of Pro version – also much faster.
With Pro version you are not paying for the data (they are downloadable for free), only for more convenient or faster way of downloading them.</p>
            </div>
          </div>
          <div class="faq-item">
            <button class="faq-question" data-faq="2">
              <span class="faq-question-text">What does Verified downloads * mean for paid version?</span>
              <span class="material-symbols-outlined faq-icon">expand_more</span>
            </button>
            <div class="faq-answer">
              <p>Verified downloads mean that the data downloaded by QDM Pro are verified - they are exactly the same as provided by the data provider - for example Dukascopy. So you will be not affected by unstable Internet connection, source server down, etc.

Note - it does NOT mean that the data will not have gaps - if the data source has gaps, so will the downloaded data. But they will not have additional gaps caused by unstable connection while data download.</p>
            </div>
          </div>
          <div class="faq-item">
            <button class="faq-question" data-faq="3">
              <span class="faq-question-text">Can QuantDataManager download data for stocks, commodities, crypto?</span>
              <span class="material-symbols-outlined faq-icon">expand_more</span>
            </button>
            <div class="faq-answer">
              <p>QuantDataManager supports multiple data sources, including the ones for stocks and crypto. Commodity data are paid, there is no free source available.</p>
            </div>
          </div>
          <div class="faq-item">
            <button class="faq-question" data-faq="4">
              <span class="faq-question-text">Can I get a refund of my order?</span>
              <span class="material-symbols-outlined faq-icon">expand_more</span>
            </button>
            <div class="faq-answer">
              <p>Sorry, you can try QuantDataManager in a free version, so no refunds are given.</p>
            </div>
          </div>
          <div class="faq-item">
            <button class="faq-question" data-faq="5">
              <span class="faq-question-text">Can I use QuantDataManager on multiple computers?</span>
              <span class="material-symbols-outlined faq-icon">expand_more</span>
            </button>
            <div class="faq-answer">
              <p>QDM licenses can't work on more computers simultaneously, however you can change computers anytime after a license reset: either at the Dashboard of your client area after logging on our website (limit of 5 resets) or then by contacting us.

If you need to use the app on more computers, you need to buy more licenses.</p>
            </div>
          </div>
          <div class="faq-item">
            <button class="faq-question" data-faq="6">
              <span class="faq-question-text">How can I activate Pro version?</span>
              <span class="material-symbols-outlined faq-icon">expand_more</span>
            </button>
            <div class="faq-answer">
              <p>You will get your license by email after purchase.

Then you need to open QuantDataManger and click the link in footer -> Update your license.

Insert your license code and update.</p>
            </div>
          </div>
          <div class="faq-item">
            <button class="faq-question" data-faq="7">
              <span class="faq-question-text">How I can transfer tick data from QuantDataManager to MetaTrader?</span>
              <span class="material-symbols-outlined faq-icon">expand_more</span>
            </button>
            <div class="faq-answer">
              <p>QuantDataManager now allows you to export special FXT & HST files for MetaTrader 4 that allow you to test your strategies in MT4 with the highest possible modeling quality.

Please check the documentation for QDM at: https://strategyquant.com/doc/quantdatamanager/</p>
            </div>
          </div>
        </div>
      </section>

      <!-- Footer -->
      <footer class="simple-footer">
        <p>
          Need help? Check our 
          <a href="#" onclick="openLink('https://strategyquant.com/doc/quantdatamanager/'); return false;">documentation</a>
          or 
          <a href="#" onclick="openLink('https://strategyquant.com/contactus/'); return false;">contact us</a>.
        </p>
      </footer>

    </div>
  </main>

  <!-- FAQ Accordion Script -->
  <script>
    document.addEventListener('DOMContentLoaded', () => {
      const faqButtons = document.querySelectorAll('.faq-question');
      
      faqButtons.forEach(button => {
        button.addEventListener('click', () => {
          const item = button.parentElement;
          const isActive = item.classList.contains('active');
          
          // Close all other items
          document.querySelectorAll('.faq-item').forEach(i => {
            i.classList.remove('active');
          });
          
          // Toggle current item
          if (!isActive) {
            item.classList.add('active');
          }
        });
      });
    });
  </script>
</body>
</html>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataManagerInstruments/views/addInstrumentPopup.html">
<!-- Modal Add instrument window-->
<div class="modal" id="addInstrumentModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document" style="width:700px; height:auto;">
        <div class="modal-content" style="width:100%; height:100%;">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel"><span ng-bind="currentAction | tsq"></span> <tsq>instrument</tsq></h4>
            </div>
            <div class="modal-body">
                <form name="addInstrumentForm" class="form-horizontal" role="form" ng-class="{'submitted': errors}" style="text-align: left;">
                    
                    <form-errors errors="errors"></form-errors> 

					<instrument-details instrument="newInstrument" current-action="currentAction" commission-settings="!isQuantDataManager" />

                </form>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal" tsq>Close</a>
                <button type="button" class="btn btn-primary" ng-click="onSaveInstrument(addInstrumentForm)" tsq>Save</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataManagerInstruments/views/instruments.html">
<div class="data-manager-data">
	<div class="datamanager-help" ng-bind-html="tab.help | tsq"></div>

	<div class="toolbar">
		<search-filter filter="filter" style="display:inline-block;" filter-id="datamanaget-instruments-filter" />
		<div class="sqn-input sqn-select">
			<span ng-bind="getDataTypeLabel()"></span>
			<select ng-model="filter.dataType" ng-options="item.value as (item.name | tsq) for item in dataTypes" ng-change="filter.onSearch()"
			 onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)" id="datamanager-instruments-datatypes-select">
				<option value="" tsq>All data types</option>
			</select>
		</div>
		<div class="sqn-input sqn-select">
			<span ng-bind="getBrokerProfileLabel()"></span>
			<select ng-model="filter.brokerId" ng-options="item.id as (item.name | tsq) for item in brokerProfiles" ng-change="filter.onSearch()" onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)" id="datamanager-instruments-brokers-select">
				<option value="" tsq>All broker profiles</option>
			</select>
		</div>
	</div>

	<div id="instrumentsGrid" style="overflow: hidden;position:absolute;width:100%;height:100%;"></div>

</div>

<div ng-include="'../../../plugins/DataManagerInstruments/views/addInstrumentPopup.html'"></div>
<div ng-include="'../../../plugins/DataManagerInstruments/views/massEditInstrumentPopup.html'"></div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataManagerInstruments/views/massEditInstrumentPopup.html">
<!-- Modal Add instrument window-->
<div class="modal" id="massEditInstrumentModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document" style="width:700px; height:auto;">
        <div class="modal-content" style="width:100%; height:100%;">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel"><span ng-bind="currentAction | tsq"></span> <tsq>instrument</tsq></h4>
            </div>
            <div class="modal-body">
                <form name="addInstrumentForm" class="form-horizontal" role="form" ng-class="{'submitted': errors}" style="text-align: left;">
                    
                    <form-errors errors="errors"></form-errors> 

					<instrument-details mass-edit="true" instrument="newInstrument" current-action="currentAction" commission-settings="!isQuantDataManager" />

                </form>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal" tsq>Close</a>
                <button type="button" class="btn btn-primary" ng-click="onMassSaveInstrument(massEditInstrumentModal)" tsq>Save</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataManagerSessions/views/sessionElementPopup.html">
<div class="modal" id="sessionElementModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel">
                    <span ng-bind="elementAction"></span>
                    <tsq>session</tsq>
                </h4>
            </div>
            <div class="modal-body">
                <form name="addAliasForm" class="form-horizontal" role="form" style="text-align: left;">
                    <fieldset class="sq-fieldset">
                        <legend tsq>Session</legend>
                        <div class="line" style="display: inline-flex; margin-top: -10px;">
                            <label class="sqn-label" tsq>Start day</label>
                            <div class="sqn-input sqn-select">
                                <span ng-bind="element.startDay"></span>
                                <select ng-model="element.startDay" ng-options="item for item in days" onFocus="sqnSelectFocus(this)"
                                    onBlur="sqnSelectBlur(this)" onChange="sqnSelectChange(this)"></select>
                            </div>
                            <time-spinner min="0" max="86340" step="120" sq-model="element.startTime" not-convert="true"></time-spinner>
                            <label class="sqn-label" tsq>End day</label>
                            <div class="sqn-input sqn-select">
                                <span ng-bind="element.endDay"></span>
                                <select ng-model="element.endDay" ng-options="item for item in days" onFocus="sqnSelectFocus(this)"
                                    onBlur="sqnSelectBlur(this)" onChange="sqnSelectChange(this)"></select>
                            </div>
                            <time-spinner min="0" max="86340" step="120" sq-model="element.endTime" not-convert="true"></time-spinner>
                        </div>
                        <div class="sq-checkbox">
                            <input type="checkbox" ng-model="element.eod" id="eodCheck">
                            <label for="eodCheck">
                                <tsq>Session End Means EOD</tsq>
                            </label>
                        </div>
                    </fieldset>
                </form>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal" tsq>Close</a>
                <button type="button" class="btn btn-primary" ng-click="onSaveElement()" tsq>Save</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataManagerSessions/views/sessionTemplatePopup.html">
<div class="modal" id="sessionTemplateModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document" style="width: 620px;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel">
                    <span ng-bind="templateAction"></span>
                    <tsq>session template</tsq>
                </h4>
            </div>
            <div class="modal-body">
                <form name="addAliasForm" class="form-horizontal" role="form" style="text-align: left;">
                    <div class="line" style="display: inline-flex;">
                        <label class="control-label">
                            <tsq>Session name</tsq>&nbsp;&nbsp;
                        </label>
                        <input type="text" class="sqn-input" ng-model="template.name" ng-disabled="templateAction == 'Edit'"
                            id="add-session-name" /><label ng-show="templateAction == 'Add'" class="control-label">{{brokerProfile.postfix}}</label>&nbsp;&nbsp;&nbsp;

                        <label class="sqn-label" tsq>Broker profile *</label>
                        <div class="sqn-input sqn-select" ng-class="{'disabled': currentAction == 'Edit'}">
                            <span ng-bind="getBrokerProfileLabelInEdit()"></span>
                            <select ng-model="template.broker" ng-options="item.id as item.name for item in brokerProfiles" onFocus="sqnSelectFocus(this)"
                                onBlur="sqnSelectBlur(this)" ng-disabled="templateAction == 'Edit'"
                                ng-change="onBrokerChange()"
                                ></select>
                        </div>                            
                    </div>
                    <br />
                    <br />

                    <fieldset class="sq-fieldset">
                        <legend tsq>Sessions</legend>

                        <div class="row">
                            <div class="col-xs-9" style="padding-right: 0px;">
                                <div id="elementsGrid" style="width: 100%; height: 250px;" />
                            </div>
                            <div class="col-xs-3" style="text-align: center; padding-top: 30px;">
                                <button class="btn btn-default" id="add-sessions-add" ng-click="onAddElement()" style="width: 100%; margin-bottom: 8px;"
                                    tsq>Add</button>
                                <button class="btn btn-default" id="add-sessions-addmonfri" ng-click="onAddElementMonFri()"
                                    style="width: 100%; margin-bottom: 8px;" tsq>Add Mon-Fri</button>
                                <button class="btn btn-default" id="add-sessions-edit" ng-click="onEditElement()" style="width: 100%; margin-bottom: 8px;"
                                    tsq>Edit</button>
                                <button class="btn btn-default" id="add-sessions-remove" ng-click="onRemoveElement()"
                                    style="width: 100%;" tsq>Remove</button>
                            </div>
                        </div>

                        <div class="row">
                            <label class="control-label" style="margin-left: 30px;" tsq>Note: Session times are based
                                on exchange</label>
                        </div>
                    </fieldset>
                </form>
            </div>
            <div class="modal-footer">
                <a ng-click="onCloseTemplate()" tsq>Close</a>
                <button type="button" class="btn btn-primary" ng-click="onSaveTemplate()" tsq>Save</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataManagerSessions/views/sessions.html">
<div class="data-manager-data">
	<div class="datamanager-help" ng-bind-html="tab.help | tsq"></div>

	<div class="toolbar">
		<search-filter filter="filter" style="display:inline-block;" filter-id="datamanager-sessions-filter" />
		<div ng-if="!isQuantDataManager" class="sqn-input sqn-select">
			<span ng-bind="getBrokerProfileLabel()"></span>
			<select ng-model="filter.brokerId" ng-options="item.id as (item.name | tsq) for item in brokerProfiles" ng-change="filter.onSearch()"
			 onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)" id="datamanager-sessions-brokers-select">
				<option value="" tsq>All broker profiles</option>
			</select>
		</div>
	</div>
	<div id="sessionsGrid" style="overflow: hidden;position:absolute;width:100%;height:100%;"></div>

</div>

<div ng-include="'../../../plugins/DataManagerSessions/views/sessionElementPopup.html'"></div>
<div ng-include="'../../../plugins/DataManagerSessions/views/sessionTemplatePopup.html'"></div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataSourceCrypto/add/addPopup.html">
<!-- Modal window-->
<div class="modal modal-autoheight" id="cryptoAddModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel">{{title}}</h4>
            </div>
            <div class="modal-body" style="height: auto;">
                <fieldset class="sq-fieldset">
                    <div class="flex">
                        <legend tsq>Choose from available data</legend>

                        <div class="crypto-filter">
                            <search-filter filter="filter" style="display: inline-block;" />
                        </div>

                        <div class="crypto-grid-wrapper">
                            <div id="cryptoDataGrid"></div>
                        </div>


                        <div class="crypto-data-postfix crypto-data-timeframe">
                            <label tsq>Timeframe</label>
                            <div>
                                <div class="sqn-input sqn-select">
                                    <span ng-bind="dataDetails.timeframe"></span>
                                    <select ng-model="dataDetails.timeframe" ng-options="item for item in timeframes"
                                        onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)"></select>
                                </div>
                            </div>
                        </div>

                        <div class="crypto-data-postfix">
                            <label tsq>Data postfix</label>
                            <div>
                                <input type="text" class="sqn-input" ng-model="dataDetails.postfix" />
                                <label tsq>This postfix will be optionally added to the data names created</label>
                            </div>
                        </div>
                    </div>
                </fieldset>
            </div>
            <div class="modal-footer">
                <free-data-disclaimer confirmed="dataDetails.disclaimerConfirmed" datasource="{{dataDetails.exchange}}"/>

                <a data-dismiss="modal" tsq>Close</a>
                <button type="button" class="btn btn-primary" ng-click="onSave()" tsq>Save</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataSourceCrypto/import/importPopup.html">
<!-- Modal window-->
<div class="modal" id="cryptoImportModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel">
                    <tsq>Download crypto data for</tsq> {{selectedFor}}
                </h4>
            </div>
            <div class="modal-body" style="height: auto;">
                <form class="form-horizontal" role="form">

                    <fieldset class="sq-fieldset">
                        <legend tsq>Choose data range to download</legend>

                        <date-range instance="dateRange" sqclass="crypto-download" on-date-change="onDateRangeChange" />

                    </fieldset>

                    <fieldset class="sq-fieldset">
                        <legend tsq>Redownload options</legend>

                        <div class="row radios">
                            <div class="col-xs-6">
                                <div class="radio">
                                    <label class="sq-wradio">
                                        <input type="radio" name="ImportOptionsRadios" ng-model="newImport.overwrite"
                                            value="false" id="crypto-download-addonly" />
                                        <span class="sq-mark"></span>
                                        <tsq>Add only missing data</tsq>
                                    </label>
                                </div>
                            </div>
                            <div class="col-xs-6">
                                <div class="radio">
                                    <label class="sq-wradio">
                                        <input type="radio" name="ImportOptionsRadios" ng-model="newImport.overwrite"
                                            value="true" id="crypto-download-overwrite" />
                                        <span class="sq-mark"></span>
                                        <tsq>Overwrite existing data</tsq>
                                    </label>
                                </div>
                            </div>
                        </div>
                    </fieldset>
                </form>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal" tsq>Close</a>
                <button type="button" class="btn btn-primary" ng-click="onStartImport()" tsq>Start download</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataSourceDarwinex/add/addPopup.html">
<div class="modal modal-autoheight" id="darwinexAddModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel" tsq>Add Darwinex data</h4>
            </div>
            <div class="modal-body" style="height: auto;">
                <fieldset class="sq-fieldset">
                    <div class="flex">
                        <legend tsq>Choose from available data</legend>

                        <div class="darwinex-filter">
                            <search-filter filter="filter" style="display: inline-block;" />
                        </div>

                        <div class="darwinex-grid-wrapper">
                            <div id="darwinexDataGrid"></div>
                        </div>

                        <div class="dukas-data-postfix" style="margin-top:24px">
                            <label tsq>Broker profile *</label>
                            <div>
                                <div class="sqn-input sqn-select">
                                    <span ng-bind="getBrokerProfileLabel()"></span>
                                    <select ng-model="dataDetails.broker" ng-options="item.id as item.name for item in brokerProfiles" 
                                        onFocus="sqnSelectFocus(this)"
                                        onBlur="sqnSelectBlur(this)" 
                                        ng-change="onBrokerChanged()"
                                        ></select>
                                </div>   
                            </div> 
                            <label style="margin-left:50px;" tsq>Data postfix</label>
                            <div>
                                <input type="text" class="sqn-input" ng-model="dataDetails.postfix" />
                                <label tsq>This postfix will be optionally added to the data names created</label>
                            </div>
                        </div>

                    </div>
                </fieldset>
            </div>
            <div class="modal-footer">
                <free-data-disclaimer confirmed="dataDetails.disclaimerConfirmed" datasource="{{'Darwinex' | tsq}}"/>

                <a data-dismiss="modal" tsq>Close</a>
                <button type="button" class="btn btn-primary" ng-click="onSave()" tsq>Save</button>
            </div>
        </div>
    </div>
</div>

<div ng-include="'../../../plugins/DataSourceDarwinex/add/selectInstrumentsPopup.html'"></div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataSourceDarwinex/add/selectInstrumentsPopup.html">
<!-- Modal window-->
<div class="modal modal-autoheight" id="darwinexSelectInstrumentsPopupModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel" tsq>Add Darwinex data - identify instruments</h4>
            </div>
            <div class="modal-body" style="height: auto;">
                <fieldset class="sq-fieldset">
                    <div class="flex">
                        <legend><span tsq>You have chosen broker profile</span>&nbsp;{{dataDetails.brokerName}}</legend>
                        <div tsq>
                            Downloaded data will be recomputed to this broker timezone.
                        </div>
                        <br><br>
                        <legend tsq>Please select corresponding instrument for added data</legend>
                        <div>
                            <span tsq>You should selet corresponding broker profile instrument for every added symbol.
                            If the broker profile instrument is not defined for the symbol, you have two options:</span>
                            <ol>
                                <li tsq>Skip adding the symbol</li>
                                <li tsq>Use SQ Default instrument - in that case particular symbol will use default SQ instrument</li>
                            </ol>
                        </div>
                        <div>
                            <p tsq>Mass action</p>
                            <div><span style="padding-left:16px;" tsq>Set all unconfigured symbols to</span>
                                <button style="position: relative;top: -4px;" type="button" class="btn btn-default" ng-click="onAllDefaultInstrument()" tsq>SQ default instrument</button>
                                <button style="position: relative;top: -4px;" type="button" class="btn btn-default" ng-click="onAllSkipSymbols()" tsq>Skip adding the symbol</button>
                            </div>
                        </div>

                        <div class="dukas-grid-wrapper">
                            <div id="darwinexSymbolsDataGrid" style="height:300px"></div>
                        </div>

                    </div>
                </fieldset>
            </div>
            <div class="modal-footer">                
                <a data-dismiss="modal" tsq>&lt; Back</a>
                <button type="button" class="btn btn-primary" ng-click="onDarwinexSymbolsSave()" tsq>Save</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataSourceDarwinex/disclaimer/darwinexDisclaimerPopup.html">
<!-- Modal window-->
<div class="modal" id="darwinexDisclaimerModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">Darwinex data disclaimer</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" role="form">
                    <fieldset class="sq-fieldset">
                        <h1>Disclaimer</h1>
                        <p>The Darwinex Trading Tools include different financial information. Such data are a result of original and unique methods and technology of information gathering, compilation, analysis and statistical evaluation developed by Darwinex Bank SA. Therefore, such data reflect the current fair value of the respective financial instruments as independently assessed by Darwinex Bank SA and NOT the actual values at a given point in time. If you are looking to obtain actual quotes please contact the respective entities that provide this information.</p>
                        <p>The Darwinex Trading Tools data and/or any other data available as free product from Darwinex Bank's website shall not constitute a forecast of the market value of any instruments at any future point either, and is not an investment advice or recommendation in any form.</p>
                        <p>Anyone using and/or putting free web products including all or parts of the information taken from the Darwinex Trading Tools and/or any other data available as free product from Darwinex Bank's website shall put a clear note to the public that such data are not meant to indicate the actual value at any given point in time but represent a discretionary assessment by Darwinex Bank SA only.</p>
                        <p>The market data assessment system is in constant development and is provided "AS IS", "AS AVAILABLE", "WITH ALL ITS FAULTS" and is offered without any covenants or any express, implied or statutory warranties including (without limitation and qualification) any warranties as to accuracy, functionality, performance, merchantability, quiet enjoyment, system integration, data accuracy or fitness for any particular purpose and any warranties arising from trade usage, course of dealing or course of performance.</p>
                    </fieldset>
                </form>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal">Close</a>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataSourceDarwinex/download/downloadPopup.html">
<div class="modal" id="darwinexDownloadModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel">
                    <tsq>Download Darwinex data for</tsq> {{selectedFor}}
                </h4>
            </div>
            <div class="modal-body" style="height: auto;">
                <form ng-show="fullLicense" class="form-horizontal" role="form">

                    <fieldset class="sq-fieldset">
                        <legend tsq>Choose data range to download</legend>

                        <date-range instance="dateRange" sqclass="darwinex-download" on-date-change="onDateRangeChange" />

                    </fieldset>

                    <fieldset class="sq-fieldset">
                        <legend tsq>Redownload options</legend>

                        <div class="row radios">
                            <div class="col-xs-6">
                                <div class="radio">
                                    <label class="sq-wradio">
                                        <input type="radio" name="DarwinexDownloadRadios" ng-model="newImport.overwrite"
                                            value="false" id="darwinex-download-addonly" />
                                        <span class="sq-mark"></span>
                                        <tsq>Add only missing data</tsq>
                                    </label>
                                </div>
                            </div>
                            <div class="col-xs-6">
                                <div class="radio">
                                    <label class="sq-wradio">
                                        <input type="radio" name="DarwinexDownloadRadios" ng-model="newImport.overwrite"
                                            value="true" id="darwinex-download-overwrite" />
                                        <span class="sq-mark"></span>
                                        <tsq>Overwrite existing data</tsq>
                                    </label>
                                </div>
                            </div>
                        </div>
                    </fieldset>
                </form>

                <div ng-hide="fullLicense" id="full-license-only">
                    <tsq>Darwinex CDN download is available only for users of full license.</tsq><br><br>
                    <button type="button" class="btn btn-primary" ng-click="onUpgradeLicense()" tsq>Upgrade To Pro Version</button>
                </div>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal" tsq>Close</a>
                <button ng-show="fullLicense" type="button" class="btn btn-primary" ng-click="onDownload()" tsq>Start download</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataSourceDarwinex/import/importPopup.html">
<div class="modal" id="darwinexImportModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel" tsq>Import data from Darwinex</h4>
            </div>
            <div class="modal-body">
                <form name="darwinexImportForm" class="form-horizontal" role="form">

                    <form-errors errors="errors"></form-errors>

                    <fieldset class="sq-fieldset">
                        <div class="td-dir-select">
                            <label class="sqn-label" tsq>Darwinex data folder</label>
                            <input type="text" class="sqn-input" ng-model="config.path" readonly="1" ng-required="true" name="Darwinex data folder" />
                            <a href ng-click="onSelect();" tsq>Select</a>
                        </div>

                        <div id="darwinexImportGrid" style="height: 300px;"></div>

                        <div class="dukas-data-postfix">
                            <label tsq>Data postfix</label>
                            <div>
                                <input type="text" class="sqn-input" ng-model="config.postfix" />
                                <label tsq>This postfix will be optionally added to the data names created</label>
                            </div>
                        </div>
                    </fieldset>

                </form>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal" tsq>Close</a>
                <button type="button" class="btn btn-primary" ng-click="onStartImport(darwinexImportForm)" tsq>Start import</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataSourceDukascopy/add/addPopup.html">
<!-- Modal window-->
<div class="modal modal-autoheight" id="dukasAddModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel" tsq>Add Dukascopy data</h4>
            </div>
            <div class="modal-body" style="height: auto;">
                <fieldset class="sq-fieldset">
                    <div class="flex">
                        <legend tsq>Choose from available data</legend>

                        <div class="dukas-filter">

                            <search-filter filter="filter" style="display: inline-block;" />

                            <label class="sqn-label" tsq>Show types</label>
                            <div class="sqn-input sqn-select">
                                <span ng-bind="getCategoryLabel()"></span>
                                <select ng-model="filter.category"
                                    ng-options="item.value as item.name for item in categories"
                                    ng-change="filter.onSearch()" onFocus="sqnSelectFocus(this)"
                                    onBlur="sqnSelectBlur(this)">
                                </select>
                            </div>

                        </div>

                        <div class="dukas-grid-wrapper">
                            <div id="dukasDataGrid"></div>
                        </div>

                        <div class="dukas-data-postfix">
                            <label>
                                <tsq>Data type</tsq>
                            </label>
                            <div class="row radios">
                                <div class="col-xs-3">
                                    <div class="radio">
                                        <label class="sq-wradio">
                                            <input type="radio" name="DukasAddOptionsRadios2"
                                                ng-model="dataDetails.dataType" value="TICK" />
                                            <span class="sq-mark"></span>
                                            <tsq>Tick data</tsq>
                                        </label>
                                    </div>
                                </div>
                                <div class="col-xs-3">
                                    <div class="radio">
                                        <label class="sq-wradio">
                                            <input type="radio" name="DukasAddOptionsRadios2"
                                                ng-model="dataDetails.dataType" value="M1" />
                                            <span class="sq-mark"></span>
                                            <tsq>M1 data</tsq>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div class="dukas-data-postfix">
                            <label tsq>Broker profile *</label>
                            <div>
                                <div class="sqn-input sqn-select">
                                    <span ng-bind="getBrokerProfileLabel()"></span>
                                    <select ng-model="dataDetails.broker" ng-options="item.id as item.name for item in brokerProfiles" 
                                        onFocus="sqnSelectFocus(this)"
                                        onBlur="sqnSelectBlur(this)" 
                                        ng-change="onBrokerChanged()"
                                        ></select>
                                </div>   
                            </div> 

                            <label style="margin-left:50px;" tsq>Data postfix</label>
                            <div>
                                <input type="text" class="sqn-input" ng-model="dataDetails.postfix" />
                                <label tsq>This postfix will be optionally added to the data names created</label>
                            </div>
                        </div>
                    </div>
                </fieldset>
            </div>
            <div class="modal-footer">
                <free-data-disclaimer confirmed="dataDetails.disclaimerConfirmed" datasource="{{'Dukascopy' | tsq}}"/>
                
                <a data-dismiss="modal" tsq>Close</a>
                <button type="button" class="btn btn-primary" ng-click="onSave()" tsq>Save</button>
            </div>
        </div>
    </div>
</div>

<div ng-include="'../../../plugins/DataSourceDukascopy/add/selectInstrumentsPopup.html'"></div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataSourceDukascopy/add/selectInstrumentsPopup.html">
<!-- Modal window-->
<div class="modal modal-autoheight" id="dukasSelectInstrumentsPopupModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel" tsq>Add Dukascopy data - identify instruments</h4>
            </div>
            <div class="modal-body" style="height: auto;">
                <fieldset class="sq-fieldset">
                    <div class="flex">
                        <legend><span tsq>You have chosen broker profile</span>&nbsp;{{dataDetails.brokerName}}</legend>
                        <div tsq>
                            Downloaded data will be recomputed to this broker timezone.
                        </div>
                        <br><br>
                        <legend tsq>Please select corresponding instrument for added data</legend>
                        <div>
                            <span tsq>You should selet corresponding broker profile instrument for every added symbol.
                            If the broker profile instrument is not defined for the symbol, you have two options:</span>
                            <ol>
                                <li tsq>Skip adding the symbol</li>
                                <li tsq>Use SQ Default instrument - in that case particular symbol will use default SQ instrument</li>
                            </ol>
                        </div>

                        <div>
                            <p tsq>Mass action</p>
                            <div><span style="padding-left:16px;" tsq>Set all unconfigured symbols to</span>
                                <button style="position: relative;top: -4px;" type="button" class="btn btn-default" ng-click="onAllDefaultInstrument()" tsq>SQ default instrument</button>
                                <button style="position: relative;top: -4px;" type="button" class="btn btn-default" ng-click="onAllSkipSymbols()" tsq>Skip adding the symbol</button>
                            </div>
                        </div>                        

                        <div class="dukas-grid-wrapper">
                            <div id="dukasSymbolsDataGrid" style="height:300px"></div>
                        </div>

                    </div>
                </fieldset>
            </div>
            <div class="modal-footer">                
                <a data-dismiss="modal" tsq>&lt; Back</a>
                <button type="button" class="btn btn-primary" ng-click="onDukascopySymbolsSave()" tsq>Save</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataSourceDukascopy/disclaimer/cdnDisclaimerPopup.html">
<!-- Modal window-->
<div class="modal not-resize" id="cdnDisclaimerModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">StrategyQuant CDN Data Disclaimer</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" role="form">
                    <fieldset class="sq-fieldset">
                        <h1>Disclaimer</h1>
                        <p>In order to provide faster downloads for its clients StrategyQuant offers pre-packaged Dukascopy data for some of the symbols on its own CDN servers.</p>
                        <p>The data availabe on SQ CDN were created from original Dukascopy data obtained from Dukascopy website. StrategyQuant does not guarantee that the data prepared on its CDN servers exactly match Dukascopy data. </p>
                        <p>The data are provided "AS IS", "AS AVAILABLE", "WITH ALL ITS FAULTS" and is offered without any covenants or any express, implied or statutory warranties including (without limitation and qualification) any warranties as to accuracy, functionality, performance, merchantability, quiet enjoyment, system integration, data accuracy or fitness for any particular purpose and any warranties arising from trade usage, course of dealing or course of performance.</p>
                    </fieldset>
                </form>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal">Close</a>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataSourceDukascopy/disclaimer/disclaimerPopup.html">
<!-- Modal window-->
<div class="modal not-resize" id="dukasDisclaimerModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                        aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">Dukascopy data disclaimer</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" role="form">
                    <fieldset class="sq-fieldset">
                        <h1>Disclaimer</h1>
                        <p>The Dukascopy Trading Tools include different financial information. Such data are a result
                            of original and unique methods and technology of information gathering, compilation,
                            analysis and statistical evaluation developed by Dukascopy Bank SA. Therefore, such data
                            reflect the current fair value of the respective financial instruments as independently
                            assessed by Dukascopy Bank SA and NOT the actual values at a given point in time. If you are
                            looking to obtain actual quotes please contact the respective entities that provide this
                            information.</p>
                        <p>The Dukascopy Trading Tools data and/or any other data available as free product from
                            Dukascopy Bank's website shall not constitute a forecast of the market value of any
                            instruments at any future point either, and is not an investment advice or recommendation in
                            any form.</p>
                        <p>Anyone using and/or putting free web products including all or parts of the information taken
                            from the Dukascopy Trading Tools and/or any other data available as free product from
                            Dukascopy Bank's website shall put a clear note to the public that such data are not meant
                            to indicate the actual value at any given point in time but represent a discretionary
                            assessment by Dukascopy Bank SA only.</p>
                        <p>The market data assessment system is in constant development and is provided "AS IS", "AS
                            AVAILABLE", "WITH ALL ITS FAULTS" and is offered without any covenants or any express,
                            implied or statutory warranties including (without limitation and qualification) any
                            warranties as to accuracy, functionality, performance, merchantability, quiet enjoyment,
                            system integration, data accuracy or fitness for any particular purpose and any warranties
                            arising from trade usage, course of dealing or course of performance.</p>
                    </fieldset>
                </form>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal">Close</a>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataSourceDukascopy/import/cdnDisclaimerPopup.html">
<!-- Modal window-->
<div class="modal not-resize" id="cdnDisclaimerModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel" tsq>StrategyQuant CDN Data Disclaimer</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" role="form">
                    <fieldset class="sq-fieldset">
                        <h1 tsq>Disclaimer</h1>
                        <p tsq>In order to provide faster downloads for its clients StrategyQuant offers pre-packaged Dukascopy data for some of the symbols on its own CDN servers.</p>
                        <p tsq>The data availabe on SQ CDN were created from original Dukascopy data obtained from Dukascopy website. StrategyQuant does not guarantee that the data prepared on its CDN servers exactly match Dukascopy data. </p>
                        <p tsq>The data are provided "AS IS", "AS AVAILABLE", "WITH ALL ITS FAULTS" and is offered without any covenants or any express, implied or statutory warranties including (without limitation and qualification) any warranties as to accuracy, functionality, performance, merchantability, quiet enjoyment, system integration, data accuracy or fitness for any particular purpose and any warranties arising from trade usage, course of dealing or course of performance.</p>
                    </fieldset>
                </form>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal" tsq>Close</a>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataSourceDukascopy/import/importPopup.html">
<!-- Modal window-->
<div class="modal" id="dukasImportModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel">
                    <tsq>Download Dukascopy data for</tsq> {{selectedFor}}
                </h4>
            </div>
            <div class="modal-body" style="height: auto;">
                <form class="form-horizontal" role="form">

                    <fieldset class="sq-fieldset">
                        <legend tsq>Choose data range to download</legend>

                        <date-range instance="dateRange" sqclass="dukascopy-download" on-date-change="onDateRangeChange" />

                    </fieldset>

                    <fieldset class="sq-fieldset">
                        <legend tsq>Redownload options</legend>

                        <div class="row radios">
                            <div class="col-xs-6">
                                <div class="radio">
                                    <label class="sq-wradio">
                                        <input type="radio" name="ImportOptionsRadios" ng-model="newImport.overwrite"
                                            value="false" id="dukascopy-download-addonly" />
                                        <span class="sq-mark"></span>
                                        <tsq>Add
                                            only missing data</tsq>
                                    </label>
                                </div>
                            </div>
                            <div class="col-xs-6">
                                <div class="radio">
                                    <label class="sq-wradio">
                                        <input type="radio" name="ImportOptionsRadios" ng-model="newImport.overwrite"
                                            value="true" id="dukascopy-download-overwrite" />
                                        <span class="sq-mark"></span>
                                        <tsq>Overwrite
                                            existing data</tsq>
                                    </label>
                                </div>
                            </div>
                        </div>
                    </fieldset>

                    <fieldset class="sq-fieldset">
                        <legend tsq>Fast Data Download</legend>

                        <div class="row cdn-part">
                            <div class="col-xs-11">
                                <div class="radio">
                                    <label class="sq-wradio">
                                        <input type="radio" name="DukasFastDownload" value="standard" ng-model="newImport.downloadType" ng-change="settingsChanged()" ng-class="{'checked': newImport.downloadType=='standard'}" />
                                        <span class="sq-mark"></span>
                                        <tsq>Standard download - Dukascopy servers</tsq>
                                    </label>
                                </div>

                                <div ng-show="!cdnAllowed" tsq>Following options are available only for users with full license, not for trial users:</div>

                                <div class="radio">
                                    <label class="sq-wradio">
                                        <input type="radio" name="DukasFastDownload" value="cdn" ng-model="newImport.downloadType" ng-change="settingsChanged()" ng-class="{'checked': newImport.downloadType=='cdn'}" ng-disabled="!cdnAllowed"/>
                                        <span class="sq-mark"></span>
                                        <tsq>Fast download from StrategyQuant CDN (10 x faster download)</tsq><br>
                                        <tsq>If on, Dukascopy data will be downloaded from prepared packages on StrategyQuant CDN servers.</tsq>
                                        <tsq>Please note that pre-prepared packages are available only for part of the data.</tsq>
                                    </label>
                                </div>

                                <div class="radio">
                                    <label class="sq-wradio">
                                        <input type="radio" name="DukasFastDownload" value="cdn-cn" ng-model="newImport.downloadType" ng-change="settingsChanged()" ng-class="{'checked': newImport.downloadType=='cdn-cn'}" ng-disabled="!cdnAllowed" />
                                        <span class="sq-mark"></span>
                                        <tsq>Fast download from Hong Kong server</tsq><br>
                                        <tsq>especially for Asia and China users, it might be more performant than CDN option</tsq>
                                    </label>
                                </div> 
                                <a ng-click="$root.showPopup('#cdnDisclaimerModal')" tsq>StrategyQuant CDN data disclaimer</a>
                            </div>

                            <div class="clearfix"></div>

                            <hr />

                            <div ng-show="displayUpgradeLink" id="full-license-only">
                                <tsq>Fast download is available only in Pro version.</tsq>
                                <tsq>Upgrade your license to Pro version and start downloading data quickly and reliably.</tsq>
                                <br>
                                <button type="button" class="btn btn-primary" ng-click="onUpgradeLicense()" tsq>Upgrade To Pro Version</button>
                            </div>
                        </div>
                    </fieldset>

                </form>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal" tsq>Close</a>
                <button type="button" class="btn btn-primary" ng-click="onStartImport()" tsq>Start download</button>
            </div>
        </div>
    </div>
</div>

<div ng-include="'../../../plugins/DataSourceDukascopy/import/cdnDisclaimerPopup.html'" />
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataSourceFiles/add/addPopup.html">
<!-- Modal Connection details window-->
<div class="modal" id="addSymbolModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel" tsq>Add symbol</h4>
            </div>
            <div class="modal-body">
                <form name="addSymbolForm" class="form-horizontal" role="form" ng-class="{'submitted': errors}" style="text-align: left;">

                    <form-errors errors="errors"></form-errors>

                    <fieldset class="sq-fieldset">
                        <legend>Data settings</legend>
                        <div class="row">
                            <div class="col-xs-6">
                                <label class="sqn-label">
                                    <tsq>Data symbol name</tsq>
                                    <input type="text" class="sqn-input" ng-model="dataDetails.symbol" ng-required="true"
                                        name="Data symbol name" />
                                </label>
                            </div>
                        </div>

                        <legend style="margin-top: 15px" tsq>Data type</legend>
                        <div class="clearfix"></div>
                        <div class="radio">
                            <label class="sq-wradio">
                                <input type="radio" name="optionsRadios" ng-model="dataDetails.barType" ng-value="barDataTypes.startOfBar"
                                    id="optionsRadios1" />
                                <span class="sq-mark"></span>
                                <tsq>Timestamp is start of bar time (MetaTrader, Dukascopy, forex data)</tsq>
                            </label>
                        </div>
                        <div class="radio">
                            <label class="sq-wradio">
                                <input type="radio" name="optionsRadios" ng-model="dataDetails.barType" ng-value="barDataTypes.endOfBar"
                                    id="optionsRadios2" />
                                <span class="sq-mark"></span>
                                <tsq>Timestamp is end of bar time (NinjaTrader, Tradestation, futures data)</tsq>
                            </label>
                        </div>
                    </fieldset>

                    <instrument-chooser instance="instrumentChooser" help-text="true" />

                </form>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal" tsq>Close</a>
                <button type="button" class="btn btn-primary" ng-click="onSave(addSymbolForm)" tsq>Save</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataSourceFiles/appImport/appImportPopup.html">
<!-- Modal Connection details window-->
<div class="modal" id="addAppImportModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div style="width:500px" class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel" tsq>Data import from application</h4>
            </div>
            <div class="modal-body" style="padding-bottom:0px;">
                <form name="appImportForm" class="form-horizontal" role="form" ng-class="{'submitted': errors}"
                    style="text-align: left;">

                    <form-errors errors="errors"></form-errors>

                    <fieldset class="sq-fieldset">
                        <div class="row">
                            <div class="col-sm-4">
                                <label class="sqn-label" tsq>Source data folder</label>
                            </div>
                            <div class="col-sm-8">
                                <input type="text" class="sqn-input" ng-model="config.path" readonly="1" ng-required="true"
                                    name="Source data folder" />
                                <a href ng-click="onSelectFolder();" tsq>Select</a>
                            </div>
                        </div>                     

                        <div class="row">
                            <div class="col-sm-4">
                                <label class="sqn-label" tsq>License</label>
                            </div>
                            <div class="col-sm-8">
                                <input type="text" class="sqn-input" ng-model="config.license" />
                            </div>
                        </div>    
                        <br>
                        <div class="sq-legend-help" style="font-weight: normal" tsq>
                            Use this feature to import existing data from another instance of QuantDataManager or StrategyQuant application. 
                            To proceed, simply enter the folder where your application is installed. 
                            If you wish to also transfer Equity and Futures data, you will need to provide the license number of the installation 
                            from which the data is being imported. 
                            Please ensure that the directory and license details are entered correctly to facilitate a smooth data import process.
                        </div>                        
                    </fieldset>
                </form>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal" tsq>Close</a>
                <button type="button" class="btn btn-primary" ng-click="onSave(appImportForm)" tsq>Save</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataSourceFiles/import/importPopup.html">
<!-- Modal window-->
<div class="modal dataImport" id="importDataModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content" style="width: 730px">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel">
                    <tsq>Data import for</tsq> '{{dataDetails.symbol}}'
                </h4>
            </div>
            <div class="modal-body">
                <form name="importDataForm" class="form-horizontal" role="form" ng-class="{'submitted': errors}" style="text-align: left;">

                    <form-errors errors="errors"></form-errors>

                    <fieldset class="sq-fieldset">
                        <legend tsq>Choose file</legend>

                        <div class="row form-group">
                            <div class="col-xs-12 file-input">
                                <label class="sqn-label" tsq>Data file</label>
                                <input type="text" class="sqn-input" ng-model="dataDetails.importFile" readonly="1"
                                    ng-required="true" name="Data file" />
                                <a class="browse-button" ng-click="openImportFilePicker();" tsq>Browse</a>
                            </div>
                        </div>
                        <div class="row form-group">
                            <div class="col-xs-12 timezone-input">
                                <label class="sqn-label" tsq>Imported data timezone</label>
                                <div class="sqn-input sqn-select">
                                    <span>{{dataDetails.timezoneDisplay}}</span>
                                    <select ng-model="dataDetails.timezone" ng-options="item.value as item.name for item in timezones"
                                        onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)" onChange="sqnSelectChange(this)"
                                        readonly="1"></select>
                                </div>
                            </div>
                        </div>
                        <div class="row form-group">
                            <div class="col-xs-12 timeframe-input">
                                <label class="sqn-label" tsq>Imported timeframe</label>
                                <div class="sqn-input sqn-select">
                                    <span ng-bind="getTimeframeLabel()"></span>
                                    <select ng-model="dataDetails.timeframe" ng-options="item.value as item.type for item in timeframes"
                                        onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)" onChange="sqnSelectChange(this)"></select>
                                </div>
                            </div>
                        </div>
                    </fieldset>

                    <fieldset class="sq-fieldset">
                        <legend tsq>File format</legend>

                        <div class="row form-group">
                            <div class="col-xs-12">
                                <label class="sqn-label" tsq>Predefined file format</label>
                                <div class="sqn-input sqn-select wider-input">
                                    <span>{{dataDetails.fileFormat}}</span>
                                    <select ng-model="dataDetails.fileFormat" ng-options="item.name as item.name for item in fileFormats"
                                        onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)" ng-change="onReloadData(dataDetails.fileFormat)"
                                        readonly="1"></select>
                                </div>
                                <div class="line pull-right format-actions" style="display: inline-flex;">
                                    <button class="btn btn-default" ng-disabled="dataDetails.predefined" ng-click="onSaveFormat()" tsq>Save</button>
                                    <button class="btn btn-default" ng-click="onSaveFormatAs()">Save as</button>
                                    <button class="btn btn-default" ng-disabled="dataDetails.predefined || newFormat.name == ''" ng-click="onDeleteFormat()" tsq>Delete</button>
                                </div>
                            </div>
                        </div>
                        <div class="row form-group">
                            <div class="col-xs-12">
                                <label class="sqn-label" tsq>Skip</label>
                                <div class="sqn-spinner smaller-input">
                                    <input type="text" class="sqn-input" min="0" step="1" ng-model="dataDetails.skipRows"
                                        onFocus="sqnSpinnerFocus(this)" onBlur="sqnSpinnerBlur(this)" />
                                    <div class="sqn-spinner-btns">
                                        <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                                        <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                                    </div>
                                </div>
                                <span style="margin-top: 5px; margin-left: 5px;" tsq>rows</span>&nbsp;&nbsp;&nbsp;&nbsp;
                                <div class="sqn-spinner smaller-input">
                                    <input type="text" class="sqn-input" min="0" step="1" ng-model="dataDetails.skipCols"
                                        onFocus="sqnSpinnerFocus(this)" onBlur="sqnSpinnerBlur(this)" />
                                    <div class="sqn-spinner-btns">
                                        <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                                        <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                                    </div>
                                </div>
                                <span style="margin-top: 5px; margin-left: 5px;" tsq>columns</span>
                            </div>
                        </div>
                        <div class="row form-group">
                            <div class="col-xs-12">
                                <label class="sqn-label" tsq>Separator</label>
                                <div class="line" style="display: inline-flex;">
                                    <div class="sqn-input sqn-select separator-input">
                                        <span ng-bind="getSeparatorLabel()"></span>
                                        <select ng-model="dataDetails.separator" ng-options="item.value as item.type for item in separators"
                                            onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)"></select>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row form-group">
                            <div class="col-xs-12">
                                <label class="sqn-label" tsq>Date format</label>
                                <div class="line" style="display: inline-flex;">
                                    <sq-combo-input sq-model="dataDetails.dateFormat" options="dateFormats"
                                        options-display="pattern" options-value="pattern" style="width: 265px;" single="true" />
                                    <span style="margin-top: 2px; margin-left: 10px;">({{dateFormatExample}})</span>
                                </div>
                            </div>
                        </div>
                        <div class="row form-group">
                            <div class="col-xs-12">
                                <label class="sqn-label" tsq>Data errors handling</label>

                                <div class="line" style="display: inline-flex;margin-left:-5px;">
                                    <div class="radio">
                                        <label class="sq-wradio">
                                            <input type="radio" name="errorHandling" ng-value="0" ng-model="dataDetails.errorHandling" />
                                            <span class="sq-mark"></span>
                                            <tsq>Stop import</tsq>
                                        </label>
                                    </div>
                                    &nbsp;&nbsp;&nbsp;
                                    <div class="radio">
                                        <label class="sq-wradio">
                                            <input type="radio" name="errorHandling" ng-value="1" ng-model="dataDetails.errorHandling" />
                                            <span class="sq-mark"></span>
                                            <tsq>Ignore lines with errors</tsq>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div class="row form-group">
                            <div class="col-xs-12">
                                <div id="columnsGrid" class="gridbox_compressed" style="height: 205px" />
                            </div>
                        </div>

                    </fieldset>
                </form>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal" tsq>Close</a>
                <button type="button" class="btn btn-primary" ng-click="onStartImport(importDataForm)" tsq>Start Import</button>
            </div>
        </div>
    </div>
</div>

<div ng-include="'../../../plugins/DataSourceFiles/import/newFormatPopup.html'"></div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataSourceFiles/import/newFormatPopup.html">
<!-- Modal Connection details window-->
<div class="modal" id="newFormatModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel">New data format</h4>
            </div>
            <div class="modal-body">
                <form name="addSymbolForm" class="form-horizontal" role="form" style="text-align: left;">

                    <fieldset class="sq-fieldset">
                        <div class="sq-legend-help">Enter the name of the new data format</div>

                        <div class="row">
                            <div class="col-xs-6">
                                <label class="sqn-label">Name
                                    <input type="text" class="sqn-input" ng-model="newFormat.name" />
                                </label>
                            </div>
                        </div>
                    </fieldset>

                </form>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal">Close</a>
                <button type="button" class="btn btn-primary" ng-click="saveNewDataFormat()">Save</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataSourceFiles/massImport/massImportPopup.html">
<!-- Modal Connection details window-->
<div class="modal" id="addMassImportModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div style="width:990px" class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel" tsq>Mass import</h4>
            </div>
            <div class="modal-body" style="padding-bottom:0px;">
                <form name="massImportForm" class="form-horizontal" role="form" ng-class="{'submitted': errors}"
                    style="text-align: left;">

                    <form-errors errors="errors"></form-errors>

                    <fieldset class="sq-fieldset">
                        <div class="td-dir-select">
                            <label class="sqn-label" tsq>Source data folder</label>
                            <input type="text" class="sqn-input" ng-model="config.path" readonly="1" ng-required="true"
                                name="Source data folder" />
                            <a href ng-click="onSelectFolder();" tsq>Select</a>
                        </div>                     

                        <div class="row form-group">
                            <div class="col-xs-12 timezone-input">
                                <label class="sqn-label" tsq>Imported data timezone</label>
                                <div style="margin-left:-2px;" class="sqn-input sqn-select">
                                    <span>{{config.timezoneDisplay}}</span>
                                    <select style="margin-left:0px;" ng-model="config.timezone" ng-options="item.value as item.name for item in timezones"
                                        onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)" onChange="sqnSelectChange(this)"
                                        readonly="1"></select>
                                </div>
                            </div>
                        </div>        

                        <div class="row form-group">
                            <div class="col-xs-12 timeframe-input">
                                <label class="sqn-label" tsq>Imported timeframe</label>
                                <div class="sqn-input sqn-select">
                                    <span ng-bind="getTimeframeLabel()"></span>
                                    <select ng-model="config.timeframe" ng-options="item.value as item.type for item in timeframes"
                                        onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)" onChange="sqnSelectChange(this)"></select>
                                </div>
                            </div>
                        </div>         
                        
                        <div class="row form-group">
                            <div class="col-xs-12" style="display: inline-flex;">
                                <label class="sqn-label" tsq>Date format</label>
                                <div class="line" style="display: inline-flex;">
                                    <sq-combo-input sq-model="config.dateFormat" options="dateFormats"
                                        options-display="pattern" options-value="pattern" style="width: 265px;" single="true" />
                                </div>
                            </div>
                        </div>                            
                        
                        <div class="row form-group" style="margin-left:0px;">   
                            <div class="sq-checkbox sq-checkbox-1">
                                <input type="checkbox" ng-model="config.createStockGroup" id="config-createGroup" />
                                <label class="sqn-label" for="config-createGroup">
                                    <tsq>Create a new stockgroup from imported symbols</tsq>
                                </label>
                            </div>   
                        </div>

                        <div class="row row-smaller sq-data-line sq-data-details-line">
                            <div class="col-sm-5">
                                <legend>
                                    <tsq>Folder/File csv format</tsq>
                                </legend>
                                <div class="radio">
                                    <label class="sq-wradio">
                                        <input type="radio" name="format" ng-model="config.format" value="amibroker" id="formatRadio0" class="ng-pristine ng-untouched ng-valid ng-not-empty">
                                        <span class="sq-mark"></span>
                                        <tsq>Date,Open,High,Low,Close,Volume<br>Date,Ask,Bid,Volume - in case of tick timeframes</tsq>
                                    </label>
                                </div>                                         
                            </div>
                            <div class="col-sm-7">
                                <legend>
                                    <tsq>If data already exists</tsq>
                                </legend>
                                <div class="radio">
                                    <label class="sq-wradio">
                                        <input type="radio" name="exists" ng-model="config.exists" value="overwrite" id="existsRadio0" class="ng-pristine ng-untouched ng-valid ng-not-empty">
                                        <span class="sq-mark"></span>
                                        <tsq>Overwrite</tsq>
                                    </label>
                                </div>
                                <div class="radio">
                                    <label class="sq-wradio">
                                        <input type="radio" name="exists" ng-model="config.exists" value="skip" id="existsRadio1" class="ng-pristine ng-untouched ng-valid ng-not-empty">
                                        <span class="sq-mark"></span>
                                        <tsq>Skip</tsq>
                                    </label>
                                </div>
                                <div class="radio">
                                    <label class="sq-wradio">
                                        <input type="radio" name="exists" ng-model="config.exists" value="create" id="existsRadio2" class="ng-pristine ng-untouched ng-valid ng-not-empty">
                                        <span class="sq-mark"></span>
                                        <tsq>Create new ticker in data - adds postfix 2 or 3 etc.</tsq>
                                    </label>
                                </div>                                
                            </div>
                        </div>

                    </fieldset>

                    <fieldset class="sq-fieldset">            
                        <div class="row">
                            <div class="col-sm-8">
                                <legend tsq>Data type</legend>
                                <div class="clearfix"></div>
                                <div class="radio">
                                    <label class="sq-wradio">
                                        <input type="radio" name="barType" ng-model="config.barType" ng-value="barDataTypes.startOfBar"
                                            id="barTypeRadio0" />
                                        <span class="sq-mark"></span>
                                        <tsq>Timestamp is start of bar time (MetaTrader, Dukascopy, forex data)</tsq>
                                    </label>
                                </div>
                                <div class="radio">
                                    <label class="sq-wradio">
                                        <input type="radio" name="barType" ng-model="config.barType" ng-value="barDataTypes.endOfBar"
                                            id="barType2" />
                                        <span class="sq-mark"></span>
                                        <tsq>Timestamp is end of bar time (NinjaTrader, Tradestation, futures data)</tsq>
                                    </label>
                                </div>
                            </div>

                            <div class="col-sm-4">
                                <div class="data-postfix">
                                    <label tsq>Data postfix</label>
                                    <div>
                                        <input type="text" class="sqn-input" ng-model="config.postfix" />
                                    </div>
                                </div>
                            </div>
                        </div>
                    </fieldset>

                    <instrument-chooser instance="instrumentChooser" help-text="true" />
                </form>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal" tsq>Close</a>
                <button type="button" class="btn btn-primary" ng-click="onSave(massImportForm)" tsq>Save</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataSourceTD/import/importPopup.html">
<!-- Modal window-->
<div class="modal" id="importTDModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel" tsq>Import data from TickDownloader</h4>
            </div>
            <div class="modal-body">
                <form name="dukasImportTDForm" class="form-horizontal" role="form">

                    <form-errors errors="errors"></form-errors>

                    <fieldset class="sq-fieldset">

                        <div class="sq-legend-help">
                            <tsq>If you have TickDownloader installation you can import the data directly from the TD
                                downloaded data folders.</tsq><br />
                            <tsq>Please select your TickDownloader installation folder below.</tsq>
                        </div>
                        <div class="td-dir-select">
                            <label class="sqn-label" tsq>TickDownloader Installation</label>
                            <input type="text" class="sqn-input" ng-model="config.path" readonly="1" ng-required="true"
                                name="TickDownloader Data Folder" />
                            <a href ng-click="onSelect();" tsq>Select</a>
                        </div>

                        <div id="tdimportGrid"></div>

                        <div class="dukas-data-postfix">
                            <label tsq>Data postfix</label>
                            <div>
                                <input type="text" class="sqn-input" ng-model="config.postfix" />
                                <label tsq>This postfix will be optionally added to the data names created</label>
                            </div>
                        </div>
                    </fieldset>

                </form>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal" tsq>Close</a>
                <button type="button" class="btn btn-primary" ng-click="onStartImport(dukasImportTDForm)" tsq>Start
                    import</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataSourceYahoo/add/addPopup.html">
<!-- Modal window-->
<div class="modal" id="yahooAddModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel">Add Yahoo data</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" role="form">
                    <fieldset class="sq-fieldset">
                        <legend>Add data to download</legend>
                        <div class="sq-data-help">
                            <tsq>Please enter a list of stocks tickers you want to add, separated by comma, semicolon or newline.</tsq>
                            <tsq>For example: AAPL, AMZN, TSLA</tsq>
                        </div>

                        <div>
                            <textarea ng-model="dataDetails.symbols"></textarea>
                        </div>
                    </fieldset>

                    <div class="yahoo-data-postfix">
                        <label tsq>Data postfix</label>
                        <div>
                            <input type="text" class="sqn-input" ng-model="dataDetails.postfix" />
                            <label tsq>This postfix will be optionally added to the data names created</label>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal">Close</a>
                <button type="button" class="btn btn-primary" ng-click="onSave()">Save</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataSourceYahoo/download/downloadPopup.html">
<!-- Modal window-->
<div class="modal" id="yahooImportModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel">
                    <tsq>Download Yahoo data for</tsq> {{selectedFor}}
                </h4>
            </div>
            <div class="modal-body" style="height: auto;">
                <form class="form-horizontal" role="form">

                    <fieldset class="sq-fieldset">
                        <legend tsq>Choose data range to download</legend>

                        <date-range instance="dateRange" sqclass="yahoo-download" on-date-change="onDateRangeChange" />

                    </fieldset>

                    <fieldset class="sq-fieldset">
                        <legend tsq>Redownload options</legend>

                        <div class="row radios">
                            <div class="col-xs-6">
                                <div class="radio">
                                    <label class="sq-wradio">
                                        <input type="radio" name="ImportOptionsRadios" ng-model="newImport.overwrite"
                                            value="false" id="yahoo-download-addonly" />
                                        <span class="sq-mark"></span>
                                        <tsq>Add only missing data</tsq>
                                    </label>
                                </div>
                            </div>
                            <div class="col-xs-6">
                                <div class="radio">
                                    <label class="sq-wradio">
                                        <input type="radio" name="ImportOptionsRadios" ng-model="newImport.overwrite"
                                            value="true" id="yahoo-download-overwrite" />
                                        <span class="sq-mark"></span>
                                        <tsq>Overwrite existing data</tsq>
                                    </label>
                                </div>
                            </div>
                        </div>
                    </fieldset>
                </form>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal" tsq>Close</a>
                <button type="button" class="btn btn-primary" ng-click="onStartImport()" tsq>Start download</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/HomeAbout/views/about.html">
<div class="modal" id="aboutModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" ng-click="close()" aria-label="Close"><span
                        aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel" tsq>About</h4>
            </div>
            <div class="modal-body" style="height: 500px;">
                <div class="about">
                    <div class="licence-header product-{{product}}"></div>
                    <div class="about-text">
                        <strong>{{license.product}} {{license.version}}</strong>
                        <br>
                        &copy; Copyright StrategyQuant 2025. All rights reserved.<br>
                        <tsq>Hardware ID</tsq>: {{license.hardwareid}}<br><br>
                        <div class="about-licence" ng-show="license.code">
                            <tsq>License number</tsq>: {{license.code}} {{license.type}}<br />
                            <tsq>Licensed to</tsq>: {{license.owner}}<br />
                        </div>
                    </div>
                </div>

                <br />

                <div>
                    <button type="button" class="btn btn-primary" ng-click="verify.updateLicense = true;"
                        ng-hide="verify.updateLicense" tsq>Update license</button>
                    <div class="newLicenceText" ng-show="updatingLicenseAfterPayment" tsq>New full license was
                        created for you, please see below</div>
                    <div class="form-group update-license-form" ng-show="verify.updateLicense">
                        <label for="license" tsq>Enter license number:</label>
                        <input type="text" class="form-control license-input" ng-model="verify.code" maxlength="30"
                            size="30" />
                        <img src="../img/sq-license-progress.gif" ng-show="verify.verifyingLicense" />
                        <button type="submit" class="verify-btn" ng-click="verifyLicense()" tsq>Verify license</button>
                    </div>

                    <div ng-show="verify.updateLicense" class="license-response-text"
                        ng-class="license.updateSuccess ? 'green' : 'red'" ng-bind-html="license.updateResult | html" />
                </div>
            </div>
            <div class="modal-footer">
                <span class="about-licence-path"><tsq>Path</tsq>: {{appPath}}</span>
                <a ng-click="close()" class="btn-only-close" tsq>Close</a>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataManagerActions/review/chart/reviewChart.html">
<div class="flex-expand results-chart">
    <div ng-show="tickData" class="chart-no-tick-data" tsq>
        Chart is not available for tick data.
    </div>
    <div ng-hide="tickData" class="data-panel">
        <table>
            <tr class="chart-time">
                <td ng-bind="barData.dateTime" colspan="2"></td>
            </tr>

            <tr class="chart-price">
                <td>
                    <tsq>Open</tsq>:
                </td>
                <td ng-bind="barData.open"></td>
            </tr>
            <tr class="chart-price">
                <td>
                    <tsq>High</tsq>:
                </td>
                <td ng-bind="barData.high"></td>
            </tr>
            <tr class="chart-price">
                <td>
                    <tsq>Low</tsq>:
                </td>
                <td ng-bind="barData.low"></td>
            </tr>
            <tr class="chart-price">
                <td>
                    <tsq>Close</tsq>:
                </td>
                <td ng-bind="barData.close"></td>
            </tr>
        </table>
    </div>


    <div ng-hide="tickData" class="chart-panel" style="width: 100%;">
        <div id="canvasWrapper" ng-show="!noData" style="width: 100%!important">
            <canvas id="canvas"></canvas>
        </div>

        <p id="loadingLabel" ng-if="loading" tsq>Loading data...<p>
    </div>
</div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataManagerActions/review/data/reviewData.html">
<div class="reviewDataGrid-toolbar">
	<div style="float:left">
		<date-picker label="Skip to data" date="skipDate" on-date-change="onDateSkipChange(date)" min-date="symbolDateRangeFrom" max-date="symbolDateRangeTo" format="yyyy.mm.dd" />
		<button class="btn btn-default" type="button" ng-click="doSkip()">Skip</button>
	</div>
	
	<div style="float:right">
		<button class="btn btn-default" type="button" ng-click="doEditSelected()">Edit line</button>
		<button class="btn btn-default" type="button" ng-click="doDeleteSelected()">Delete line</button>
	</div>
</div>
<div class="reviewDataGrid-wrapper">
	<div id="reviewDataGrid" style="width: 100%; height: 100%;"></div>
</div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataManagerActions/review/quality/quality.html">
<div class="view-quality" ng-hide="loading || tfNotSupported">
    <b tsq>Summary</b>
    <div class="quality-tab-summary">
        <div>
            <table>
                <tr>
                    <td tsq>Issue</td>
                    <td tsq>Count</td>
                    <td tsq>% of data</td>
                </tr>
                <tr>
                    <td>
                        <strong tsq>Gaps</strong>
                    </td>
                    <td>{{problems.gap.count}}</td>
                    <td>{{problems.gap.percent}}</td>
                </tr>
            </table>
        </div>
        <div>
            <table>
                <tr>
                    <td tsq>Issue</td>
                    <td tsq>Count</td>
                    <td tsq>% of data</td>
                </tr>
                <tr>
                    <td>
                        <strong tsq>Spikes</strong>
                    </td>
                    <td>{{problems.spike.count}}</td>
                    <td>{{problems.spike.percent}}</td>
                </tr>
            </table>
        </div>
        <div>
            <table>
                <tr>
                    <td tsq>Issue</td>
                    <td tsq>Count</td>
                    <td tsq>% of data</td>
                </tr>
                <tr>
                    <td>
                        <strong tsq>Bad OHLC</strong>
                    </td>
                    <td>{{problems.ohlc.count}}</td>
                    <td>{{problems.ohlc.percent}}</td>
                </tr>
            </table>
        </div>
    </div>

    <b tsq>Graphical view</b>
    <div id="qualityCanvasWrapper">
        <canvas id="qualityCanvas"></canvas>
    </div>

    <b tsq>Detailed list</b>
    <div id="qualityGrid" style="height: 444px;"></div>
</div>

<div class="chart-no-tick-data" ng-show="loading" tsq>
    Processing ...
</div>

<div class="chart-no-tick-data" ng-show="tfNotSupported" tsq>
    Analyze data quality is not available for Tick and Intraday data.
</div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataManagerInstruments/actions/clone/cloneInstrument.html">
<!-- Modal window-->
<div class="modal modal-onefield" id="cloneInstrumentModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel"><tsq>Clone instrument</tsq> '{{config.name}}'</h4>
            </div>
            <div class="modal-body">
                <form name="cloneInstrumentForm" class="form-horizontal" role="form" ng-class="{'submitted': errors}"
                    style="text-align: left;">

                    <form-errors errors="errors"></form-errors>

                    <label class="sqn-label">
                        <tsq>New instrument broker profile</tsq>
                        <div class="sqn-input sqn-select">
                            <span ng-bind="getBrokerProfileLabel()"></span>
                            <select ng-model="config.broker" ng-options="item.id as item.name for item in brokerProfiles" 
                                onFocus="sqnSelectFocus(this)"
                                onBlur="sqnSelectBlur(this)" ng-change="onBrokerChange()"
                                ></select>
                        </div>    
                    </label>          

                    <label class="sqn-label">
                        <tsq>New instrument name</tsq>
                        <input type="text" class="sqn-input" ng-model="config.clone" />{{brokerProfile.postfix}}
                    </label>
                </form>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal" tsq>Close</a>
                <button type="button" class="btn btn-primary" ng-click="onCloneInstrument(cloneInstrumentForm)"
                    tsq>Save</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../../../internal/plugins/DataManagerSessions/actions/clone/cloneSession.html">
<!-- Modal window-->
<div class="modal modal-onefield" id="cloneSessionModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel"><tsq>Clone session</tsq> '{{config.name}}'</h4>
            </div>
            <div class="modal-body">
                <form name="cloneSessionForm" class="form-horizontal" role="form" ng-class="{'submitted': errors}"
                    style="text-align: left;">

                    <form-errors errors="errors"></form-errors>

                    <label class="sqn-label">
                        <tsq>New session broker profile</tsq>
                        <div class="sqn-input sqn-select">
                            <span ng-bind="getBrokerProfileLabel()"></span>
                            <select ng-model="config.broker" ng-options="item.id as item.name for item in brokerProfiles" 
                                onFocus="sqnSelectFocus(this)"
                                onBlur="sqnSelectBlur(this)" ng-change="onBrokerChange()"
                                ></select>
                        </div>    
                    </label>          

                    <label class="sqn-label">
                        <tsq>New session name</tsq>
                        <input type="text" class="sqn-input" ng-model="config.clone" />{{brokerProfile.postfix}}
                    </label>
                </form>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal" tsq>Close</a>
                <button type="button" class="btn btn-primary" ng-click="onCloneSession(cloneSessionForm)"
                    tsq>Save</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../app/layout/views/CSVXLSXExportDialog.html">
<!-- Modal window-->
<div class="modal" id="CSVXLSXExportDialogModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button id="buttonTimes-45a" type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel" tsq>Export format</h4>
            </div>
            <div class="modal-body" style="height: auto">
                <form class="form-horizontal" role="form">
                    <div>
                        <label tsq>
                            You can export contents either to classic CSV file or MS Office XLSX file.<br>
                            Which file format do you prefer?
                        </label>
                        <div class="radio">
                            <input type="checkbox" ng-model="CSVXLSXExport.useComma" />
                            <label ng-click="CSVXLSXExport.useComma = !CSVXLSXExport.useComma" style="padding-left: 8px;" tsq>Use comma in numeric values</label>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal" tsq>Close</a>
                <button id="buttonXLSX-45b" type="button" class="btn btn-primary" ng-click="CSVXLSXExport.callback(true)" tsq>XLSX</button>
                <button id="buttonCSV-45c" type="button" class="btn btn-primary" ng-click="CSVXLSXExport.callback(false)" tsq>CSV</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../app/layout/views/awExamplesDialog.html">
<!-- Modal window-->
<div class="modal centered" id="awExamplesDialog" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document" style="width: 700px;">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" tsq>AlgoWizard Examples</h4>
            </div>
            <div class="modal-body" style="height: auto;">
                <div class="aw-examples-wrapper aw-examplesEditor">
                    <div class="aw-examples-item" ng-repeat="singleExample in awExamples">
                        <h3>{{singleExample.name}}</h3>
                        <div style="font-size: 10px; margin-bottom: 1rem;">{{singleExample.type}} STRATEGY EXAMPLE</div>
                        <p ng-bind-html="singleExample.description" class="single-example-desc"></p>
                        <div class="single-example-img"><img ng-src="/AlgoWizard/examples/{{singleExample.img}}"></div>
                        <div class="single-example-button"><button id="buttonOpen-13ah" type="button" class="btn btn-primary" data-dismiss="modal" ng-click="loadExampleFile(singleExample.strategyFile)" tsq>Open</button></div>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal" tsq>Close</a>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../app/layout/views/confirmDialog.html">
<!-- Modal window-->
<div class="modal" id="confirmDialog" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog type-warning" role="document">
        <div class="modal-content">
            <div class="modal-header" ng-class="{'modal-header-red':confirmDialog.deleteConfirm}">
                <button id="buttonTimes-44a" type="button" class="close" data-dismiss="modal" aria-label="Close" ng-click="confirmDialog.onClose()">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel" ng-bind="confirmDialog.title | tsq"></h4>
            </div>
            <div class="modal-body" style="height: auto;">
                <form class="form-horizontal" role="form">
                    <div class="form-group">
                        <label class="col-sm-12" style="text-align: center; font-size: 16px;">
                            <span ng-bind-html="confirmDialog.message | tsq | html"></span>
                        </label>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button id="buttonCancel-44b" type="button" class="btn btn-default" data-dismiss="modal" ng-click="confirmDialog.callback(false)" ng-bind="confirmDialog.yesNo ? 'No' : 'Cancel'"></button>
                <button id="buttonConfirm-44c" type="button" class="btn btn-primary" data-dismiss="modal" ng-click="confirmDialog.callback(true)" ng-bind="confirmDialog.yesNo ? 'Yes' : (confirmDialog.okButtonTitle ? confirmDialog.okButtonTitle : 'OK')"></button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../app/layout/views/customProjectNotifPopup.html">
<!-- Modal window-->
<div class="modal" id="customProjectNotifPopup" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog type-warning" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button id="buttonTimes-46a" type="button" class="close" data-dismiss="modal" aria-label="Close" ng-click="confirmDialog.onClose()"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel" tsq>Custom Project Notification</h4>
            </div>
            <div class="modal-body">
                <div ng-if="!customProjectPaused">
                    {{customProjectNotification}} <tsq>Project continues with the next task.</tsq>
                </div>

                <div ng-if="customProjectPaused">
                    {{customProjectNotification}}<br>
                    <b tsq>Project was paused and it is waiting for user action - you have to resume it to continue.</b>
                </div>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal" tsq>Close</a>
                <button id="buttonGoToProject-46b" type="button" class="btn btn-primary" data-dismiss="modal" ng-click="goToCustomProject()" tsq>Go to project</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../app/layout/views/dataTrialPopup.html">
<div class="modal centered" id="dataTrialPopup" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" tsq>Data subscription</h4>
            </div>
            <div class="modal-body">
                <div class="text1" tsq>Your SQ Data Subscription trial will finish in 7 days.</div>
                <div class="text2" tsq>Please sign up for SQ Data if you want to continue using it.</div>

                <img src="https://cdn.strategyquant.com/images/data_subscription_banner.png"
                                    width="728" height="90"
                                    ng-click="$root.openlink('https://strategyquant.com/data-subscription-special-offer')" />
                                
                <a class="link" ng-click="openBrowser('https://strategyquant.com/data-subscription-special-offer')">Click here to get SQ Data for a year at Promo price</a>                
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal" tsq>Close</a>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../app/layout/views/errorDialog.html">
<!-- Modal window-->
<div class="modal" id="errorDialog" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog type-warning" role="document" style="width: 800px; height: 600px;">
        <div class="modal-content">
            <div class="modal-header">
                <button id="buttonTimes-47a" type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel" ng-bind="errorDialog.title | tsq"></h4>
            </div>
            <div class="modal-body">
                <div ng-if="errorDialog.displayTextarea">
                    <textarea rows="12" readonly style="width: 100%; font-size:11px" ng-bind="errorDialog.message | tsq"></textarea>
                </div>
                <div ng-if="!errorDialog.displayTextarea">
                    <form class="form-horizontal" role="form">
                        <div class="form-group">
                            <label ng-if="!errorDialog.isHtmlContent" class="col-sm-12" style="text-align: center;font-size: 16px;" ng-bind="errorDialog.message | tsq"></label>
                            <label ng-if="errorDialog.isHtmlContent" class="col-sm-12" style="text-align: center;font-size: 16px;" ng-bind-html="errorDialog.message | tsq | html"></label>
                        </div>
                    </form>
                </div>
            </div>
            <div class="modal-footer">
                <button id="buttonOK-47b" type="button" class="btn btn-primary" data-dismiss="modal" tsq>OK</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../app/layout/views/header.html">
<header id="header">
    <div class="br-header">
    <span class="br-img-span"><span ng-if="isBrazilianEdition" class="br-edition brContentSpan">Edição Brasileira<div class="br-img"></div></span></span>
    <div class="headerUlDiv">
    <ul class="icons-system">
        <li ng-repeat="navigationItem in topMenuItems | orderBy: '+position'" class="{{::navigationItem.parentClass}}">
            <a id="{{::navigationItem.linkId}}" ng-click="switchToApp(navigationItem)" class="{{::navigationItem.iconClass}}" ng-class="{'disabled': navigationItem.onlyInPro && !$root.license.isProVersion}" title="{{navigationItem.onlyInPro && !$root.license.isProVersion ? onlyInProTitle : navigationItem.title}}"
                data-toggle="tooltip" data-container="body" data-placement="bottom">{{navigationItem.showText ? navigationItem.title : ''}}</a>
        </li>

        <li ng-if="$root.developmentMode" onclick="regenerate()">
            <a class="icons-system-regenerate fa fa-refresh" data-toggle="tooltip" title="Regenerate"></a>
        </li>
        <li ng-if="$root.developmentMode" ng-click="dataTrialPopup()">
            <a class="icons-system-regenerate fa fa-database" data-toggle="tooltip" title="Data trial"></a>
        </li>
        <li>
            <div class="dropdown">
                <a class="icons-system-settings fa fa-cog dropdown-toggle" data-toggle="dropdown" aria-expanded="true" title="Settings" id="global-settings-cog"></a>
                <ul class="dropdown-menu">
                    <li ng-click="showPopup('#performanceDialog')">
                        <a><i class="fa fa-cog"></i>
                            <tsq>Configuration...</tsq>
                        </a>
                    </li>
                    <li ng-click="showBenchmark()">
                        <a><i class="fa fa-bar-chart" aria-hidden="true"></i>
                            <tsq>Benchmark...</tsq>
                        </a>
                    </li>
                    <li ng-click="showRemoteAccessSettings()">
                        <a><i class="fa fa-globe" aria-hidden="true"></i>
                            <tsq>Remote access...</tsq>
                        </a>
                    </li>
                    <li ng-click="showSMTPSettings()">
                        <a><i class="fa fa-envelope-o" aria-hidden="true"></i>
                            <tsq>SMTP server...</tsq>
                        </a>
                    </li>
                    <li class="divider"></li>
                    <li class="dropdown-submenu">
                        <a tabindex="-1" class="dropdown-dont-close">
                            <i class="fa fa-flag-checkered" aria-hidden="true"></i>
                            <tsq>Language</tsq>
                        </a>
                        <language-menu />
                    </li>
                    <li class="divider"></li>
                    <li class="dropdown-submenu">
                        <a tabindex="-1" class="dropdown-dont-close">
                            <i class="fa fa-paint-brush" aria-hidden="true"></i>
                            <tsq>Skin</tsq>
                        </a>
                        <skin-picker />
                    </li>
                    <li class="divider"></li>
                    <li class="item-nolink dropdown-dont-close">
                        <tsq>Zoom</tsq>
                        <span class="menu-zoom">
                            <apps-zoom /> &nbsp;|&nbsp;
                            <a ng-click="fullscreen()" class="menu-zoom-fullscreen"></a>
                        </span>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <a ng-click="openlink('https://www.strategyquant.com/')"><i class="fa fa-external-link"
                                aria-hidden="true"></i>
                            <tsq>StrategyQuant Website</tsq>
                        </a>
                    </li>
                    <li>
                        <a ng-click="openlink('https://docs.strategyquant.com')"><i class="fa fa-external-link"
                                aria-hidden="true"></i>
                            <tsq>Help center</tsq>
                        </a>
                    </li>
                    <li>
                        <a ng-click="openlink('https://strategyquant.com/contactus/')"><i class="fa fa-external-link"
                                aria-hidden="true"></i>
                            <tsq>Support</tsq>
                        </a>
                    </li>
                    <li>
                        <a ng-click="updateLicense()"><i class="fa fa-user-o" aria-hidden="true"></i>
                            <tsq>Update license</tsq>
                        </a>
                    </li>
                    <li>
                        <a ng-click="about()"><i class="fa fa-info-circle" aria-hidden="true"></i>
                            <tsq>About</tsq>
                        </a>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <a ng-click="exitapp()"><i class="fa fa-times" aria-hidden="true"></i>
                            <tsq>Exit</tsq>
                        </a>
                    </li>
                </ul>
            </div>
        </li>
        <!--<li ng-click="fullscreen()"><a class="icons-system-fullscreen"></a></li> -->
    </ul>
</div>
    <!--skin-picker/-->
    </div>
</header>

<script>
    function regenerate() {
        var iframes = $(".sq4-maincontent iframe");

        for (var i = 0; i < iframes.length; i++) {
            var iframe = $(iframes[i]);
            if (iframe.css('display') != 'none') {
                if(iframe[0].contentWindow.regenerate) {
                    iframe[0].contentWindow.regenerate();
                } else {
                    console.log("Not implemented.");
                }

                break;
            }
        }
    }
</script>
</script>
<script type="text/ng-template" id="../app/layout/views/initSettings.html">
<div class="modal centered" id="initSettingsDialog" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document" style="width: 610px;">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" tsq>Settings</h4>
            </div>
            <div class="modal-body">
                <fieldset class="sq-fieldset">
                    <legend tsq>Choose your skin</legend>

                    <div class="clearfix"></div>

                    <div class="sq-skins">
                        <div ng-repeat="skin in skins">
                            <label class="sqn-label">{{skin.name | tsq}}</label>
                            <img ng-src="{{::skin.previewImgPath}}" alt="Skin preview" ng-class="{active : initSettings.skin.name == skin.name}" ng-click="initSettings.skin = skin">
                        </div>
                    </div>

                    <legend tsq>And language</legend>

                    <div>
                        <div class="sqn-input sqn-select">
                            <span ng-bind="initSettings.language.title"></span>
                            <select ng-model="initSettings.language" ng-options="language as language.title for language in languages" onFocus="sqnSelectFocus(this)"
                                onBlur="sqnSelectBlur(this)" onChange="sqnSelectChange(this)"></select>
                        </div>
                    </div>
                </fieldset>

                <br>

                <div ng-hide="isQDM" class="sq-checkbox" ng-click="initSettings.IntroWalkthrough=!initSettings.IntroWalkthrough">
                    <input type="checkbox" ng-model="initSettings.IntroWalkthrough">
                    <label>
                        <tsq>Start quick program introduction walkthrough</tsq>
                    </label>
                </div>
            </div>
            <div class="modal-footer">
                <div class="skins-note" ng-bind="initSettings.help"></div>
                <a ng-click="closeInitSettings(false)" tsq>Close</a>
                <button id="buttonSave-48a" type="button" class="btn btn-primary" ng-click="closeInitSettings(true)" tsq>Save</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../app/layout/views/loadingScreen.html">
<html>

<head>
    <script>
        function updateLoadingInfo(info) {
            document.getElementById("loading-info").innerHTML = info;
        }
    </script>
</head>

<body>
    <div class="sq-loading-wrapper">
        <div class="sq-loading-filler"></div>
        <div class="sq-loading-logo"></div>
        <div class="sq-loading-progress"></div>
        <div id="loading-info"></div>

        <div class="sq-firewall-note hide">
            <h3>Note - Starting SQ for the first time ?</h3>
            If you see a similar prompt from your Firewall / Antivirus please click on <b>Allow access</b>.<br>
            SQ uses modern web based UI, and it needs to run its own internal web server for that.
            <div class="sq-firewall-alert"></div>
        </div>
    </div>

    <style>
        body {
            background-color: #288cfa;
            color: #ffffff;
        }

        .sq-loading-logo {
            background-image: url(data:image/png;base64, );
            background-repeat: no-repeat;
            background-position: center center;
            width: 238px;
            height: 174px;
            margin: 16px auto 0 auto;
        }

        .sq-loading-progress {
            background-image: url(data:image/gif;base64, );
            background-position: center center;
            background-repeat: no-repeat;
            width: 100px;
            height: 9px;
            margin: 46px auto 0 auto;
        }

        .sq-firewall-alert {
            background-image: url(data:image/jpeg;base64, );
            background-repeat: no-repeat;
            background-position: center center;
            background-size: 80%;
            width: 614px;
            height: 338px;
            margin: 10px auto 0 auto;
        }

        .sq-firewall-note-mac .sq-firewall-alert {
            background-image: url(data:image/jpeg;base64, );
            width: 614px;
            height: 218px;
        }

        #loading-info {
            font-size: 13px;
            font-family: Arial, Helvetica, sans-serif;
            text-align: center;
            margin-top: 16px;
        }

        .sq-firewall-note {
            width: 760px;
            margin: 20px auto 10px auto;
            padding: 8px 0px 10px 0;
            background-color: #fff69d;
            text-align: center;
            color: #444444;
            font-family: Arial, Helvetica, sans-serif;
            font-size: 15px;
        }

        .sq-firewall-note.hide {
            display: none;
        }

        .sq-loading-wrapper {
            display: flex;
            flex-direction: column;
            position: absolute;
            top: 0;
            left: 0;
            bottom: 0;
            right: 0;
        }

        .sq-loading-wrapper>div {
            flex: 0 0 auto;
        }

        .sq-loading-wrapper>div.sq-loading-filler {
            flex: 0 1 10%;
        }
    </style>

</body>

</html>
</script>
<script type="text/ng-template" id="../app/layout/views/loadingScreenAW.html">
<html><head><script>function updateLoadingInfo(info) {
    document.getElementById("loading-info").innerHTML=info;
}

</script></head><body><style>body {
    background-color: #288cfa;
    color: #ffffff;
}

.sq-loading-logo {
    background-image: url(data:image/png;base64, );
    background-repeat: no-repeat;
    width: 238px;
    height: 188px;
    margin: 250px auto 0 auto;
}

.sq-loading-progress {
    background-image: url(data:image/gif;base64, );
    background-repeat: no-repeat;
    width: 100px;
    height: 9px;
    margin: 40px auto 0 auto;
}

#loading-info {
    font-size: 13px;
    font-family: Arial, Helvetica, sans-serif;
    text-align: center;
    margin-top: 17px;
}

</style><div class="sq-loading-logo"></div><div class="sq-loading-progress"></div><div id="loading-info"></div></body></html>
</script>
<script type="text/ng-template" id="../app/layout/views/loadingScreenBr.html">
<html>

<head>
    <script>
        function updateLoadingInfo(info) {
            document.getElementById("loading-info").innerHTML = info;
        }
    </script>
</head>

<body>
    <div class="sq-loading-wrapper">
        <div class="sq-loading-filler"></div>
        <div class="sq-loading-logo"></div>
        <div class="sq-loading-progress"></div>
        <div id="loading-info"></div>

        <div class="sq-firewall-note hide">
            <h3>Note - Starting SQ for the first time ?</h3>
            If you see a similar prompt from your Firewall / Antivirus please click on <b>Allow access</b>.<br>
            SQ uses modern web based UI, and it needs to run its own internal web server for that.
            <div class="sq-firewall-alert"></div>
        </div>
    </div>

    <style>
        body {
            background-color: #43AA8B;
            color: #ffffff;
        }
        .sq-loading-progress{
            background-image: url("../../../AlgoWizard/img/loadingScreenLoaderBR.gif") !important;
            background-position: center center;
            background-repeat: no-repeat;
            width: 100px;
            height: 9px;
            margin: 46px auto 0 auto;
        }

        .sq-loading-logo {
            background-image: url(data:image/png;base64, );
            background-repeat: no-repeat;
            background-position: center center;
            width: 238px;
            height: 174px;
            margin: 16px auto 0 auto;
        }

        .sq-firewall-alert {
            background-image: url(data:image/jpeg;base64, );
            background-repeat: no-repeat;
            background-position: center center;
            background-size: 80%;
            width: 614px;
            height: 338px;
            margin: 10px auto 0 auto;
        }

        .sq-firewall-note-mac .sq-firewall-alert {
            background-image: url(data:image/jpeg;base64, );
            width: 614px;
            height: 218px;
        }

        #loading-info {
            font-size: 13px;
            font-family: Arial, Helvetica, sans-serif;
            text-align: center;
            margin-top: 16px;
        }

        .sq-firewall-note {
            width: 760px;
            margin: 20px auto 10px auto;
            padding: 8px 0px 10px 0;
            background-color: #fff69d;
            text-align: center;
            color: #444444;
            font-family: Arial, Helvetica, sans-serif;
            font-size: 15px;
        }

        .sq-firewall-note.hide {
            display: none;
        }

        .sq-loading-wrapper {
            display: flex;
            flex-direction: column;
            position: absolute;
            top: 0;
            left: 0;
            bottom: 0;
            right: 0;
        }

        .sq-loading-wrapper>div {
            flex: 0 0 auto;
        }

        .sq-loading-wrapper>div.sq-loading-filler {
            flex: 0 1 10%;
        }
    </style>

</body>

</html>
</script>
<script type="text/ng-template" id="../app/layout/views/loadingScreenCE.html">
<html><head><script>function updateLoadingInfo(info) {
    document.getElementById("loading-info").innerHTML=info;
}

</script></head><body><style>body {
    background-color: #288cfa;
    color: #ffffff;
}

.sq-loading-logo {
    background-image: url(data:image/png;base64, );
    background-repeat: no-repeat;
    width: 238px;
    height: 188px;
    margin: 250px auto 0 auto;
}

.sq-loading-progress {
    background-image: url(data:image/gif;base64, );
    background-repeat: no-repeat;
    width: 100px;
    height: 9px;
    margin: 40px auto 0 auto;
}

#loading-info {
    font-size: 13px;
    font-family: Arial, Helvetica, sans-serif;
    text-align: center;
    margin-top: 17px;
}

</style><div class="sq-loading-logo"></div><div class="sq-loading-progress"></div><div id="loading-info"></div></body></html>
</script>
<script type="text/ng-template" id="../app/layout/views/loadingScreenQDM.html">
<html>

<head>
    <script>function updateLoadingInfo(info) {
            document.getElementById("loading-info").innerHTML = info;
        }

    </script>
</head>

<body>
    <style>
        body {
            background-color: #288cfa;
            color: #ffffff;
        }

        .sq-loading-logo {
            background-image: url('data:image/png;base64, ');
            background-repeat: no-repeat;
            width: 324px;
            height: 188px;
            margin: 250px auto 0 auto;
        }

        .sq-loading-progress {
            background-image: url(data:image/gif;base64, );
            background-repeat: no-repeat;
            width: 100px;
            height: 9px;
            margin: 40px auto 0 auto;
        }

        #loading-info {
            font-size: 13px;
            font-family: Arial, Helvetica, sans-serif;
            text-align: center;
            margin-top: 17px;
        }
    </style>
    <div class="sq-loading-logo"></div>
    <div class="sq-loading-progress"></div>
    <div id="loading-info"></div>
</body>

</html>
</script>
<script type="text/ng-template" id="../app/layout/views/loadingScreenRanger.html">
<html>

<head>
    <script>
        function updateLoadingInfo(info) {
            document.getElementById("loading-info").innerHTML = info;
        }
    </script>
</head>

<body>
    <div class="sq-loading-wrapper">
        <div class="sq-loading-filler"></div>
        <div class="sq-loading-logo"></div>
        <div class="sq-loading-progress"></div>
        <div id="loading-info"></div>

        <div class="sq-firewall-note hide">
            <h3>Note - Starting SQ for the first time ?</h3>
            If you see a similar prompt from your Firewall / Antivirus please click on <b>Allow access</b>.<br>
            SQ uses modern web based UI, and it needs to run its own internal web server for that.
            <div class="sq-firewall-alert"></div>
        </div>
    </div>

    <style>
        body {
            background-color: #288cfa;
            color: #ffffff;
        }

        .sq-loading-logo {
            background-image: url(data:image/png;base64, );
            background-repeat: no-repeat;
            /* background-position: center center;
            width: 238px;
            height: 174px;
            margin: 16px auto 0 auto; */
            background-position: center center;
            width: 600px;
            height: 600px;
            margin: -200px auto 0 auto;
            transform: scale(.4);
        }

        .sq-loading-progress {
            background-image: url(data:image/gif;base64, );
            background-position: center center;
            background-repeat: no-repeat;
            width: 100px;
            height: 9px;
            margin: -146px auto 0 auto;
        }

        .sq-firewall-alert {
            background-image: url(data:image/jpeg;base64, );
            background-repeat: no-repeat;
            background-position: center center;
            background-size: 80%;
            width: 614px;
            height: 338px;
            margin: -10px auto 0 auto;
        }

        .sq-firewall-note-mac .sq-firewall-alert {
            background-image: url(data:image/jpeg;base64, );
            width: 614px;
            height: 218px;
        }

        #loading-info {
            font-size: 13px;
            font-family: Arial, Helvetica, sans-serif;
            text-align: center;
            margin-top: 16px;
        }

        .sq-firewall-note {
            width: 760px;
            margin: 20px auto 10px auto;
            padding: 8px 0px 10px 0;
            background-color: #fff69d;
            text-align: center;
            color: #444444;
            font-family: Arial, Helvetica, sans-serif;
            font-size: 15px;
        }

        .sq-firewall-note.hide {
            display: none;
        }

        .sq-loading-wrapper {
            display: flex;
            flex-direction: column;
            position: absolute;
            top: 0;
            left: 0;
            bottom: 0;
            right: 0;
        }

        .sq-loading-wrapper>div {
            flex: 0 0 auto;
        }

        .sq-loading-wrapper>div.sq-loading-filler {
            flex: 0 1 10%;
        }
    </style>

</body>

</html>
</script>
<script type="text/ng-template" id="../app/layout/views/moveDatabankDialog.html">
<!-- Modal window-->
<div class="modal" id="moveDatabankDialog" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog type-warning" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button id="buttonTimes-49a" type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel" tsq>Move databank</h4>
            </div>
            <div class="modal-body" style="height: auto;">
                <form class="form-horizontal" role="form">
                    <label class="sqn-label" tsq>Move to position: </label>
                    <div class="sqn-spinner">
                        <input type="text" class="sqn-input" min="1" max="1000" step="1"
                            ng-model="moveDatabankDialog.newPosition" onFocus="sqnSpinnerFocus(this)"
                            onBlur="sqnSpinnerBlur(this)" />
                        <div class="sqn-spinner-btns">
                            <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                            <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                        </div>
                    </div>
                    <div class="modal-help-box" tsq>Note: Positions start after default databanks.<br>Default databanks
                        are
                        always displayed first</div>
                </form>
            </div>
            <div class="modal-footer">
                <button id="buttonCancel-49b" type="button" class="btn btn-default" data-dismiss="modal" tsq>Cancel</button>
                <button id="buttonMove-49c" type="button" class="btn btn-primary" data-dismiss="modal"
                    ng-click="moveDatabankDialog.callback(moveDatabankDialog.newPosition)" tsq>Move</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../app/layout/views/newVersionDialog.html">
<div class="modal" id="newVersionDialog" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button id="buttonTimes-50a" type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">Update</h4>
            </div>
            <div class="modal-body">
                <div class="about">
                    <div class="about-text">        
                        New version was found. Do you want to exit application and install a new version now?
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button id="buttonNo-50b" type="button" class="btn btn-primary" ng-click="onCloseNewVersionDialog()" tsq>No</button>
				<button id="buttonYes-50c" type="button" class="btn btn-primary" ng-click="onInstallNewVersion()" tsq>Yes</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../app/layout/views/noDataHelpScreenQDM.html">
<html>

<head>
    <style>
        body {
            background-color: #ffffff;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            color: #000000;
            text-align: center;
            font-size: 13px;
        }

        .title {
            font-size: 18px;
            font-weight: bold;
            margin-bottom: 16px;
            margin-top: 26px;
        }

        body.dark-skin {
            background-color: #3b3b3b;
            color: #cccccc;
        }
    </style>
</head>

<body>
    <div class="title" tsq>How to start</div>
    <br>
    <div tsq>QuantDataManager allows you to download or import data from various sources,<br>
        view and analyze them, and export then into text, CSV, or FST format for MetaTrader or any other trading
        platform.</div>
    <br>
    <div tsq>To start simply choose some Dukascopy data to download, or create and import your data from files.</div>
</body>

</html>
</script>
<script type="text/ng-template" id="../app/layout/views/noNewVersionDialog.html">
<div class="modal" id="noNewVersionDialog" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button id="buttonUpdate-51a" type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">Update</h4>
            </div>
            <div class="modal-body">
                <div class="about">
                    <div class="about-text">        
                        No new version was found.
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal" class="btn-only-close">Close</a>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../app/layout/views/optionsDialog.html">
<!-- Modal window-->
<div class="modal" id="optionsDialog" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog type-warning" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="myModalLabel" ng-bind="optionsDialog.title | tsq"></h4>
            </div>
            <div class="modal-body" style="height: auto;">
                <form class="form-horizontal" role="form">
                    <div class="form-group">
                        <label class="col-sm-12" style="text-align: center; font-size: 16px;">
                            <span ng-bind-html="optionsDialog.message | tsq | html"></span>
                        </label>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal" ng-hide="optionsDialog.hideClose" tsq>Close</a>
                <button id="buttonSelectOption-52a" type="button" class="btn btn-primary" data-dismiss="modal" ng-repeat="option in optionsDialog.options" ng-click="optionsDialog.callback(option)" ng-bind="option.title"></button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../app/layout/views/performanceDialog.html">
<!-- Modal window-->
<div class="modal centered" id="performanceDialog" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document" style="width: 700px;">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" tsq>Configuration</h4>
            </div>
            <div class="modal-body" style="height: auto;">
                <div class="quant-tabs">
                    <div class="tabs-header">
                        <div data-item="global" class="active" tsq>Global</div>
                        <div data-item="cpu" tsq>CPU</div>
                        <div data-item="performance" tsq>Performance</div>
                        <div data-item="memory" tsq>Memory</div>
                        <div data-item="databanks" tsq>Databanks</div>
                        <div data-item="optimizations" tsq>Optimizations</div>
                        <div data-item="troubleshooting" tsq>Troubleshooting</div>
                    </div>
                    <div class="tabs-body">

                        <!-- ------------------------------------------------------------------------------------------------------------- -->
                        <div data-item="global" class="active">
                            <div class="clearfix"></div>

                            <div class="sq-checkbox">
                                <input type="checkbox" ng-model="performance.soundsoff" id="performance-soundoff">
                                <label for="performance-soundoff">
                                    <tsq>Turn off notification sounds</tsq>
                                </label>
                            </div>

                            <div class="sq-checkbox">
                                <input type="checkbox" ng-model="performance.advancedFileChooser"
                                    id="performance-filechooser">
                                <label for="performance-filechooser">
                                    <tsq>Remember View type and Sorting in File chooser</tsq>
                                </label>
                            </div>
                            
                            <div class="sq-checkbox">
                                <input type="checkbox" ng-model="performance.showControlOrders" id="performance-showControlOrders">
                                <label for="performance-showControlOrders">
                                    <tsq>Show control orders when using MT5 netting engine</tsq>
                                </label>
                            </div>

                            <br>

                            <div class="row row-smaller">
                                <div class="col-sm-4">
                                    <label class="sqn-label">
                                        <tsq>Window Header custom text</tsq>
                                    </label>
                                </div>
                                <div class="col-sm-8">
                                    <input type="text" class="sqn-input" ng-model="performance.headerCustomText"
                                        maxlength="30" size="30" />
                                </div>
                            </div>

                            <br>

                            <div class="row row-smaller">
                                <div class="col-sm-4">
                                    <label class="sqn-label">
                                        <tsq>Window Footer custom text</tsq>
                                    </label>
                                </div>
                                <div class="col-sm-8">
                                    <input type="text" class="sqn-input" ng-model="performance.footerCustomText"
                                        maxlength="30" size="30" />
                                </div>
                            </div>

                            <br>

                            <div class="row row-smaller">
                                <div class="col-sm-4">
                                    <label class="sqn-label">
                                        <tsq>What result to display on default</tsq>
                                    </label>
                                </div>
                                <div class="col-sm-4">
                                    <div class="radio">
                                        <label class="sq-wradio">
                                            <input type="radio" name="DefaultResultToDisplay" value="portfolio"
                                                ng-model="performance.defaultResultToDisplay" />
                                            <span class="sq-mark"></span>
                                            <tsq>Portfolio (if exists)</tsq>
                                        </label>
                                    </div>
                                </div>
                                <div class="col-sm-4">
                                    <div class="radio">
                                        <label class="sq-wradio">
                                            <input type="radio" name="DefaultResultToDisplay" value="main"
                                                ng-model="performance.defaultResultToDisplay" />
                                            <span class="sq-mark"></span>
                                            <tsq>Main backtest result</tsq>
                                        </label>
                                    </div>
                                </div>
                            </div>

                            <div class="row row-smaller">
                                <div class="col-sm-4"></div>
                                <div class="col-sm-8">
                                    <div class="performance-affinity-description nomargin">
                                        <tsq>This affects which of the results are displayed by default in databank and
                                            in Results screen</tsq>
                                    </div>
                                </div>
                            </div>

                        </div>

                        <!-- ------------------------------------------------------------------------------------------------------------- -->

                        <div data-item="memory">
                            <div class="radio gc">
                                <label class="title" tsq>Garbage collector:</label>
                                <label class="block-label sq-wradio">
                                    <input type="radio" name="GCOptionRadio" value="{{::gcTypes.parallel}}"
                                        ng-model="performance.gc" />
                                    <span class="sq-mark"></span>
                                    <tsq>ParallelGC (Recommended)</tsq>
                                </label>
                                <label class="block-label sq-wradio">
                                    <input type="radio" name="GCOptionRadio" value="{{::gcTypes.g1}}"
                                        ng-model="performance.gc" />
                                    <span class="sq-mark"></span>
                                    <tsq>G1</tsq>
                                </label>
                                <label class="block-label sq-wradio">
                                    <input type="radio" name="GCOptionRadio" value="{{::gcTypes.auto}}"
                                        ng-model="performance.gc" />
                                    <span class="sq-mark"></span>
                                    <tsq>Let Java decide</tsq>
                                </label>
                            </div>

                            <div class="radio performance">
                                <label class="block-label sq-wradio">
                                    <input type="radio" name="MemoryOptionRadio" ng-value="0"
                                        ng-model="performance.memoryUsage">
                                    <span class="sq-mark"></span>
                                    <tsq>Let program determine maximum memory</tsq>
                                </label>
                                <label class="block-label sq-wradio">
                                    <input type="radio" name="MemoryOptionRadio" ng-value="1"
                                        ng-model="performance.memoryUsage">
                                    <span class="sq-mark"></span>
                                    <tsq>Set maximum memory to</tsq>
                                    <div class="sqn-spinner">
                                        <input type="text" class="sqn-input" min="0" max="999999" step="1"
                                            ng-model="performance.memory" onFocus="sqnSpinnerFocus(this)"
                                            onBlur="sqnSpinnerBlur(this)" />
                                        <div class="sqn-spinner-btns">
                                            <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                                            <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                                        </div>
                                    </div>
                                    GB
                                </label>
                            </div>

                            <div class="sq-checkbox" style="margin-top: 8px;">
                                <input type="checkbox" ng-model="performance.dontStorePendingOrders"
                                    name="PerformancePendingOrders" id="PerformancePendingOrders" />
                                <label for="PerformancePendingOrders" tsq>Don't store unfilled pending orders
                                    (Recommended)</label>
                            </div>
                            <div class="performance-affinity-description">
                                <tsq>It is usually not necessary to keep unfilled pending orders(orders that expired or were replaced).</tsq>&nbsp;<tsq>This would make the resulting strategy files smaller.</tsq>
                            </div>

                            <br>

                            <div class="sq-checkbox">
                                <input type="checkbox" ng-model="performance.memoryCleanup" name="MemoryCleanup"
                                    id="MemoryCleanup" />
                                <label for="MemoryCleanup" tsq>Perform memory cleanup periodically - </label>
                                <div class="sqn-input sqn-select">
                                    <span ng-bind="getCleanupIntervalName(performance.cleanupInterval)"></span>
                                    <select ng-model="performance.cleanupInterval"
                                        ng-options="item.value as (item.name | tsq) for item in cleanupIntervals"
                                        onFocus="sqnSelectFocus(this)" onBlur="sqnSelectBlur(this)"
                                        onChange="sqnSelectChange(this)"></select>
                                </div>
                            </div>
                            <div class="performance-affinity-description">
                                <tsq>Clean memory periodically by explicitly calling Java Garbage Collector.</tsq><br>
                                <tsq>Use it if you experience problems with memory, otherwise keep it turned off.</tsq><br>
                                <tsq>Java does this automatically and it usually does a very good job.</tsq><br>
                                <tsq>Turning it on without reason might slow down the application.</tsq>
                            </div>
                        </div>
                        <!-- ------------------------------------------------------------------------------------------------------------- -->

                        <div data-item="cpu">
                            <div class="radio performance">
                                <label class="sqn-label">
                                    <tsq>Total cores available</tsq> {{performance.cores}}
                                </label>
                                <label class="block-label sq-wradio">
                                    <input type="radio" name="PerformanceOptionRadio"
                                        value="{{::performanceOptions.singleCore}}" ng-model="performance.coreUsage" />
                                    <span class="sq-mark"></span>
                                    <tsq>Single threaded - program runs tasks sequentially, one after another.</tsq>
                                    <br>
                                    <tsq>This is slower, but consumes less memory.</tsq>
                                </label>
                                <label class="block-label sq-wradio">
                                    <input type="radio" name="PerformanceOptionRadio"
                                        value="{{::performanceOptions.reserve1Core}}"
                                        ng-model="performance.coreUsage" />
                                    <span class="sq-mark"></span>
                                    <tsq>Reserve 1 core for UI, compute tasks in parallel on all remaining cores.</tsq>
                                </label>
                                <label class="block-label sq-wradio">
                                    <input type="radio" name="PerformanceOptionRadio"
                                        value="{{::performanceOptions.customCores}}" ng-model="performance.coreUsage" />
                                    <span class="sq-mark"></span>
                                    <tsq>Custom number of cores</tsq>
                                    <div class="sqn-spinner">
                                        <input type="text" class="sqn-input" min="1" max="200" step="1"
                                            ng-model="performance.customCores" onFocus="sqnSpinnerFocus(this)"
                                            onBlur="sqnSpinnerBlur(this)" />
                                        <div class="sqn-spinner-btns">
                                            <div class="sqn-spinner-minus" onClick="sqnSpinnerMinus(this)"></div>
                                            <div class="sqn-spinner-plus" onClick="sqnSpinnerPlus(this)"></div>
                                        </div>
                                    </div>
                                </label>
                                <label class="block-label sq-wradio">
                                    <input type="radio" name="PerformanceOptionRadio"
                                        value="{{::performanceOptions.maxPerformance}}"
                                        ng-model="performance.coreUsage" /><span class="sq-mark"></span>
                                    <tsq>Max
                                        performance - running multiple
                                        tasks in parallel, using all processor cores.</tsq>
                                </label>

                                <br />
                                
                                <div class="sq-checkbox">
                                    <input type="checkbox" ng-model="performance.highPriority"
                                        id="highPriorityCheckbox">
                                    <label for="highPriorityCheckbox">
                                        <tsq>Run StrategyQuant in high priority mode</tsq>
                                    </label>
                                    
                                    <div class="performance-affinity-description">
                                        <tsq>
                                            Use this option ONLY if your SQX doesn't fully utilize your CPU in maximum settings - this could happen 
                                            with newest processors with P and E-cores.<br>
                                            By using it, SQX process will run in high priority mode, overcoming the efficiency limitations of the system.
                                        </tsq>
                                    </div>
                                </div>

                                <!--
                                    <div class="sq-checkbox">
                                        <input type="checkbox" ng-model="performance.threadAffinity" name="PerformanceThreadAffinity" id="PerformanceThreadAffinity"
                                        />
                                        <label for="PerformanceThreadAffinity" tsq>Use thread affinity</label>
                                    </div>
                                    <div class="performance-affinity-description">
                                        <tsq>Thread affinity means that every computing threads is bound to a fixed CPU core.</tsq>
                                        <br> <tsq>This should prevent thread context switching and improve the performance.</tsq>
                                        <br> <tsq>The real results may wary depending on your configuration.</tsq>
                                    </div>
                                    -->
                            </div>
                        </div>

                        <!-- ------------------------------------------------------------------------------------------------------------- -->

                        <div data-item="performance">
                            <div class="sq-checkbox">
                                <input type="checkbox" ng-model="performance.computePipsMetrics"
                                    id="ComputePipsMetrics">
                                <label for="ComputePipsMetrics">
                                    <tsq>Compute metrics in pips (Recommended turned off)</tsq>
                                </label>
                            </div>

                            <div class="sq-checkbox">
                                <input type="checkbox" ng-model="performance.computePctsMetrics"
                                    id="ComputePctsMetrics">
                                <label for="ComputePctsMetrics">
                                    <tsq>Compute metrics in percent (Recommended turned off)</tsq>
                                </label>
                            </div>

                            <div class="performance-affinity-description">
                                <tsq>In addition to metrics in money, also metrics for % and pips results can be computed.</tsq>
                                <tsq>It is generally recommended to have it turned off. Most people don't need these results and not computing and storing them will improve speed and memory consumption.</tsq>
                            </div>

                            <br />

                            <div class="sq-checkbox">
                                <input type="checkbox" ng-model="performance.computeSeparateMetrics"
                                    id="ComputeSeparateMetrics">
                                <label for="ComputeSeparateMetrics">
                                    <tsq>Compute metrics separate for every data part of the same type</tsq>
                                </label>
                            </div>

                            <div class="performance-affinity-description">
                                <tsq>Turning this on means that if you have your data divided into multiple OOS parts,
                                    for example OOS1, OOS2, OOS3, OOS4 - then the metrics like Net profit etc. will be
                                    computed also separately for each of these parts.
                                </tsq><br><br>

                                <tsq>
                                    This enables you to see these metrics separately in Results or databank, or use
                                    them in conditions but it also slows down the program and uses more memory.
                                </tsq><br><br>

                                <tsq>
                                    On by default, turn it off if you don't use it. Whole OOS metrics are always
                                    computed.
                                </tsq>
                            </div>
                        </div>

                        <!-- ------------------------------------------------------------------------------------------------------------- -->

                        <div data-item="databanks">

                            <div class="toolbar autosync">

                                <div class="dropdown">
                                    <label class="sqn-label" tsq>Default auto-sync interval</label>
                                    <button id="buttonChangeInterval-53a" class="btn btn-normal btn-default dropdown-toggle" type="button"
                                        data-toggle="dropdown" title="{{'Default auto-sync interval' | tsq}}">
                                        <span ng-bind="performance.databankSyncInterval | tsq"></span>
                                        <span class="caret"></span>
                                    </button>
                                    <ul class="dropdown-menu">
                                        <li ng-repeat="option in databankSyncOptions"
                                            ng-class="{'divider': option.separator}">
                                            <a ng-if="!option.separator"
                                                ng-click="performance.databankSyncInterval = option.title"
                                                ng-class="{ 'dropdown-item-checked': selectedOption==option.title }">
                                                <i ng-class="option.icon" aria-hidden="true"
                                                    v-if="option.icon"></i>{{::option.title}}
                                                <i class="fa fa-check"
                                                    ng-if="performance.databankSyncInterval == option.title"
                                                    aria-hidden="true"></i>
                                            </a>
                                        </li>
                                    </ul>
                                </div>

                                <button id="buttonApplyToAllExistingDatabanks-53b" class="btn btn-normal btn-default pull-right"
                                    ng-click="setAutoSyncToAllDatabanks()" ng-disabled="disableAutoSyncButton" tsq>Apply
                                    to all existing databanks</button>

                            </div>

                            <div class="performance-affinity-description">
                                <tsq>Databanks keep strategies in memory for fast access.</tsq>
                                <br>
                                <tsq>They can be automatically synchronized to the disc in a preconfigured interval so that there is a backup in in case of program crash.</tsq> 
                                <tsq>Don't synchronize them too often though, it negatively impacts the performance.</tsq>
                                <br><br>
                                <tsq>Settings here are applied to all newly created databanks.</tsq> 
                                <tsq>If you want to apply them to all the existing databanks click on the button below.</tsq>
                                
                            </div>

                            <br>

                            <div class="sq-checkbox">
                                <input type="checkbox" ng-model="performance.syncDatabanksAfterTaskDone" name="SyncDatabanksAfterTaskDone"
                                    id="SyncDatabanksAfterTaskDone" />
                                <label for="SyncDatabanksAfterTaskDone" tsq>Synchronize to files automatically after task completion</label>
                            </div>
                            <div class="performance-affinity-description">
                                <tsq>If on, strategies in task's output databank will be saved to files automatically after the task is done.</tsq><br>
                                <tsq>No restart needed for this setting to take effect.</tsq>
                                
                            </div>

                            <br>

                            <div class="sq-checkbox">
                                <input type="checkbox" ng-model="performance.storeChartData" name="StoreChartData"
                                    id="StoreChartData" />
                                <label for="StoreChartData" tsq>Save chart data to .sq4 file (not recommended)</label>
                            </div>
                            <div class="performance-affinity-description">
                                <tsq>If on and you have configured to Store Chart Data in Trading Options, trades on chart are saved to .sq4 file.</tsq> 
                                <tsq>This makes the resulting file much bigger, but it allows you to view Trades on chart later.</tsq><br><br> 
                                <tsq>If off, chart data are kept only temporarily and will be thrown away when not used.</tsq><br> 
                                <tsq>You'll have to retest the strategy to get the chart data again.</tsq>
                            </div>
                        </div>

                        <!-- ------------------------------------------------------------------------------------------------------------- -->

                        <div data-item="troubleshooting">
                            <div class="sq-checkbox">
                                <input type="checkbox" ng-model="performance.gpuAccelerated" name="PerformanceDisplay"
                                    id="PerformanceDisplay" />
                                <label for="PerformanceDisplay" tsq>Accelerate internal browser using GPU</label>
                            </div>
                            <div class="performance-affinity-description">
                                <tsq>If you experience problems with GUI, such as freezing or black screen, try turning this off.</tsq><tsq>It will switch to a different rendering method.</tsq>
                            </div>

                            <br>

                            <div class="sq-checkbox">
                                <input type="checkbox" ng-model="performance.memoryProtection"
                                    name="PerformanceMemoryProtection" id="PerformanceMemoryProtection" />
                                <label for="PerformanceMemoryProtection" tsq>Use memory protection - stop projects when
                                    85% of memory is reached</label>
                            </div>
                            <div class="performance-affinity-description">
                                <tsq>This will stop your projects when SQ reaches 85% of memory usage.</tsq><br>
                                <tsq>It prevents program from freezing and being unresponsive.</tsq><br>
                                <tsq>Turn it on if you experience program freezes.</tsq>
                            </div>

                            <br>

                            <div class="sq-checkbox">
                                <input type="checkbox" ng-model="performance.debugLevelActive"
                                    name="PerformanceDebugLevelActive" id="PerformanceDebugLevelActive" />
                                <label for="PerformanceDebugLevelActive" tsq>Activate debug level</label>
                            </div>
                            <div class="performance-affinity-description">
                                <tsq>By turning this on you'll activate debug logging level.</tsq>
                                <tsq>Debug level should be used only when investigating some problem, it is much slower and produces very large log files.</tsq>
                            </div>
                        </div>

                        <!-- ------------------------------------------------------------------------------------------------------------- -->

                        <div data-item="optimizations">
                            <div class="sq-checkbox">
                                <input type="checkbox" ng-model="performance.dontStoreOP3DChartsData"
                                    name="Performance3DChart" id="Performance3DChart" />
                                <label for="Performance3DChart" tsq>Don't store data for 3D charts in Optimization profile</label>
                            </div>
                            <div class="performance-affinity-description">
                                    <tsq>Turned on by default, it saves a lot of memory both in RAM and in disk files<br>when working with Optimizations (simple or WF).</tsq>
                                    <br><br>
                                    <tsq>Data required for 3D optimization charts are very big and are usually not needed at all.</tsq>
                                    <br>
                                    <tsq>This does not affect other functionality of Optimization profile - filtering<br>and conditions will work as usual.</tsq>
                                    <br>
                                    <tsq>It also has nothing to do with Walk-Forward results charts.</tsq>
                                    <br><br>
                                    <tsq>To show 3D optimization charts just reoptimize the strategy with this setting off.</tsq>
                                </tsq>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <div class="performance-settings-footer-note" tsq>You have to restart the program to apply the settings.</div>

                <a data-dismiss="modal" tsq>Close</a>
                <button id="buttonSave-53c" type="button" class="btn btn-primary" ng-click="onSavePerformanceSettings()" tsq>Save</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../app/layout/views/popupBannerModal.html">
<div class="modal" id="popupBannerModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" data-keyboard="false">
    <div class="modal-dialog" role="document" style="width: 780px;">
        <div class="modal-content">
            <div class="modal-header">
                <button id="buttonTimes-54a" type="button" class="close" aria-label="Close" ng-click="onBannerClicked(popupBanner, true);">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel" tsq>Promo</h4>
            </div>
            <div class="modal-body" style="height: auto;">
                <img height="500" width="750" ng-src="{{popupBanner.image}}" ng-click="onBannerClicked(popupBanner);">
            </div>
            <div class="modal-footer">
                <a ng-click="onBannerClicked(popupBanner, true);" tsq>DISMISS</a>
            </div>
        </div>
    </div>
</div>

</script>
<script type="text/ng-template" id="../app/layout/views/progressModal.html">
<!-- Modal window-->
<div class="modal centered" id="progressModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="myModalLabel" ng-bind="progress.title | tsq"></h4>
            </div>
            <div class="modal-body">
                <label style="margin-bottom: 20px;" ng-bind="progress.info | tsq"></label>
                <div class="progress">
                    <div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width:{{progress.percent}}%" ng-if="progress.percent!='infinite'"> {{progress.percent}}%
                    </div>
                    <div class="progress-bar active progress-bar-infinite" role="progressbar" ng-if="progress.percent=='infinite'"></div>
                </div>
            </div>
            <div class="modal-footer">
                <a ng-show="progress.callback" ng-click="progress.callback()" class="btn-only-close" tsq>Cancel</a>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../app/layout/views/remoteAccessDialog.html">
<!-- Modal window-->
<div class="modal centered" id="remoteAccessDialog" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" tsq>Remote access</h4>
            </div>
            <div class="modal-body">
                <fieldset class="sq-fieldset">
                    <div class="header">
                        <h3>
                            <div class="sq-checkbox">
                                <input type="checkbox" ng-model="remoteAccess.allow" id="remoteAccess-allow">
                                <label for="remoteAccess-allow" tsq>Allow remote access</label>
                            </div>
                        </h3>
                    </div>
                    <div ng-show="!remoteAccess.allow" class="remote-access-description remote-access-box">
                        <tsq>By checking this you'll allow access to your StrategyQuant remotely from browser on a
                            given URL address and port.</tsq>
                        <br />
                        <tsq>Of course, StrategyQuant must be running in order to access it.</tsq>
                    </div>
                    <div ng-show="remoteAccess.allow" class="remote-access-box remote-access-box-allowed">
                        <div class="remote-access-url-desc" tsq>URL to access the system</div>
                        <div class="remote-access-url">
                            <a ng-click="openBrowser(linkURL)" ng-bind="linkURL"></a>
                        </div>
                        <div class="oneline" ng-if="$root.chromiumBrowser">
                            <div class="sq-checkbox">
                                <input type="checkbox" ng-model="remoteAccess.requirePassword" id="remoteAccess.requirePassword">
                                <label for="remoteAccess.requirePassword">
                                    <tsq>Require password</tsq>
                                </label>
                            </div>
                            <label class="sqn-label">
                                <tsq>Password</tsq>
                                <input type="password" class="sqn-input" ng-model="remoteAccess.password" ng-disabled="!remoteAccess.requirePassword"/>
                            </label>
                        </div>
                        <div class="oneline secure-connection" ng-if="false && $root.chromiumBrowser">
                            <div class="sq-checkbox">
                                <input type="checkbox" ng-model="remoteAccess.secureConnection" id="remoteAccess.secureConnection">
                                <label for="remoteAccess.secureConnection">
                                    <tsq>Secure connection</tsq>
                                </label>
                            </div>
                            <label class="sqn-label" tsq>Certificate not installed</label>
                            <button id="buttonInstall-55a" class="btn btn-default" ng-click="install" ng-disabled="!remoteAccess.secureConnection"
                                tsq>Install</button>
                        </div>
                    </div>
                </fieldset>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal" tsq>Close</a>
                <button id="buttonSave-55b" type="button" class="btn btn-primary" ng-click="onSaveRemoteAccessSettings()" tsq>Save</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../app/layout/views/saveStrategiesProgressModal.html">
<!-- Modal window-->
<div class="modal centered" id="saveStrategiesProgressModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h4 ng-if="savingProgress.isAppExit" class="modal-title" id="myModalLabel" tsq>Saving databanks before exit</h4>
                <h4 ng-if="!savingProgress.isAppExit" class="modal-title" id="myModalLabel" tsq>Synchronizing databank into files</h4>
            </div>
            <div class="modal-body">
                <label style="margin-bottom: 20px;" ng-bind="savingProgress.info"></label>
                <div class="progress">
                    <div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width:{{savingProgress.percent}}%" ng-if="savingProgress.percent!='infinite'"> {{savingProgress.percent}}%
                    </div>
                    <div class="progress-bar active progress-bar-infinite" role="progressbar" ng-if="savingProgress.percent=='infinite'"></div>
                </div>

                <div class="col col-sm-12 cancel-btn" ng-if="savingProgress.cancelCallback">
                    <button id="buttonExitWithoutSaving-56a" ng-if="savingProgress.isAppExit" class="btn btn-primary" ng-click="savingProgress.cancelCallback()" tsq>Exit without saving</button>
                    <button id="buttonCancelSaving-56b" ng-if="!savingProgress.isAppExit" class="btn btn-primary" ng-click="savingProgress.cancelCallback()" tsq>Cancel saving</button>
                </div>
                <div class="col col-sm-12 help" ng-if="savingProgress.cancelCallback">
                    <label ng-if="savingProgress.isAppExit" tsq>Please note that if you exit without saving, all new or retested strategies will not be saved</label>
                    <label ng-if="!savingProgress.isAppExit" tsq>Please note that if you cancel saving, all new or retested strategies will not be saved</label>
                </div>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../app/layout/views/smtpDialog.html">
<!-- Modal window-->
<div class="modal centered" id="smtpDialog" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" tsq>SMTP</h4>
            </div>
            <div class="modal-body smtp-dialog" style="height: auto;">
                <fieldset class="sq-fieldset">
                    <legend tsq>SMTP</legend>
                    <div class="row row-smaller">
                        <div class="col-sm-2">
                            <label class="sqn-label">
                                <tsq>SMTP Server</tsq>
                            </label>
                        </div>
                        <div class="col-sm-10">
                            <input type="text" class="sqn-input" ng-model="smtp.server" />
                        </div>
                    </div>

                    <div class="row row-smaller">
                        <div class="col-sm-2">
                            <label class="sqn-label">
                                <tsq>Port</tsq>
                            </label>
                        </div>
                        <div class="col-sm-10">
                            <sq-combo-input id="port" sq-model="smtp.port" options="smtp.ports" single="true" />
                        </div>
                    </div>

                    <div class="sq-checkbox">
                        <input type="checkbox" ng-model="smtp.ssl" id="smtp.ssl">
                        <label for="smtp.ssl">
                            <tsq>Use secure (SSL) connection</tsq>
                        </label>
                    </div>

                    <div class="row row-smaller">
                        <div class="col-sm-2">
                            <label class="sqn-label">
                                <tsq>Username</tsq>
                            </label>
                        </div>
                        <div class="col-sm-4">
                            <input type="text" class="sqn-input" ng-model="smtp.username" />
                        </div>

                        <div class="col-sm-2">
                            <label class="sqn-label">
                                <tsq>Password</tsq>
                            </label>
                        </div>
                        <div class="col-sm-4">
                            <input type="password" class="sqn-input" ng-model="smtp.password" />
                        </div>
                    </div>

                    <div class="row row-smaller">
                        <div class="col-sm-2">
                            <label class="sqn-label">
                                <tsq>Email from</tsq>
                            </label>
                        </div>
                        <div class="col-sm-4">
                            <input type="text" class="sqn-input" ng-model="smtp.emailFrom" />
                        </div>

                        <div class="col-sm-2">
                        </div>
                        <div class="col-sm-4">
                            <button id="buttonSendTestEmail-57a" type="button" class="btn btn-default smtp-send-test-btn" ng-click="smtp.sendTestEmail=true"
                                tsq>Send test email</button>
                        </div>
                    </div>

                    <div ng-show="smtp.sendTestEmail" class="smtp-send-line row row-smaller">
                        <div class="col-sm-2">
                            <label class="sqn-label">
                                <tsq>Email</tsq>
                            </label>
                        </div>
                        <div class="col-sm-10">
                            <input type="text" class="sqn-input" ng-model="smtp.recipient" />
                            <button id="buttonSend-57b" type="button" class="btn btn-default" ng-click="testSMTP()" tsq>Send</button>
                        </div>
                    </div>

                    <label ng-if="smtp.testResult" class="smtp-dialog-label" ng-bind="smtp.testResult"></label>
                </fieldset>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal" tsq>Close</a>
                <button id="buttonSave-57c" type="button" class="btn btn-primary" ng-click="onSaveSMTPSettings()" tsq>Save</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../app/layout/views/snippetsErrorDialog.html">
<div class="modal" id="snippetsErrorModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog type-warning" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button id="buttonTimes-58a" type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel" tsq>Snippets Compilation Failed!</h4>
            </div>
            <div class="modal-body">
                <tsq>Previous correct version of snippets is used. Failed snippets:</tsq><br>
                <textarea rows="12" readonly style="width: 100%; font-size:11px" ng-bind="SnippetsCompilationFailed"></textarea>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal" tsq>Close</a>
                <button id="buttonGoToCodeEditor-58b" type="button" class="btn btn-primary" ng-click="switchToCodeEditor()" tsq>Go to Code Editor</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../app/layout/views/startBuildPopup.html">
<!-- Modal window-->
<div class="modal" id="startBuildPopup" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog type-warning" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button id="buttonTimes-59a" type="button" class="close" data-dismiss="modal" aria-label="Close" ng-click="confirmDialog.onClose()"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel" tsq>Start build</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" role="form">
                    <div class="form-group">
                        <label class="col-sm-12" style="text-align: center; font-size: 16px;">
                            <tsq>Build configuration was successfully loaded.</tsq><br>
                            <tsq>Do you want to start build?</tsq>
                        </label>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <a data-dismiss="modal" tsq>Close</a>
                <button id="buttonStart-59b" type="button" class="btn btn-primary" data-dismiss="modal" ng-click="onStartConfirmed()" tsq>Start</button>
            </div>
        </div>
    </div>
</div>
</script>
<script type="text/ng-template" id="../app/login/views/login.html">
<div id="loginScreen">
    <div id="loginForm" class="container" ng-init="logout()" ng-if="!accessDisabled && settingsLoaded">
        <div class="well no-padding">
            <form class="smart-form client-form">
                <header tsq>
                    Enter the remote access password
                </header>
                <div style="margin: 8px 8px;">
                    <section>
                        <label class="label" style="color: gray" tsq>Password</label>
                        <label class="input"> 
                            <i class="fa fa-lock"></i>
                            <input type="password" ng-model="credentials.password">
                            <b class="tooltip tooltip-top-right">
                                <i class="fa fa-lock txt-color-teal"></i> 
                                <tsq>Enter your password</tsq>
                            </b> 
                        </label>
                    </section>
                </div>
                <footer>
                    <button id="buttonSubmit-60a" class="btn btn-primary" ng-click="login()" style="margin-bottom: 10px;" tsq>Submit</button>
                </footer>
            </form>
        </div>
    </div>

    <div id="access-disabled-screen" ng-if="accessDisabled && settingsLoaded" >
        <div>
            <i class="fa fa-lock" id="bigLock"></i>
            <h1 tsq>Unauthorized access. Remote access is disabled.</h1>
        </div>
    </div>

    <div ng-include="'../app/layout/views/errorDialog.html'"/>

    <span us-spinner="{radius:30, width:8, length: 16}" spinner-key="spinner-login"></span>

</div>
</script>
<script type="text/ng-template" id="../SQMANAGER/layout/views/layout.html">
<div class="sq-app-datamanager sq-app-container" ng-class="{'br-edition': isBrazilianEdition}">
    <div class="data-manager-title" ng-hide="isQuantDataManager" tsq>Data Manager</div>
    <div class="datamanager-menu-header">
        <div ng-class="{'active': ribbonActive=='home'}" ng-click="ribbonActive='home'" ng-show="isQuantDataManager">
            <tsq>Home</tsq>
        </div>
        <div ng-class="{'active': ribbonActive=='data-sources'}" ng-click="ribbonActive='data-sources'">
            <tsq>Data sources</tsq>
        </div>
        <div ng-class="{'active': ribbonActive=='export'}" ng-click="ribbonActive='export'">
            <tsq>Export</tsq>
        </div>
        <div ng-class="{'active': ribbonActive=='tools'}" ng-click="ribbonActive='tools'">
            <tsq>Tools</tsq>
        </div>
        <div ng-class="{'active': ribbonActive=='instruments-sessions'}" ng-click="ribbonActive='instruments-sessions'">
            <tsq>Instruments and Sessions</tsq>
        </div>

        <div ng-show="!isQuantDataManager" ng-class="{'active': ribbonActive=='custom-data'}"
            ng-click="ribbonActive='custom-data'">
            <tsq>External indicators</tsq>
        </div>
	
        <div ng-show="!isQuantDataManager" ng-class="{'active': ribbonActive=='baskets'}" ng-click="ribbonActive='baskets'">
            <tsq>Stock groups</tsq>
        </div>		

        <div ng-show="true" ng-class="{'active': ribbonActive=='brokers'}" ng-click="ribbonActive='brokers'">
            <tsq>Broker profiles</tsq>
        </div>		
    </div>
    <div class="datamanager-menu">
        <div ng-if="actions.firstTools.length>0" ng-class="{'active': ribbonActive=='data-sources'}">
            <span
                ng-repeat="action in actions.firstTools | filter: {group: 'data-source'} | orderBy: '+position' track by $index">
                <div class="menu-button" ng-click="action.enabled&&onSelectAction(action)"
                    ng-class="[{'disabled':!action.enabled},action.class]" id="{{action.id}}">{{action.title
                    | tsq}}</div>
                <span ng-dynamic-controller="action.controller" ng-include="action.templateUrl" />
            </span>
        </div>

        <div ng-class="{'active': ribbonActive=='data-sources'}" class="right-separator">
            <span ng-repeat="dataSource in actions.dataSources">
                <span ng-repeat="combo in dataSource | orderBy: '+position' track by $index">
                    <sq-combo-button title="{{combo.title | tsq}}" actions="combo.options"
                        on-select="onSelectAction(action, item)" ng-class="[{'disabled':!combo.enabled},combo.class]"
                        id="{{combo.id}}" ng-disabled="!combo.enabled" />
                </span>
            </span>
        </div>

        <div ng-class="{'active': ribbonActive=='data-sources'}">
            <span
                ng-repeat="action in actions.tools | filter: {group: 'data-source'} | orderBy: '+position' track by $index">
                <div class="menu-button" ng-click="action.enabled&&onSelectAction(action)"
                    ng-class="[{'disabled':!action.enabled},action.class]" id="{{action.id}}">{{action.title
                    | tsq}}</div>
                <span ng-dynamic-controller="action.controller" ng-include="action.templateUrl" />
            </span>
        </div>

        <div ng-class="{'active': ribbonActive=='export'}">
            <span ng-repeat="action in actions.exports | orderBy: '+position' track by $index">
                <div class="menu-button" ng-click="action.enabled&&onSelectAction(action)"
                    ng-class="[{'disabled':!action.enabled},action.class]" id="{{action.id}}">{{action.title
                    | tsq}}</div>
                <span ng-dynamic-controller="action.controller" ng-include="action.templateUrl" />
            </span>
        </div>

        <div ng-class="{'active': ribbonActive=='tools'}">
            <span ng-repeat="action in actions.tools | filter: {group: '!!!'} | orderBy: '+position' track by $index">
                <div class="menu-button" ng-click="action.enabled&&onSelectAction(action)"
                    ng-class="[{'disabled':!action.enabled},action.class]" id="{{action.id}}">{{action.title
                    | tsq}}</div>
                <span ng-dynamic-controller="action.controller" ng-include="action.templateUrl" />
            </span>
        </div>

        <div ng-class="{'active': ribbonActive=='instruments-sessions'}">
            <span ng-repeat="action in actions.instruments | orderBy: '+position' track by $index">
                <div class="menu-button" ng-click="action.enabled&&onSelectAction(action)"
                    ng-class="[{'disabled':!action.enabled},action.class]" id="{{action.id}}">{{action.title
                    | tsq}}</div>
                <span ng-dynamic-controller="action.controller" ng-include="action.templateUrl" />
            </span>

            <span ng-repeat="action in actions.sessions | orderBy: '+position' track by $index">
                <div class="menu-button" ng-click="action.enabled&&onSelectAction(action)"
                    ng-class="[{'disabled':!action.enabled},action.class]" id="{{action.id}}">{{action.title
                    | tsq}}</div>
                <span ng-dynamic-controller="action.controller" ng-include="action.templateUrl" />
            </span>

            <span
                ng-repeat="action in actions.tools | filter: {group1: 'instruments-sessions'} | orderBy: '+position' track by $index">
                <div class="menu-button" ng-click="action.enabled&&onSelectAction(action)"
                    ng-class="[{'disabled':!action.enabled},action.class]" id="{{action.id}}">{{action.title
                    | tsq}}</div>
                <span ng-dynamic-controller="action.controller" ng-include="action.templateUrl" />
            </span>
        </div>

        <div ng-show="!isQuantDataManager" ng-class="{'active': ribbonActive=='custom-data'}">
            <span ng-repeat="action in actions.customData | orderBy: '+position' track by $index">
                <div class="menu-button" ng-click="action.enabled&&onSelectAction(action)"
                    ng-class="[{'disabled':!action.enabled},action.class]" id="{{action.id}}">{{action.title
                    | tsq}}</div>
                <span ng-dynamic-controller="action.controller" ng-include="action.templateUrl" />
            </span>

            <span
                ng-repeat="action in actions.tools | filter: {group2: 'custom-data'} | orderBy: '+position' track by $index">
                <div class="menu-button" ng-click="action.enabled&&onSelectAction(action)"
                    ng-class="[{'disabled':!action.enabled},action.class]" id="{{action.id}}">{{action.title
                    | tsq}}</div>
                <span ng-dynamic-controller="action.controller" ng-include="action.templateUrl" />
            </span>
        </div>
		
        <div ng-show="!isQuantDataManager" ng-class="{'active': ribbonActive=='baskets'}" class="right-separator">
            <span ng-repeat="action in actions.baskets | orderBy: '+position' track by $index">
                <div class="menu-button" ng-click="action.enabled&&onSelectAction(action)"
                    ng-class="[{'disabled':!action.enabled},action.class]" id="{{action.id}}">{{action.title
                    | tsq}}</div>
                <span ng-dynamic-controller="action.controller" ng-include="action.templateUrl" />
            </span>	
			
			<span
                ng-repeat="action in actions.tools | filter: {group3: 'baskets'} | orderBy: '+position' track by $index">
                <div class="menu-button" ng-click="onSelectAction(action)"
                    ng-class="[action.class]" id="{{action.id}}">{{action.title
                    | tsq}}</div>
                <span ng-dynamic-controller="action.controller" ng-include="action.templateUrl" />
            </span>			
        </div>

        <div ng-class="{'active': ribbonActive=='brokers'}" class="right-separator">
            <span ng-repeat="action in actions.brokers | orderBy: '+position' track by $index">
                <div class="menu-button" ng-click="action.enabled&&onSelectAction(action)"
                    ng-class="[{'disabled':!action.enabled},action.class]" id="{{action.id}}">{{action.title
                    | tsq}}</div>
                <span ng-dynamic-controller="action.controller" ng-include="action.templateUrl" />
            </span>	
			
			<span
                ng-repeat="action in actions.tools | filter: {group3: 'baskets'} | orderBy: '+position' track by $index">
                <div class="menu-button" ng-click="onSelectAction(action)"
                    ng-class="[action.class]" id="{{action.id}}">{{action.title
                    | tsq}}</div>
                <span ng-dynamic-controller="action.controller" ng-include="action.templateUrl" />
            </span>			
        </div>        
    </div>

    <div class="datamanager-progress">
        <div class="dataManagerFlexRow">
            <span class="settings-title" tsq>Progress</span>	
            <div class="progress" id="logTotalProgress">
                <div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100"
                    style="width:{{progress}}%">{{progressLabel}}</div>
            </div>
        </div>

        <div class="data-manager-data-header-right">
            <div class="toolbar">
                <button id="buttonPauseAll-70a" ng-hide="batchActionPaused" type="button" class="btn btn-default"
                    ng-click="batchAction('pause')" id="datamanager-pause-all-main">
                    <i class="fa fa-pause-circle-o" aria-hidden="true"></i>
                    <tsq>Pause all</tsq>
                </button>
                <button id="buttonContinueAll-70b" ng-show="batchActionPaused" type="button" class="btn btn-default"
                    ng-click="batchAction('continue')" id="datamanager-continue-all-main">
                    <i class="fa fa-play-circle-o" aria-hidden="true"></i>
                    <tsq>Continue all</tsq>
                </button>
                <button id="buttonStopAll-70c" type="button" class="btn btn-default" ng-click="batchAction('stop')"
                    id="datamanager-stop-all-main">
                    <i class="fa fa-stop-circle-o" aria-hidden="true"></i>
                    <tsq>Stop all</tsq>
                </button>
                <a class="link-button" ng-click="showDownloadCountConfig()" title="Download settings"><i class="fa fa-cog"></i></a>
            </div>
        </div>
    </div>

    <quant-tabs class="datamanager-main-tabs" id="datamanager-main-tabs" instance="mainTabs" translate-headers="true" />

    <iframe id="iframe_qdm_no_data" src="../app/layout/views/noDataHelpScreenQDM.html" ng-class="{'shown': noData}" />
</div>

<sq-utils />

<apps-zoom ng-show="false" />
<language-menu ng-show="false" />

<div ng-include="'../SQMANAGER/layout/views/configDownloadPopup.html'"></div>
</script>
<script type="text/ng-template" id="../QDM/layout/views/layout.html">
<div class="sq4-wrapper" ng-class="{'sq4-layout-tiny':(menuSize==1),'sq4-layout-large':(menuSize==2)}">
    <div class="qdm-banner-top" ng-show="topBanner">
        <img height="90" width="728" ng-src="{{topBanner.image}}" ng-click="onBannerClicked(topBanner)">
    </div>

    <div class="sq4-maincontent">
        <iframe id="iframe_dm" src="../SQMANAGER/index.html" name="sq4_mainframe" class="sq4-mainframe" />
    </div>
    <div class="sq4-mainfooter">
        <span class="custom-footer-text">{{footerCustomText}}</span>

        <tsq>Build</tsq>: {{appVersion}}
        
        <a ng-click="openLinkBugs()">
            <i class="fa fa-bug" aria-hidden="true"></i>
            <tsq>Report Bug</tsq>
        </a>
        |
        <a ng-click="openLinkSuggestIdea()">
            <i class="fa fa-lightbulb-o" aria-hidden="true"></i>
            <tsq>Suggest an Idea</tsq>
        </a>
        |
        <a ng-click="onSettings()">
            <i class="fa fa-info-circle" aria-hidden="true"></i>
            <tsq>Settings</tsq>
        </a>
        |
        <a ng-click="onAbout()">
            <i class="fa fa-info-circle" aria-hidden="true"></i>
            <tsq>About</tsq>
        </a>
        |
        <a ng-click="onUpdateLicense()">
            <i class="fa fa-info-circle" aria-hidden="true"></i>
            <tsq>Update your license</tsq>
        </a>

        <a ng-if="$root.developmentMode" ng-click="regenerate()">
            <tsq>Regenerate</tsq>
        </a>
    </div>

    <div ng-include="'../../../plugins/HomeAbout/views/about.html'" ng-controller="AboutCtrl" />
    <div ng-include="'../app/layout/views/snippetsErrorDialog.html'"></div>
    <div ng-include="'../app/layout/views/customProjectNotifPopup.html'"></div>
    <div ng-include="'../app/layout/views/initSettings.html'"></div>
    <div ng-include="'../app/layout/views/popupBannerModal.html'"></div>
</div>

<sq-utils />
</script>
