| 1 | package Finance::GeniusTrader::OrderFactory::MarketPrice; | ||
| 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 = ("MarketPrice"); | ||
| 16 | @DEFAULT_ARGS = (); | ||
| 17 | |||
| 18 | =head1 NAME | ||
| 19 | |||
| 20 | Finance::GeniusTrader::OrderFactory::MarketPrice | ||
| 21 | |||
| 22 | =head1 DESCRIPTION | ||
| 23 | |||
| 24 | Create an order at market price. | ||
| 25 | |||
| 26 | =cut | ||
| 27 | sub create_buy_order { | ||
| 28 | my ($self, $calc, $i, $sys_manager, $pf_manager) = @_; | ||
| 29 | |||
| 30 | return $pf_manager->buy_market_price($calc, $sys_manager->get_name); | ||
| 31 | } | ||
| 32 | |||
| 33 | sub create_sell_order { | ||
| 34 | my ($self, $calc, $i, $sys_manager, $pf_manager) = @_; | ||
| 35 | |||
| 36 | return $pf_manager->sell_market_price($calc, $sys_manager->get_name); | ||
| 37 | } | ||
| 38 | |||
| 39 | 1; |