Skip to content

generate_stop_exits, generate_ohlc_stop_exits #217

Answered by polakowo
bibinvargheset asked this question in Q&A
Discussion options

You must be logged in to vote

Direction can't be utilized in vbt.signals, use stop loss logic in Portfolio.from_signals. But I will add an option in v0.21.0 to reverse the stops in generate_ohlc_stop_exits. In generate_stop_exits, you can control the direction using the sign of the stop value: a positive value acts as a take profit signal for longs and as a stop loss signal for shorts, while a negative value acts in the opposite way.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by bibinvargheset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants