Skip to content

Instantly share code, notes, and snippets.

View makuchaku's full-sized avatar

makuchaku makuchaku

View GitHub Profile
//@version=4
//@author=LucF
// Pivots MTF [LucF]
// v1.3, 2020.12.16 08:43 — LucF
// Shows Hi/Lo pivots using a user-selected higher timeframe.
// This code was written using the following standards:
// • PineCoders Coding Conventions for Pine: http://www.pinecoders.com/coding_conventions/
@makuchaku
makuchaku / chartmill-backtest.py
Created October 6, 2019 01:37
chartmill-backtest.py
import json
from datetime import datetime, timedelta
# Copies logic from https://www.quantconnect.com/tutorials/strategy-library/fundamental-factor-long-short-strategy
# Algo storing - https://www.quantconnect.com/docs/algorithm-framework/algorithm-scoring
class ChartMillBackTester(QCAlgorithm):
def Initialize(self):
self.SetCash(1000*100) # Are't we rich? :D
@makuchaku
makuchaku / chartmill_backtest.py
Created October 3, 2019 00:36
chartmill_backtest : for Technical breakout setups scanner
import json
from datetime import datetime, timedelta
# Copies logic from https://www.quantconnect.com/tutorials/strategy-library/fundamental-factor-long-short-strategy
# Algo storing - https://www.quantconnect.com/docs/algorithm-framework/algorithm-scoring
class ChartMillBackTester(QCAlgorithm):
def Initialize(self):
self.SetCash(1000*1000) # Are't we rich? :D
require "freshdesk"
client = Freshdesk.new("http://domain.freshdesk.com/", "username", "password")
client.response_format = "json"
ticket = client.post_tickets({:email => "[email protected]", :description => "description", :subject => "subject", :status => 1, :priority => 1})
@makuchaku
makuchaku / index.html
Created August 16, 2012 05:38
This is just an experiment! There are certainly better ways to show an image of a MacBook, but none as fun as this :)
<i class="macbook"></i>
@makuchaku
makuchaku / gist:2768373
Created May 22, 2012 11:05
Test for open/close connections
<?PHP
require_once('../site_config.php'); // include the required classes to make MongoBase class work
class MongoFoo extends Mongo_ModelBase {
}
for($i=0; $i<100; $i++)
{
$mFoo = new MongoFoo();
}
saveSurvey : function(survey, successCb, errorCb) {
errorCb = errorCb || function(){};
// save the user
this.save(
{survey : survey},
{
success : function() {successCb();},
error : function() {errorCb();}
}
@makuchaku
makuchaku / bug_branch.sh
Created March 19, 2012 07:24
Git workflow in bash scripts
############ WORK IN PROCESS ############
# -- Copy (append) the following script to your ~/.bashrc file and restart console --
## Workflow ##
# Suppose the current deploy branch is deploy_x_y
# Suppose you have to start work on Bug #100
# Run "bbcreate 100" => a new branch 100_bug will be created out of deploy_x_y and will be checked out (ready to start work)
# You work and finish the changes in your 100_bug branch
# Run "bbpush" to add + commit + push your changes into 100_bug branch. Commit log will be "Fixes for #100"
# You can do bbpush multiple times you like
<div class="bubble" style="background: red; border-color: red;">test</div>
<div class="bubble" style="background: green; border-color: green;">test</div>
<style>
.bubble {
margin: 50px;
padding: 50px;
position: relative;
}
.bubble:after {
@makuchaku
makuchaku / gist:1619192
Created January 16, 2012 05:19
Bash script for a pretty looking command prompt with GIT support
############### GIT ################
function parse_git_branch {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo "("${ref#refs/heads/}")"
}
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"