Rank: Advanced Member
Groups: Registered, Registered Users Joined: 3/23/2010(UTC) Posts: 60
|
I’m working on an Expert that generates 4 signals:
1) Enter Long
2) Enter Short
3) Exit Long
4) Exit Short
I need help on the Exit Signals.
Both Exits are triggered by stop penetrations and plots an offsetting trade in the opposite direction. When an Enter Short position is plotted, I want to ignore all Exit Long signals and only plot the first Exit Short signal.
I tried this for an Exit Short Signal:
If(BarsSince (Enter Short)<BarsSince (Enter Long) And Cross (Short Stop)
The problem is it plots multiple Exit Short signals. I only want it to plot the first Exit Short Signal.
I tried using BarsSince(Enter Short) to look back to the last Enter Short signal. I want to look back to the last Enter Short signal for previous Exit Short signals and NOT plot any more Exit Short signals if there are previous ones plotted.
Ideas?
Thanks,
Dennis
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 3/23/2010(UTC) Posts: 60
|
I studied up on Latches and used a double set of them to generate all my trade signals.
Dennis
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.