GeniusTrader/OrderFactory/MinimumSlippage.pm untested

filter: Statementstmt 0.0% 0 / 16 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 23 CC 1 SCAR 6.9
CC
1
Cov
0%
create_buy_order
2.0
create_sell_order
2.0
BEGIN
2.0
CRAP 2.0
1 package Finance::GeniusTrader::OrderFactory::MinimumSlippage;
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 = ("MinimumSlippage");
16 @DEFAULT_ARGS = ();
17  
18 =head1 NAME
19  
20 Finance::GeniusTrader::OrderFactory::MinimumSlippage
21  
22 =head1 DESCRIPTION
23  
24 In a Minimum Slippage test, we rig the software so that buy orders always
25 catch the minimum possible slippage : all buys occurs at the Low of the
26 day, and similarly all sells occurs at the High of the day.
27  
28 =cut
29  
30 sub create_buy_order {
31 my ($self, $calc, $i, $sys_manager, $pf_manager) = @_;
32  
33 return $pf_manager->virtual_buy_at_low($calc, $sys_manager->get_name);
34 }
35  
36 sub create_sell_order {
37 my ($self, $calc, $i, $sys_manager, $pf_manager) = @_;
38  
39 return $pf_manager->virtual_sell_at_high($calc, $sys_manager->get_name);
40 }
41  
42 1;