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!
profile picture

WEALTHPRO25

#5
for the Stochastic Multi FIFO strategy is it possible so you can scan a dataset for the last 30 days to see which symbols have a stochastic crossover when moved from below 20 upward for entry and which symbols have a stochastic crossover when moved from above 80 downward
profile picture

Eugene

#6
If the question is "how to see which symbols had an entry signal in the last N days", then it should be possible in general in WLP (one way or another).
profile picture

WEALTHPRO25

#7
how to code for the entry signal in the last N days for a data set when there is a cross over of the stochastic when moved fro below 20 upward in the above code
profile picture

Eugene

#8
Generally, you approach the task with CrossOverWithin function or CrossOverValueBar indicator.
profile picture

WEALTHPRO25

#9
ok i can do this for a symbol but how do i scan a data set for the crossover
profile picture

Eugene

#10
This general question is outside the scope of the strategy being discussed.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).