I've been struggling with this one for a few days now and have tried to check out other forum threads to no avail... Any pointers gratefully received!!!! I'm probably overcomplicating it...
This code detects a two bar pattern (I'm using daily bars from Yahoo) to spot a probable reversal. I've programmed an indicator called TrendingDay to spot the first bar in the pattern, which I call from the Strategy.
If a pattern is spotted, several variables (e.g. Variable0) are set representing the price targets, initial StopLoss ("1R"), and lock-in profits stoplosses ("2R" and "4R"). The idea is to let profits run by tightening stops as price targets are reached.
I've programmed indicators ATRStopsOpen and ATRProfitTargetsOpen which assign these Variables to each incoming bar.
Then the corresponding EnterLong or EnterShort is made.
Unfortunately, my Stops don't seem to be registering at all!?
Is there a simpler way to program this strategy?
Thanks for any help you can give me (I think my head is about to explode...)
Olly
Comment