Skip to content

Instantly share code, notes, and snippets.

@andredumas
andredumas / README.md
Last active September 28, 2016 11:58
TechanJS RSI

RSI calculation and rendering demo.

@andredumas
andredumas / README.md
Last active September 28, 2016 11:57
TechanJS MACD

MACD calculation and rendering demo.

@andredumas
andredumas / README.md
Last active November 13, 2018 04:48
TechanJS Plot Zooming

Demonstrating zooming of a plot and axis. Zoom clamp is off, the chart can be freely moved.

@andredumas
andredumas / README.md
Last active September 28, 2016 12:00
TechanJS Close Line

Closing price line rendering demo. Demonstrates line rendering.

@andredumas
andredumas / README.md
Last active September 28, 2016 12:07
TechanJS OHLC

Open High Low Close (ohlc) rendering demo. Demonstrates ohlc rendering and up and down day coloring.

@andredumas
andredumas / README.md
Last active September 28, 2019 14:50
TechanJS Plots

Plots rendering demo. A sample of what can be created with the available plot types.

  • Candlestick
  • Volume
  • Percentage axis
  • Simple and Exponential Moving Averages
  • Zooming
  • Indicator combinations
  • Interactive trendlines
@andredumas
andredumas / README.md
Last active September 28, 2016 12:10
TechanJS Volume

Volume rendering demo. Demonstrates volume rendering and up and down day coloring.

@andredumas
andredumas / README.md
Last active July 7, 2017 16:31
TechanJS Candlestick

Candlestick rendering demo. Demonstrates candle rendering and up and down day coloring.

weekday = (function() {
// Returns the weekday number for the given date relative to January 1, 1970.
function weekday(date) {
var weekdays = weekdayOfYear(date),
year = date.getFullYear();
while (--year >= 1970) weekdays += weekdaysInYear(year);
return weekdays;
}
@andredumas
andredumas / swap.rb
Created March 18, 2014 03:32
Chef port of the swap puppet manifest (https://gist.github.com/andredumas/9612937)
execute "mkswap" do
command "dd if=/dev/zero of=/var/swapfile bs=1024 count=$((1226*1024)); mkswap /var/swapfile"
creates "/var/swapfile"
umask 0077
action :run
end
mount "none" do
action :enable
device "/var/swapfile"