| 1 | package Finance::GeniusTrader::OrderFactory::SignalClosingPrice; | ||
| 2 | |||
| 3 | # Copyright 2000-2002 Raphaƫl Hertzog, Fabien Fulhaber | ||
| 4 | # This file is distributed under the terms of the General Public License | ||
| 5 | # version 2 or (at your option) any later version. | ||
| 6 | |||
| 7 | # Standards-Version: 1.0 | ||
| 8 | |||
| 9 | use strict; | ||
| 10 | use vars qw(@ISA @NAMES @DEFAULT_ARGS); | ||
| 11 | |||
| 12 | use Finance::GeniusTrader::OrderFactory; | ||
| 13 | |||
| 14 | @ISA = qw(Finance::GeniusTrader::OrderFactory); | ||
| 15 | @NAMES = ("SignalClosingPrice"); | ||
| 16 | @DEFAULT_ARGS = (); | ||
| 17 | |||
| 18 | =head1 NAME | ||
| 19 | |||
| 20 | Finance::GeniusTrader::OrderFactory::SignalClosingPrice | ||
| 21 | |||
| 22 | =head1 DESCRIPTION | ||
| 23 | |||
| 24 | This module will send virtual order at the closing price when a new signal | ||
| 25 | is given. | ||
| 26 | |||
| 27 | =cut | ||
| 28 | |||
| 29 | sub create_buy_order { | ||
| 30 | my ($self, $calc, $i, $sys_manager, $pf_manager) = @_; | ||
| 31 | |||
| 32 | return $pf_manager->virtual_buy_at_signal($calc, $sys_manager->get_name); | ||
| 33 | } | ||
| 34 | |||
| 35 | sub create_sell_order { | ||
| 36 | my ($self, $calc, $i, $sys_manager, $pf_manager) = @_; | ||
| 37 | |||
| 38 | return $pf_manager->virtual_sell_at_signal($calc, $sys_manager->get_name); | ||
| 39 | } | ||
| 40 | |||
| 41 | 1; |