我有这个烧瓶应用程序路线:
@app.route('/generatecleanbudgetfile', methods=['GET', 'POST'])
def clean_budget():
file = request.files.get('data_file')
app.logger.info('Budget Formatting request has started')
try:
if request.method == 'POST':
file = request.files.get('data_file')
file.seek(0)
buffer = budget_cleaner(file)
buffer.seek(0)
app.logger.info('Conversion Complete')
return send_file(
buffer,
as_attachment=True,
attachment_filename=f'stripped_budget_{dt.today().strftime("%m.%d.%Y")}.xlsx',
mimetype='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
)
except:
app.logger.error(f"Budget formatting failed on {file}")
return render_template('error_type.html', title='Unable to process uploaded budget')
Run Code Online (Sandbox Code Playgroud)
我的HTML:
{% extends "base.html" %}
{% block head %}
{% endblock %}
{% block content %}
<div id="vo_budget_file_settings">
{# <a href="/generatecleanbudgetfile" class="btn btn-primary">Upload Final CRO Budget File</a> #}
<p id="uploadPara">Please upload …
Run Code Online (Sandbox Code Playgroud) 我似乎无法弄清楚从交易进入的特定时间间隔退出交易的语法。任何帮助将不胜感激。
if (crossover(delta, 0))
strategy.entry("Long", strategy.long, comment="Long")
strategy.exit("Exit", "Long", when = 15)
Run Code Online (Sandbox Code Playgroud)
上面的代码我想exit
在15天后建立多头头寸。但这似乎不起作用。