Slow Stochastic Multi FIFO: Time-based Exit
Author: sfronz
Creation Date: 5/31/2014 8:17 AM
profile picture

sfronz

#1
I was wondering if someone could take a look at my adjustments to higgsja's Slow Stochastic Multi FIFO. I have a 12 bar timeout, but I'm getting some trades that stay open for 500+ bars. What am I missing?
profile picture

sfronz

#2
CODE:
Please log in to see this code.
profile picture

Eugene

#3
QUOTE:
I have a 12 bar timeout, but I'm getting some trades that stay open for 500+ bars. What am I missing?

You're missing that it's a multi-position system and your exit is closing only the LastPosition. To add a time-based exit, I'd rewrite the original system's code as follows:

CODE:
Please log in to see this code.
profile picture

sfronz

#4
Thank you Eugene. That is what I missed!