Skip to content

Checking if I have implemented my back test correctly using a custom data frame #731

Answered by kernc
pranavlal asked this question in Q&A
Discussion options

You must be logged in to vote

Instead of self.data.signal==1, you'd make the condition be: self.data.signal[-1] == 1 and not self.position.
Instead of self.sell(), you'd call self.position.close().

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by pranavlal
Comment options

You must be logged in to vote
0 replies
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