Finance::GeniusTrader::CloseStrategy::LimitPeriodInTheMarket - Only allow the trade to last for X days
This strategy closes the position once the maximum time for the trade has been reached if the second signal is true.
The second/third parameter is a signal which can infirm the closing order of long/short position. In particular you may want to not close a position which looks like to be a great winner...
You confirm the order with a true value and infirm it with a false value.
Close a long position if after 3 days, the security hasn't increased. Close a short position if after 3 days, the security hasn't dropped.
CS:LimitPeriodInTheMarket 3 {S:Generic:Below {I:Prices CLOSE} {I:Generic:PeriodAgo 3 {I:Prices CLOSE}}} {S:Generic:Above {I:Prices CLOSE} {I:Generic:PeriodAgo 3 {I:Prices CLOSE}}}
To install Finance::GeniusTrader, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Finance::GeniusTrader
CPAN shell
perl -MCPAN -e shell install Finance::GeniusTrader
For more information on module installation, please visit the detailed CPAN module installation guide.