Hi
I am having difficulty getting some code to do what I want it to do.
I would like to make an entry on each bar where a certain condition is met - CumDown in the example below. This part seems fine.
However, I would then like to exit each of these positions "n" bars after each position is entered. The following code exits a cluster on the one bar which is "n" periods after the last position, rather than "n" periods after each position.
How can this be fixed to do what I want it to do?
CODE:
Please log in to see this code.
Size:
Color:
Hang on a minute, and I'll look...
Size:
Color:
Deja vu. We discussed precisely this "oversight" of the Strategy Wizard in another thread just yesterday. Click to
this discussion and begin reading at my post #12 for the explanation and later a solution.
You'll have to unlock the code to fix it, so if you need more help, let me know.
Size:
Color:
Thanks Robert. Great timing!
I'll have a look at this and get back to you if there are issues. It makes sense that it should be the current position and not the last active one.
Size:
Color: