Stop Loss for Gap Filler Straregy
Author: Woodman750
Creation Date: 5/20/2009 11:26 AM
profile picture

Woodman750

#1
I am trying to add a stop loss function to the included Gap Filler strategy. The script below doesn't seem to exit properly for any stop loss below 100, so I must have done something wrong. Any help would be greatly appreciated.

CODE:
Please log in to see this code.

profile picture

Eugene

#2
By the way, your stop loss coded in a way to execute on the next open after triggering the event - was that by design?

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

Woodman750

#3
Thanks for the help Eugene. Selling at the next day open was not where I wanted to end up - but I'm a total newbie and so this was my first attempt at inserting a stop loss. Any ideas on how to trigger the sale immediately?

Thanks again.
profile picture

Eugene

#4
Please try this:
CODE:
Please log in to see this code.

In addition, I hope that the following KB article can be helpful -- it contains the code for a couple of gap closer systems:
System Building | Gap trading strategies
profile picture

Woodman750

#5
Excellent - looks like that works. Thanks for the link as well.
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).