Skip to content

Instantly share code, notes, and snippets.

View femtotrader's full-sized avatar

FemtoTrader femtotrader

View GitHub Profile
@femtotrader
femtotrader / uuid.mqh
Created January 3, 2015 17:23
Universally Unique IDentifier (UUID) URN Namespace for Metatrader
//+------------------------------------------------------------------+
//| uuid.mqh |
//| Universally unique identifier |
//| Copyright © 2014, FemtoTrader |
//| https://sites.google.com/site/femtotrader/ |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2014, FemtoTrader"
#property link "https://sites.google.com/site/femtotrader/"
#property version "1.00"
#property strict
@femtotrader
femtotrader / string_toolbox.mqh
Created January 3, 2015 17:26
String toolbox for Metatrader
//+------------------------------------------------------------------+
//| string_toolbox.mqh |
//| Copyright © 2014, FemtoTrader |
//| https://sites.google.com/site/femtotrader/ |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2014, FemtoTrader"
#property link "https://sites.google.com/site/femtotrader/"
#property version "1.00"
//+------------------------------------------------------------------+
//| Enclose string with simple quote (') |
@femtotrader
femtotrader / json_toolbox.mqh
Created January 3, 2015 17:28
JSON toolbox to create JSON files from Metatrader
//+------------------------------------------------------------------+
//| json_toolbox.mqh |
//| Copyright © 2014, FemtoTrader |
//| https://sites.google.com/site/femtotrader/ |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2014, FemtoTrader"
#property link "https://sites.google.com/site/femtotrader/"
#property version "1.00"
#include <string_toolbox.mqh>
'''
Netfonds import 5 days of intraday data
'''
import numpy as np
import pandas as p
from pandas.tseries.offsets import *
import datetime as dt
import matplotlib.pyplot as plt
size = (14,10)
@femtotrader
femtotrader / Free_Intraday_StockData_Test_BarChart_API_Gist.py
Created September 24, 2015 13:02 — forked from BlackArbsCEO/Free_Intraday_StockData_Test_BarChart_API_Gist.py
Example code from 'Get Free Intraday Stock Data With Python and BarChart OnDemand API' blog post.
# -*- coding: utf-8 -*-
import time
t0 = time.clock()
import pandas as pd
from pandas.tseries.offsets import BDay
import numpy as np
import datetime as dt
from copy import copy
@femtotrader
femtotrader / ipython_btc_part1
Created October 1, 2015 06:00 — forked from charlesDADI/ipython_btc_part1
Art of trading and analyse Bitcoin data_part1
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
##############################################################
## ##
## VaR and C-VaR computation with ETV on EURUSD ##
## ##
## by Charles-Abner Dadi ##
## ##
## <charles-abner.dadi@graduates.centraliens.net> ##
## ##
##############################################################
#http://scikit-learn.org/stable/auto_examples/applications/face_recognition.html#example-applications-face-recognition-py
from sklearn.ensemble import RandomForestClassifier
from numpy import genfromtxt, savetxt
from sklearn import neighbors, datasets
from sklearn.cross_validation import train_test_split
from sklearn.datasets import fetch_lfw_people
from sklearn.grid_search import GridSearchCV
from sklearn.metrics import classification_report
from sklearn.metrics import confusion_matrix
@femtotrader
femtotrader / web-crawling
Created October 1, 2015 06:01 — forked from charlesDADI/web-crawling
How make web crawling quickly using python and mongoDB
# -*- coding: utf-8 -*-
"""
Created on Mon Feb 17 13:56:10 2014
@author: root
"""
import urllib2
opener = urllib2.build_opener()
from bs4 import BeautifulSoup
Verifying that +femtotrader is my blockchain ID. https://onename.com/femtotrader