Skip to content

Instantly share code, notes, and snippets.

@antonblockchain
antonblockchain / rest-server.py
Created June 28, 2023 16:04 — forked from miguelgrinberg/rest-server.py
The code from my article on building RESTful web services with Python and the Flask microframework. See the article here: http://blog.miguelgrinberg.com/post/designing-a-restful-api-with-python-and-flask
#!flask/bin/python
from flask import Flask, jsonify, abort, request, make_response, url_for
from flask_httpauth import HTTPBasicAuth
app = Flask(__name__, static_url_path = "")
auth = HTTPBasicAuth()
@auth.get_password
def get_password(username):
if username == 'miguel':
@antonblockchain
antonblockchain / Signal2Channel.mq4
Created January 21, 2019 17:25 — forked from stevenengland/Signal2Channel.mq4
Sample implementation: How to send trading signals from Metatrader to Telegram channel/group/private chat with Telegram4MQL
//+------------------------------------------------------------------+
//| Signal2Channel.mq4 |
//| steven england |
//| https://Telegram4MQL.steven-england.info |
//+------------------------------------------------------------------+
#property copyright "steven england"
#property link "https://Telegram4MQL.steven-england.info"
#property version "1.00"
#import "Telegram4Mql.dll"
@antonblockchain
antonblockchain / gist:c1f452bd25e5bc28e0988fdc2a6943dd
Created April 30, 2018 17:20 — forked from carlos8f/gist:b09a734cf626ffb9bb3bcb1ca35f3db4
zenbot sim result, BTC-USD, 90 days, 195.45% profit, 61.06% over buy/hold
2017-05-11 16:00:00 1832.97 USD -0.06% 619.75 + 0.0447 null 1.91% 0.031060 BTC 2897.41 USD 195.43% +61.48%
{ days: 90,
profit_stop_enable_pct: 10,
profit_stop_pct: 1,
sell_rate: -0.006,
trend_ema: 36,
period: '1h',
strategy: 'trend_ema_rate',
sell_stop_pct: 4,
buy_stop_pct: 0,