Skip to content

Instantly share code, notes, and snippets.

View wesyoung's full-sized avatar
🎯
Focusing

wes wesyoung

🎯
Focusing
View GitHub Profile
@wesyoung
wesyoung / gist:6809776
Created October 3, 2013 13:24
tos-price-percentile
# Shah H. Development 2013
input length = 10;
input price = close;
input pricePercentUP = 5.0;
input pricePercentDOWN = -5.0;
def PercentChg = Round(100 * (price / price[length] - 1), 2);
AddLabel(1, Concat ("% Price Chng:", PercentChg ),if percentChg >= pricePercentUP then color.dark_green else if percentChg <= pricePercentDOWN then color.red else color.gray);
@wesyoung
wesyoung / gist:6809837
Created October 3, 2013 13:28
tos-iv-precentile
################################
# sdi_ivp: Display Implied Volatility Percentile as a label
#hint: Displays the Implied Volatility Percentile as a chart label. sdi_ivp rev: 1.2 http://www.smallDogInvestor.com
# author: allen everhart
# date: 19jul2013
# revision 1.2 9/18/2013
# enhancement to permit user to select label color
# revision 1.1 9/13/2013
# previously sdi_ivp printed N/A if there were gaps in the imp_volatility data. now gaps are ignored.
# copylefts reserved. This is free software. That means you are free
source = 'stopforumspam.com'
restriction = 'need-to-know'
guid = 'everyone'
confidence = 65
assessment = 'spam'
description = 'stopforumspam list'
[ipblocklist]
#feed = 'http://www.stopforumspam.com/downloads/listed_ip_30_all.zip'
#zip_filename = "listed_ip_30_all.txt"
@wesyoung
wesyoung / gist:7890238
Created December 10, 2013 13:01
the other side of this is a REQ socket.
#!/usr/bin/env perl
use 5.011;
use strict;
use warnings;
use AnyEvent;
use Data::Dumper;
use ZMQx::Class;
@wesyoung
wesyoung / gist:7890281
Created December 10, 2013 13:04
CIF::Client::Plugin::ZeroMQ
package CIF::Client::Plugin::ZeroMQ;
use 5.011;
use warnings;
use strict;
use namespace::autoclean;
use Moose;
use MooseX::FollowPBP;
use MooseX::Aliases;
#!/usr/bin/env perl
use 5.011;
use strict;
use warnings;
use AnyEvent;
use Data::Dumper;
use ZMQx::Class;
use Plack::Runner qw();
use strict;
use warnings;
use 5.011;
use Test::More;
use Data::Dumper;
BEGIN {
use_ok('CIF');
use_ok('CIF::Protocol::Message');
@wesyoung
wesyoung / lbbroker2.pl
Created December 18, 2013 12:45
it's a start.
#!/usr/bin/env perl
use 5.011;
use strict;
use warnings;
use ZMQ::LibZMQ3;
use ZMQ::Constants qw(:all); # separate module
use threads;
package CIF::Smrt::Parser::Default;
use strict;
use warnings;
use namespace::autoclean;
use Moose;
use MooseX::FollowPBP;
use String::Tokenizer;
use CIF qw(observable_type);
#!/usr/bin/perl -w
use strict;
use Data::Dumper;
use CIF::Client;
use JSON;
use Net::CIDR;
use Regexp::Common qw/net/;
use Regexp::Common::net::CIDR;
use Text::Table;