NAME
Finance::GeniusTrader::CloseStrategy::LimitPeriodInTheMarket - Only allow the trade to last for X days
DESCRIPTION
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.
EXAMPLES
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}}}