App-Chart

 view release on metacpan or  search on metacpan

doc/chart.texi  view on Meta::CPAN

The default is an update of all symbols.  This is usually what's wanted, to
get all latest data.

Click on the ``Start'' button to begin.  The top box is the subprocesses
running, the middle box is the jobs running or queued, and errors are shown in
the lower text window.  If you're offline the errors will usually be ``host
name lookup failure'' or ``network unreachable''.  To abort select the job in
the middle box and click on ``Stop''.

The main chart display can be used while downloading, for instance to look
immediately at the first few symbols updated while the rest are still going.
Sometimes a database update can make the GUI block for a moment.

@section Update Current Chart
@cindex Update data

@cindex @key{Ctrl-U}
In the main Chart window, @key{Ctrl-U} starts an update download for the
currently viewed chart.  This is a good shortcut to grab new data for just one
symbol.  Download progress is shown in the main window statusbar (as well as
the download dialog).

emacs/chartprog.el  view on Meta::CPAN


  chartprog-exec-synchronous-result)


;;-----------------------------------------------------------------------------
;; incoming from subprocess

(defun chartprog-incoming-update (symbol-list)
  "An internal part of chartprog.el.
Receive advice from Chart subprocess that the symbols (strings)
in SYMBOL-LIST have updated.
Any cached data for these symbols in `chartprog-latest-cache' is
discarded.
Any of these symbols in the watchlist are re-read."
  (chartprog-latest-cache-remove symbol-list)

  (when (member chartprog-quote-symbol symbol-list)
    (setq chartprog-quote-changed t))
  (chartprog-debug-message "chartprog-quote-changed " chartprog-quote-symbol)

  (let ((want-list (chartprog-intersection (chartprog-watchlist-symbol-list)

emacs/chartprog.el  view on Meta::CPAN

                          (setq lst (cons symbol lst)))
                      (= 0 (forward-line)))))
           (nreverse lst)))))


;;-----------------------------------------------------------------------------
;; watchlist display

(defun chartprog-incoming-symlist-update (key-list)
  "An internal part of chartprog.el.
Receive advice from Chart subprocess that symlists KEY-LIST have updated.
KEY-LIST is a list of Lisp symbols."
  (if (and (get-buffer "*chartprog-watchlist*") ;; ignore if gone
           (memq chartprog-watchlist-current-symlist key-list))
      (chartprog-exec 'get-symlist chartprog-watchlist-current-symlist)))

(defun chartprog-incoming-latest-line-list (lst)
  "An internal part of chartprog.el.
Receive LST of latest elements (SYMBOL STR FACE HELP).
The watchlist buffer is updated with the new data."
  (when (get-buffer "*chartprog-watchlist*") ;; ignore if gone
    (with-current-buffer "*chartprog-watchlist*"
      (chartprog-save-row-col
        (let ((inhibit-read-only t))
          (dolist (elem lst) ;; elements (SYMBOL STR FACE)
            (when (chartprog-watchlist-find (car elem))
              (delete-region (point-at-bol) (point-at-eol))
              (insert (propertize (cadr elem)
                                  'chartprog-symbol (car elem)
                                  'face             (nth 2 elem)

emacs/chartprog.el  view on Meta::CPAN


  (chartprog-watchlist-want-edit)
  (let ((inhibit-read-only t))
    (undo)))

(defun chartprog-watchlist-refresh (arg)
  "Refresh watchlist quotes.
With a prefix ARG (\\[universal-argument]), refresh only current line.

For the Alerts list, all symbols with alert levels are refreshed,
and the list contents updated accordingly.  (So not merely those
already showing which are refreshed.)"

  (interactive "P")
  ;; updates from the subprocess will come with an in-progress face, but
  ;; apply that here explicitly to have it show immediately
  (if arg
      (progn ;; one symbol
        (let ((inhibit-read-only t))
          (add-text-properties (point-at-bol) (point-at-eol)
                               (list 'face 'chartprog-in-progress)))

lib/App/Chart/Barchart.pm  view on Meta::CPAN

# @section Barchart
# @cindex @code{barchart.com}
# 
# @uref{http://www.barchart.com}
# 
# Barchart provides the following for various futures exchanges around the
# world,
# 
# @itemize
# @c @item
# @c Quotes updated every 5 minutes, delayed according to the exchange.
# @c @item
# @c Intraday graphs.
# @item
# Historical data, but only for the past 5 days, and no volume figures.
# @item
# Historical data as graphs.
# @end itemize
# 
# All information is for personal use only, see the terms at
# 

lib/App/Chart/Gtk2/Diagnostics.pm  view on Meta::CPAN

C<refresh()> must be called to put some diagnostic information in it.

=item C<< $diagnostics->refresh() >>

Refresh the information displayed in C<$diagnostics>.  The "Refresh" button
in the dialog calls this.

=item C<< $str = App::Chart::Gtk2::Diagnostics->str() >>

Return the diagnostics in string form, as would be shown in a dialog.  This
just makes a string, no dialog is opened, created or updated.

=back

=head1 SEE ALSO

L<App::Chart>, L<Gtk2::Dialog>

=head1 HOME PAGE

L<http://user42.tuxfamily.org/chart/index.html>

lib/App/Chart/Gtk2/Ex/MenuItem/EmptyInsensitive.pm  view on Meta::CPAN

 my $item = Gtk2::MenuItem->new;
 App::Chart::Gtk2::Ex::MenuItem::EmptyInsensitive->setup ($item);

=head1 DESCRIPTION

C<App::Chart::Gtk2::Ex::MenuItem::EmptyInsensitive> sets up a C<Gtk2::MenuItem> so that
it's insensitive if its submenu is empty, or all the items are hidden, or
there's no submenu set at all.

Sensitivity updates with items added or removed from the submenu, or made
hidden or visible.  In Gtk 2.12 and the sensitivity is updated for a new
submenu, ie. C<set_submenu>, but in prior versions there's no signal when
that happens and you must call C<setup> below again.

=head1 FUNCTIONS

=over 4

=item C<< App::Chart::Gtk2::Ex::MenuItem::EmptyInsensitive->setup ($item) >>

Setup C<$item> to be insensitive if its submenu is empty.

lib/App/Chart/Gtk2/Subprocess.pm  view on Meta::CPAN

    return $proc;
  }
  if (@procs >= MAX_RUNNING) {
    return undef;
  }
  return $class->new;
}

sub _unset_job {
  my ($self, $job_status, $self_status) = @_;
  # freeze_notify so job and subprocess are both updated before
  # status-change stuff runs
  my $freezer = Glib::Ex::FreezeNotify->new ($self);
  if (my $job = $self->{'job'}) {
    $freezer->add ($job);
    $job->set (subprocess => undef,
               done       => 1,
               status     => $job_status);
  }
  $self->set (job => undef,
              status => $self_status);

lib/App/Chart/Suffix/LME.pm  view on Meta::CPAN

# required, at
#
#     https://secure.lme.com/Data/community/Dataprices_daily_metals.aspx
#
# This plain url gives the most recent prices, which we take as a quote for
# the indicated day then work back with form-data fetching previous days to
# find price change amounts.  Or the database is used if it covers the
# desired symbol(s).
#
# Unfortunately there's no Last-Modified or ETag to save refetching if the
# latest GET contents have not yet updated.  (???)


(define (lme-latest-update-database type newest-data prev-data)
  (let* ((end-tdate   (data-tdate newest-data))
	 (start-tdate (if prev-data
			  (data-tdate prev-data)
			  end-tdate))
	 (db-list     (download-also '() #:selector (lme-type->selector type)
				     #:start-tdate start-tdate
				     #:end-tdate end-tdate)))

lib/App/Chart/Suffix/TGE.pm  view on Meta::CPAN

#     Thu, 01 Sep 2005 22:33:05 GMT      ==  7am tokyo
# so try at 10:05am tokyo
#
sub available_tdate {
  App::Chart::Download::weekday_tdate_after_time
      (10,5, App::Chart::TZ->tokyo, -1);
}

# do a download of the last day .csv file for $symbol_list, if that would
# update all those
# return true if updated successfully, or false if not (should use zip instead)
# 
sub download_day {
  my ($symbol_list) = @_;

  my $commodity = App::Chart::symbol_commodity ($symbol_list->[0]);
  my $avail_tdate = available_tdate();
  my $start_tdate = App::Chart::Download::start_tdate_for_update(@$symbol_list);

  # use csv if all of $symbol_list just wanting $avail_tdate
  if ($start_tdate < $avail_tdate) {

lib/App/Chart/doc/chart.html  view on Meta::CPAN

<p>The default is an update of all symbols.  This is usually what&rsquo;s wanted, to
get all latest data.
</p>
<p>Click on the &ldquo;Start&rdquo; button to begin.  The top box is the subprocesses
running, the middle box is the jobs running or queued, and errors are shown in
the lower text window.  If you&rsquo;re offline the errors will usually be &ldquo;host
name lookup failure&rdquo; or &ldquo;network unreachable&rdquo;.  To abort select the job in
the middle box and click on &ldquo;Stop&rdquo;.
</p>
<p>The main chart display can be used while downloading, for instance to look
immediately at the first few symbols updated while the rest are still going.
Sometimes a database update can make the GUI block for a moment.
</p>
<ul class="mini-toc">
<li><a href="#Update-Current-Chart" accesskey="1">Update Current Chart</a></li>
<li><a href="#Download-Automation" accesskey="2">Download Automation</a></li>
</ul>
<div class="section-level-extent" id="Update-Current-Chart">
<h3 class="section"><span>15.1 Update Current Chart<a class="copiable-link" href="#Update-Current-Chart"> &para;</a></span></h3>
<a class="index-entry-id" id="index-Update-data"></a>

unused/Float.pm  view on Meta::CPAN

# 
# @quotation
# @uref{http://www.float.com.au/scgi-bin/prod/terms.cgi}
# @end quotation
# 
# Float is preferred over Yahoo for daily data, because it's available sooner,
# and if you have lots of ASX symbols then whole-day files can be used, which
# are faster than a separate download for every stock.
# 
# Preliminary data for each day is available from Float at 5pm (Sydney time) but
# is updated until 9pm, so Chart deliberately doesn't download until 9:15pm.
# 
# See also @ref{Commonwealth Securities}.




( run in 0.344 second using v1.01-cache-2.11-cpan-05444aca049 )