| 1 | # New York Board of Trade (NYBOT) setups. | ||
| 2 | |||
| 3 | # Copyright 2005, 2006, 2007, 2008, 2009 Kevin Ryde | ||
| 4 | |||
| 5 | # This file is part of Chart. | ||
| 6 | # | ||
| 7 | # Chart is free software; you can redistribute it and/or modify it under the | ||
| 8 | # terms of the GNU General Public License as published by the Free Software | ||
| 9 | # Foundation; either version 3, or (at your option) any later version. | ||
| 10 | # | ||
| 11 | # Chart is distributed in the hope that it will be useful, but WITHOUT ANY | ||
| 12 | # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
| 13 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more | ||
| 14 | # details. | ||
| 15 | # | ||
| 16 | # You should have received a copy of the GNU General Public License along | ||
| 17 | # with Chart. If not, see <http://www.gnu.org/licenses/>. | ||
| 18 | |||
| 19 | package App::Chart::Suffix::NYB; | ||
| 20 | use strict; | ||
| 21 | use warnings; | ||
| 22 | use Locale::TextDomain 'App-Chart'; | ||
| 23 | |||
| 24 | use App::Chart; | ||
| 25 | use App::Chart::Barchart; | ||
| 26 | use App::Chart::Sympred; | ||
| 27 | use App::Chart::TZ; | ||
| 28 | use App::Chart::Weblink; | ||
| 29 | use App::Chart::Yahoo; | ||
| 30 | |||
| 31 | |||
| 32 | my $pred = App::Chart::Sympred::Suffix->new ('.NYB'); | ||
| 33 | App::Chart::TZ->newyork->setup_for_symbol ($pred); | ||
| 34 | |||
| 35 | $App::Chart::Yahoo::latest_pred->add ($pred); | ||
| 36 | $App::Chart::Barchart::intraday_pred->add ($pred); | ||
| 37 | $App::Chart::Barchart::fiveday_pred->add ($pred); | ||
| 38 | |||
| 39 | |||
| 40 | #------------------------------------------------------------------------------ | ||
| 41 | # weblink - contract specs | ||
| 42 | |||
| 43 | App::Chart::Weblink->new | ||
| 44 | (pred => $pred, | ||
| 45 | name => __('NYBOT _Contract Specifications'), | ||
| 46 | desc => __('Open web browser at the NYBEX/COMEX contract specifications for this commodity'), | ||
| 47 | proc => sub { | ||
| 48 | my ($symbol) = @_; | ||
| 49 | return 'http://www.nymex.com/' | ||
| 50 | . URI::Escape::uri_escape (App::Chart::symbol_commodity ($symbol)) | ||
| 51 | . '_spec.aspx'; | ||
| 52 | }); | ||
| 53 | |||
| 54 | |||
| 55 | #------------------------------------------------------------------------------ | ||
| 56 | |||
| 57 | # (set! barchart-suffix-delay-alist (acons ".NYBOT" 30 | ||
| 58 | # barchart-suffix-delay-alist)) | ||
| 59 | |||
| 60 | App::Chart::Barchart::commodity_mung | ||
| 61 | ($pred, | ||
| 62 | # 'CC' # COCOA | ||
| 63 | # 'CT' # COTTON NO. 2 | ||
| 64 | # 'MK' # MINI COFFEE C | ||
| 65 | # 'XA' # ETHANOL | ||
| 66 | # 'SE' # SUGAR 14 | ||
| 67 | # 'OJ' # FCOJ | ||
| 68 | # 'OD' # FCOJ DIFF: PAR=100 | ||
| 69 | 'OB' => undef, # FCOJ-B -- seems to be missing from barchart | ||
| 70 | 'P' => 'PU', # PULP | ||
| 71 | # 'KC' # COFFEE "C" | ||
| 72 | # 'SB' # SUGAR 11 | ||
| 73 | |||
| 74 | # 'AR' # Aus. Dollar - N.Z. Dollar | ||
| 75 | # 'AS' # Australian Dollar - Canadian $ | ||
| 76 | # 'YA' # Australian Dollar - Jap.Yen | ||
| 77 | 'MP' => 'OG', # Small British Pd. - U.S. Dollar | ||
| 78 | # 'SS' # British Pd. - Swiss Franc | ||
| 79 | # 'SY' # British Pd. - Jap. Yen | ||
| 80 | # 'HY' # Canadian Dollar - Jap. Yen | ||
| 81 | # 'EO' # Euro - U.S. Dollar Regular (barchart "SMALL") | ||
| 82 | # 'EP' # Euro - Canadian Dollar | ||
| 83 | # 'GB' # Euro - Sterling | ||
| 84 | # 'EJ' # Euro - Jap. Yen | ||
| 85 | # 'OL' # Euro - Norw. Krone | ||
| 86 | # 'RK' # Euro - Swed. Krona | ||
| 87 | 'RA' => 'EQ', # Euro - Australian Dollar | ||
| 88 | # 'RZ' # Euro - Swiss Franc | ||
| 89 | # 'EU' # Euro - U.S.Dollar Large | ||
| 90 | 'HR' => 'GY', # Euro - Hungarian forint | ||
| 91 | 'EZ' => 'GZ', # Euro - Czech koruna | ||
| 92 | # 'ZY' # Swiss Franc-Jap. Yen | ||
| 93 | # 'DX' # U.S. Dollar Index | ||
| 94 | # 'AU' # Aus. Dollar - U.S. Dollar | ||
| 95 | # 'KU' # U.S. Dollar - Swed. Krona | ||
| 96 | # 'NS' # U.S. Dollar - Norw. Krone | ||
| 97 | # 'YF' # U.S. Dollar - Swiss Franc | ||
| 98 | 'MF' => 'OF', # Small U.S. Dollar - Swiss Franc | ||
| 99 | # 'YP' # U.S. Dollar - British Pound | ||
| 100 | # 'YY' # U.S. Dollar - Japanese Yen | ||
| 101 | # 'SN' # Small U.S. Dollar - Japanese Yen | ||
| 102 | 'ZR' => 'OR', # U.S. Dollar - S.African Rand | ||
| 103 | # 'ZX' # U.S. Dollar - New Z Dollar | ||
| 104 | # 'YD' # U.S. Dollar - Canadian Dollar | ||
| 105 | 'SV' => 'OV', # Small U.S. Dollar - Canadian Dollar | ||
| 106 | 'UF' => 'UY', # U.S. Dollar - Hungarian forint | ||
| 107 | # 'UZ' # U.S. Dollar - Czech koruna | ||
| 108 | 'NJ' => 'EK', # Norwegian Krone / Swedish krona | ||
| 109 | |||
| 110 | # 'CR' # Reuters CRB Index | ||
| 111 | 'R' => 'RX', # Russell 1000 | ||
| 112 | 'RM' => 'RJ', # Russell 1000 Mini | ||
| 113 | 'GG' => 'VU', # Russell 1000 Growth Index | ||
| 114 | # 'VV' # Russell 1000 Value Index | ||
| 115 | # 'TO' # Russell 2000 | ||
| 116 | 'GH' => 'RG', # Russell 2000 Growth Index | ||
| 117 | 'VB' => 'RV', # Russell 2000 Value Index | ||
| 118 | # 'TH' # Russell 3000 | ||
| 119 | 'YU' => 'YV', # Revised NYSE Comp. Index | ||
| 120 | # 'MU' # Revised NYSE Small Comp. Index | ||
| 121 | ); | ||
| 122 | |||
| 123 | |||
| 124 | 1; | ||
| 125 | __END__ |