121 lines
7.9 KiB
HTML
121 lines
7.9 KiB
HTML
<!-- Edit Indicator Panel -->
|
|
<div id="edit_indcr_panel" style="width: 1025px; height: 300px; grid-column: 1;">
|
|
<!-- Edit Indicator Heading -->
|
|
<div id="edit_indcr_head" style="width: 1025px; display: grid; grid-template-columns: 75px 150px repeat(8, 100px);">
|
|
<div id="h_name" style="width: 150px; grid-column: 2;">Indicator Name</div>
|
|
<div id="h_properties" style="grid-column: 3/11;">Properties</div>
|
|
</div>
|
|
<hr>
|
|
<!-- Edit Indicator Rows of individual forms to edit each indicator --!>
|
|
{% for indicator in indicator_list %}
|
|
<form action="/settings" method="post" >
|
|
<input type="hidden" name="setting" value="edit_indicator"/>
|
|
<div class="ierow">
|
|
<div id="edit_indctr_controls">
|
|
<button type="submit" name="delete" class="e_btn" value="{{indicator}}">✘</button>
|
|
<button type="submit" name="submit" style ="color:darkgreen;" class="e_btn" value="{{indicator}}">✔</button>
|
|
</div>
|
|
<div class="iename">{{indicator}}</div>
|
|
<div id="ieprop_container">
|
|
{% for property in indicator_list[indicator] %}
|
|
|
|
{% set list1 = property.split('_') %}
|
|
<div class="ieprop" >
|
|
<label class="ietextbox" for="{{indicator}}_{{property}}">{{property}}</label>
|
|
{% if property=='type' %}
|
|
<select class="ietextbox" id="{{indicator}}_{{property}}" name="{{property}}">
|
|
{% for i_type in indicator_types %}
|
|
<option value="{{i_type}}" {% if indicator_list[indicator][property] == i_type %} selected="selected"{%endif%}>{{i_type}}</option>
|
|
{% endfor %}
|
|
</select>
|
|
{% elif property=='ma' %}
|
|
<select class="ietextbox" id="{{indicator}}_{{property}}" name="{{property}}">
|
|
{% for ma_val in ma_vals %}
|
|
<option value="{{ma_vals[ma_val]}}" {% if indicator_list[indicator][property] == ma_vals[ma_val] %} selected="selected"{%endif%}>{{ma_val}}</option>
|
|
{% endfor %}
|
|
</select>
|
|
{% elif property=='color' or list1[0]=='color' %}
|
|
<input class="ietextbox" type="color" id="{{indicator}}_{{property}}"
|
|
value="{{indicator_list[indicator][property]}}"
|
|
name="{{property}}">
|
|
{% elif property=='period' %}
|
|
<input class="ietextbox" type="number" id="{{indicator}}_{{property}}"
|
|
value="{{indicator_list[indicator][property]}}"
|
|
name="{{property}}">
|
|
{% elif property=='visible' %}
|
|
<input class="ietextbox" type="checkbox" id="{{indicator}}_{{property}}"
|
|
value="{{indicator_list[indicator][property]}}"
|
|
name="{{property}}"
|
|
{% if indicator in checked %} checked{%endif%}>
|
|
{% elif property=='value' %}
|
|
<input class="ie_value" type="number" id="{{indicator}}_{{property}}"
|
|
value="{{indicator_list[indicator][property]}}"
|
|
name="{{property}}" readonly>
|
|
{% else %}
|
|
<input class="ietextbox" type="text" id="{{indicator}}_{{property}}"
|
|
value="{{indicator_list[indicator][property]}}"
|
|
name="{{property}}">
|
|
{%endif%}
|
|
</div><!-- end row of properties --!>
|
|
{% endfor %}
|
|
</div><!-- end row of specific_property container --!>
|
|
</div><!-- end of row container --!>
|
|
</form>
|
|
{% endfor %}
|
|
<!-- End of Rows of individual forms to edit each indicator --!>
|
|
<form action="/settings" method="post" id="new_i_form">
|
|
<input type="hidden" name="setting" value="new_indicator"/>
|
|
<hr>
|
|
<!-- Create indicator div container --!>
|
|
<div id="create_indcr_container">
|
|
<h1>Add Indicator</h1>
|
|
<label for "newi_name">Indicator Name</label><input type ="text" name="newi_name" value="New Indicator">
|
|
<label for "newi_type">Type</label>
|
|
<select id="newi_type" name="newi_type">
|
|
{% for i_type in indicator_types %}
|
|
<option value="{{i_type}}">{{i_type}}</option>
|
|
{% endfor %}
|
|
</select>
|
|
<br><br>
|
|
<span>Properties: <span id="new_prop_list"></span></span>
|
|
<button name="add_prop_clear" id="add_prop_clear" style="color:darkred;" type="button" value="add_prop_clear" onclick="document.getElementById('new_prop_list').innerHTML=''">✘</button>
|
|
|
|
<br><br>
|
|
<div id="add_prop_container" name="add_prop_container">
|
|
<label for "new_prop_name">Property Name</label>
|
|
<input type="text" id="new_prop_name" name="new_prop_name" value="name">
|
|
<br>
|
|
<label for "new_prop_value">Property Value</label>
|
|
<input type="text" id="new_prop_value" name="new_prop_value" value="value">
|
|
<button name="add_prop" id="add_prop" type="button" value="add_prop" style="color:darkgreen;" onclick="UI.indicators.add_to_list()">✙</button>
|
|
<label for "add_prop">Add Property</label>
|
|
|
|
</div>
|
|
<br>
|
|
<!-- Trading pair selector -->
|
|
<label for="ei_symbols" >Trading Pair</label>
|
|
<input list="ei_symbols" name="ei_symbol" id="ei_symbol" style="width: 96px;">
|
|
<datalist id="ei_symbols">
|
|
{% for symbol in symbols %}
|
|
<option>{{ symbol }}</option>
|
|
{% endfor %}
|
|
</datalist>
|
|
<!-- Time timeframe selector -->
|
|
<select id="ei_timeframe" name="ei_timeframe">
|
|
{% for time_frame in intervals %}
|
|
<option {% if time_frame == interval_state %} selected="selected" {%endif%}>{{ time_frame }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
<!-- Exchange selector -->
|
|
<select id="ei_exchange_name" name="ei_exchange_name">
|
|
{% for exchange in exchanges %}
|
|
<option {% if exchange == selected_exchange %} selected="selected" {%endif%}>{{ exchange }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
|
|
<button type="button" onclick="UI.indicators.submit_new_i()" name="create_indicator" id="create_indicator" >Create New Indicator</button>
|
|
<input type="hidden" id="new_prop_obj" name="new_prop_obj" value="">
|
|
</div> <!-- End of Create indicator div container --!>
|
|
</form>
|
|
</div><!-- End of Edit Indicator Panel -->
|