Set a rule specifying that this algorithm cannot take short positions.
(self, on_error='fail')
| 2225 | |
| 2226 | @api_method |
| 2227 | def set_long_only(self, on_error='fail'): |
| 2228 | """Set a rule specifying that this algorithm cannot take short |
| 2229 | positions. |
| 2230 | """ |
| 2231 | self.register_trading_control(LongOnly(on_error)) |
| 2232 | |
| 2233 | ############## |
| 2234 | # Pipeline API |