Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time-based closing Condition #755

Open
SharathkumaraKR opened this issue Nov 6, 2024 · 1 comment
Open

Time-based closing Condition #755

SharathkumaraKR opened this issue Nov 6, 2024 · 1 comment

Comments

@SharathkumaraKR
Copy link

I'm using Portfolio.from_signals in vectorbt with timestamped index data.

Buy Signal: Triggered when value > 15, allowing multiple accumulated trades.

Trade Duration: I need each trade to close automatically if open for more than 6 hours.

How can I implement this time-based closing condition with from_signals?

@SharathkumaraKR
Copy link
Author

Could you please provide a sample code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant