Skip to content
Discussion options

You must be logged in to vote

Hi @davejonh, OHLCSTX searches for an exit between two entries. If there is no gap between two entries, there cannot be any exits in-between. Now, your entries contains a lot of True values that come one after another (= a sequence), and so the only entry OHLCSTX can find exits for is the last entry of each sequence. To mimic real behavior, you should either use OHLCSTCX (note the 'C' letter in the name), which generates an exit for the first True value out of each sequence, or manually select the first True value out of each sequence using entries = entries.vbt.signals.clean(). Then OHLCSTX will work as expected.

If you want to get a finer control, you can use SL/TP built into Portfolio.…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@davejonh
Comment options

@polakowo
Comment options

Answer selected by davejonh
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