Skip to content

Instantly share code, notes, and snippets.

@sherwind
sherwind / run_many.pl
Created November 8, 2018 03:39
run_many
#!/usr/bin/env perl
# run a command many times for a number of times at a time
# by Sherwin Daganato, 20100414
# based on runN.pl which has the copyright:
# Copyright 2007 Mark Jason Dominus <mjd@plover.com>
# Modified by Aaron Crane; see http://aaroncrane.co.uk/2008/07/runN/
use strict;
use warnings;
//@version=3
//
// A volume indicator that measures buying and selling pressure over a given lookback period.
// As described at http://traders.com/Documentation/FEEDbk_docs/2015/10/TradersTips.html
//
// See also:
// - Are price updates a good proxy for actual traded volume in FX? <https://www.fxstreet.com/education/are-price-updates-a-good-proxy-for-actual-traded-201104220000>
// - Using Tick Volume in Forex: A Clear NVO Based Example <http://mechanicalforex.com/2010/08/using-tick-volume-in-forex-clear.html>
//
// -----------------------------------------------------------------------------
@sherwind
sherwind / Pivot Points High Low Extension.pinescript
Created May 19, 2018 14:39
Pivot Points High Low Extension
//@version=3
//
// Pivot Points High Low Extension
//
// See Also:
// - A Simple 1-2-3 Method for Trading Forex <http://webinar.tradingpub.com/resources/lp/tpub_topshelf/Top_Shelf_Magazine/forex/A_Simple_1_2_3_Method_for_Trading_Forex.php>
// - The Classic 1-2-3 Pattern: An Underestimated Powerhouse <https://www.tradeciety.com/the-classic-1-2-3-pattern-underestimated-powerhouse/>
// - Bulkowski's 1-2-3 Trend Change <http://thepatternsite.com/123tc.html>
//
//
//@version=3
//
// Measures buying and selling pressure over a given lookback period.
// As described at http://traders.com/Documentation/FEEDbk_docs/2015/10/TradersTips.html
//
// See also:
// - Are price updates a good proxy for actual traded volume in FX? <https://www.fxstreet.com/education/are-price-updates-a-good-proxy-for-actual-traded-201104220000>
// - Using Tick Volume in Forex: A Clear NVO Based Example <http://mechanicalforex.com/2010/08/using-tick-volume-in-forex-clear.html>
//
// -----------------------------------------------------------------------------
@sherwind
sherwind / sysinfo.sh
Last active November 8, 2018 03:43
sysinfo.sh
#!/bin/bash
# based on https://access.redhat.com/solutions/3592
PROCPS_USERLEN=18 w -i > w.$(date +%Y%m%d%H%M)
ps auxfww > ps.$(date +%Y%m%d%H%M)
lsof -nP > lsof.$(date +%Y%m%d%H%M)
sysctl -a > sysctl.$(date +%Y%m%d%H%M)
ip addr > ipaddr.$(date +%Y%m%d%H%M)
ip rule > iprule.$(date +%Y%m%d%H%M)
ip route > iproute.$(date +%Y%m%d%H%M)
//@version=3
//
// 10-Year Bond Yield Spread using Quandl data
//
// See also:
// - https://seekingalpha.com/article/3697846-drives-foreign-exchange-rate-differentials
// - https://www.babypips.com/learn/forex/interest-rates-101
// - https://www.forexfactory.com/showthread.php?p=3382194#post3382194
//
// -----------------------------------------------------------------------------
//@version=3
//
// This volume indicator works best on comparatively small timeframes (15 minutes, for example).
//
// Based on:
// - Normalized Volume Oscillator - indicator for MetaTrader 4 <https://www.mql5.com/en/code/8208>
// - Using Tick Volume in Forex: A Clear NVO Based Example <http://mechanicalforex.com/2010/08/using-tick-volume-in-forex-clear.html>
//
// See also:
// - Are price updates a good proxy for actual traded volume in FX? <https://www.fxstreet.com/education/are-price-updates-a-good-proxy-for-actual-traded-201104220000>
@sherwind
sherwind / ZigZag HiLo.pinescript
Last active December 6, 2022 06:41
ZigZag HiLo
//@version=3
//
// Based on http://traders.com/documentation/feedbk_docs/2013/07/traderstips.html
//
//
// -----------------------------------------------------------------------------
// Copyright 2018 sherwind
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
//@version=3
//
// A port of the MT4 indicator of Mladen Rakic found at https://www.mql5.com/en/forum/179876
// which is based on Dynamic Zones that was originally published in Stocks & Commodities 1996 issue.
//
// Dynamic Zones is meant to be applied to oscillators to get dynamic overbought and oversold levels
// quantified using statistical methods.
//
//
// -----------------------------------------------------------------------------
@sherwind
sherwind / Trading the Loonie.pinescript
Created April 21, 2018 15:49
Trading the Loonie (CADUSD)
//@version=3
//
// A port of the trading strategy described at http://technical.traders.com/content/TTlink.asp?mo=12&yr=2015
//
// "In “Trading The Loonie,” which appeared in the December 2015 issue of STOCKS & COMMODITIES, author Markos Katsanos
// explains the heavy correlation between the Canadian dollar and crude oil. He then goes on to describe how one could
// trade this correlation. Using similar logic as that employed in Bollinger Bands, Katsanos has built a study to
// provide buy and sell signals for trading the Canadian dollar future."
//
// See Also: