This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require("dotenv").config() | |
const fetch = require("node-fetch") | |
const ledger = process.env.FLUREE_DEFAULT_LEDGER | |
const param = JSON.stringify({ | |
select: ["*", {"sysuser": ["*"]}], | |
from: "user" | |
}) | |
let headers = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fluree properties | |
# These settings are base properties that control how Fluree operates. All of these settings can | |
# be over-ridden by environment variables or passing a java property flags (i.e. -Dfdb-mode=dev) at startup. | |
# Environment variables take precedent over java property flags which take precedent over settings in this file. | |
############################################################ | |
### Base Settings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 完整来源 (Metatrader, MQL, 类似 C++): | |
// https://www.earnforex.com/metatrader-indicators/volume-profile/ | |
void VolumeProfileCalculate(){ | |
// 根据参数设置找到起始bar数 | |
int BarStart=iBarShift(Symbol(),VPTimeFrame,StartTime); | |
// 如果要整跟 KLINE 都做统计 (=Whole), 还是一根 KLINE 只统计 Close 或 Open | |
int PriceHighMode=MODE_CLOSE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clc | |
clear all | |
disp('get GBPUSD M5 data...'); | |
getPrice ; % get P | |
disp('done!'); | |
train_ratio = 0.7 ; | |
nIter = 100; | |
epsilon = 10^(-10); | |
cci_period = 14 ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
Comment: https://keybase.io/download | |
Version: Keybase Go 1.0.17 (windows) | |
xsFNBFgSKBUBEADEW4mgUeR88EVfurQKVj3UP4RlO+FGwPRSqHipdZm8r0pX7k9E | |
w0+L+ZPBjzWWBrI9p7hm4I+h8f2N3XMcuhyzhpYcr+VP0HLW/MNMsNa8h4s+78LN | |
1qLORZBsE0ZinGoL/iwFZOv6gxAnoSQ+AzA+NwzfGsstt65xllcJZpof8WuJdPUX | |
sIxN2qp+wEKr/dDpE1Jj435K34tp3NF+WhuCu3Y6+xK7OX6iMsCcXjiPZJDoz0J4 | |
lEoDeaAmHuri1Sjwe00R99YaoYET4WO8SDw2i7X07x/AY4NdZ3Vm2FOJrlbiDIVa | |
KDjbXhveXRx2HctAv8lFnUIsn7Pas91l6U+vVmEMBg7baza96tR+qpbPNap6koDe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-----BEGIN PGP MESSAGE----- | |
Version: Keybase OpenPGP v2.0.73 | |
Comment: https://keybase.io/crypto | |
wcFMA+ICheZXm1RGAQ/+JSwo+Jh7kHUxOi+NQ1xYRzYOtZor4nqt9WHcpM3yqnYJ | |
Uzk+RMmRLw0VuPHdJ+gkNz6ZvBFmFojri3wh1Y4jx6xatnv4vFEU8iV6mRhQRPb3 | |
8EQqJatt5P/6aoxQSfKpKi8lG11iAUz5VA09S+qDNKYOh7ygvI3dBSYlqenFnoOC | |
yDxtC+bPIS12ukfu0xZRBT3CsilfJCslEJug6i2cz4QsaPTBSYmKSTc4pIE5Oh7p | |
+UUHs06CK5+ina471eNXKirKO1eNeD3epcC1Dl2GQMpkgXcBYEOaq/H9hFp5ZtlC | |
4PHkrCgVXdNY/7JX3p2BEJXXxKmvdr+uefUfacygPvlBvjDk7Q1bINEsUDiZrbe8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% 寫一個函數來得到 MTF | |
% 輸入 : | |
% - all_ts < 1 x N double > 時間序列資料 | |
% - window_size < int > 資料窗格大小(類似技術指標的參數) | |
% - rolling_length < int > 每次滾動移動大小 | |
% - 可以抓 window_size 的 1/8 ~ 1/10 做觀察, 若和 window_size 一樣,資料就不會重疊 | |
% - quantile_size < int > 分位數,就是可以快速地做 K 分位數 (當 quantile_size = 4 就會有四分位數 ) | |
function markov_field = mtfDemoFunction( all_ts, window_size, rolling_length, quantile_size ) | |
% 清理畫面和關閉顯示的圖 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from ib.ext.Contract import Contract | |
from ib.opt import ibConnection, message | |
from time import sleep, strftime | |
import pandas as pd | |
import numpy as np | |
################# 請記得開啟 TWS 並將 API port 設定為 7496 #################### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun build-variable () | |
(interactive) | |
(let | |
;; 擷取當前那行程式碼並依照空格分開來 | |
((line-string (split-string (thing-at-point 'line t)))) | |
;; 刪除原本那行 | |
(kill-whole-line) | |
;; 新的一行會從原本那行第一個元素和剩下元素但首字大寫做合併 | |
(setq new-line-string (apply 'concat (append (list (first line-string)) (mapcar 'capitalize (cdr line-string))))) | |
;; 插入新的那行 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Packed shepherd together with mincemeat for convenience | |
(import [mincemeat.shepherd [run_server]]) | |
; chunker is temporarily broken | |
;(defn chunker [gen size] | |
; (let [[gen (iter gen)] | |
; [chunk []] | |
; (try | |
; (while True | |
; (for [_ (xrange size)] |
NewerOlder