Skip to content

Instantly share code, notes, and snippets.

View elja's full-sized avatar

Alex Eliseev elja

View GitHub Profile
def initialize(state):
pass
@schedule(interval="6h", symbol="BTCUSDT")
def handler(state, data):
'''
1) Compute indicators from data and add parameters into strategy
'''
//@version=5
// Copyright all rights reserved to DaviddTech
indicator('DEMA + Vumanuchi Swing (Alert)', overlay=true)
// Timeframe 5m, BTCUSDT
// ****************************************************************************//
// ---------------------------------> Edit here ------------------------------ //
// ****************************************************************************//
st_isPlot = input.bool(true, 'Plot strategy indicators(except oscillators)', group='Strategy: base')
import asyncio
import random
import faust
import sentry_sdk
import logging
import time
from scheduler.schemas import trade_schema, strategy_schema, StrategyScheduler
from scheduler.db_loader import load_strategies
//@version=5
indicator('Bot ELB Buy Sell', overlay=true, format=format.price, precision=2)
Periods = input(title='ATR Period', defval=1)
src = input(hl2, title='Source')
Multiplier = input.float(title='ATR Multiplier', step=0.1, defval=3.0)
ConfirmInterval = input.int(title='Signal Confirmaion (Milliseconds)', step=1000, defval=5000)
changeATR = input(title='Change ATR Calculation Method ?', defval=true)
showsignals = input(title='Show Buy/Sell Signals ?', defval=true)
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © DonovanWall
//██████╗ ██╗ ██╗
//██╔══██╗██║ ██║
//██║ ██║██║ █╗ ██║
//██║ ██║██║███╗██║
//██████╔╝╚███╔███╔╝
//╚═════╝ ╚══╝╚══╝
{% if product.has_multiple_quantity_option? %}
<table class="product-summary">
<thead>
<tr><th colspan="4">Summary</th></tr>
</thead>
<tbody>
{% assign total_price = 0 %}
{% for line_item in line_items %}
<tr>
{% for choice in line_item.choices %}
class Repository {
protected:
SQLManager *dbManager = NULL;
virtual string _getTableName() = 0;
virtual vector<string> _getColumnNames() = 0;
virtual bool _insertRecord(RepositoryObject *object) = 0;
virtual bool _updateRecord(RepositoryObject *object) = 0;
virtual void _createSchema() = 0;
#include <iostream>
#include <iomanip>
#include <stdexcept>
#include <vector>
#include <cstdlib>
#include <sstream>
#include <cstring>
#include <algorithm>
using namespace std;
<div class="product {% if product.featured %} featured {% endif %}" data-product-url="{{ product | product_url }}">
<div class="image-carousel">
{% if product.images != empty %}
<ul>
{% for image in product.images %}
<li {% if image.image_url == product.thumbnail_image.image_url %}class="start"{% endif %}><img src="{{ image.small_url }}"/></li>
{% endfor %}
</ul>
{% if product.images.size > 1 %}
<a href="javascript:void(0)" onclick="$(this).closest('.image-carousel').jcarousel('scroll', '-=1');"
<table class="product-summary">
<thead>
<tr><th colspan="4">Summary</th></tr>
</thead>
<tbody>
{% assign total_price = 0 %}
{% for line_item in line_items %}
{% if product.has_multiple_quantity_option? %}
<tr>
{% for choice in line_item.choices %}