PureBytes Links
Trading Reference Links
|
If you're only trying to avoid a second Long (after a first Long) on a given
bar, you could do something like:
Vars: EntBar(0), MP(0);
If {your Entry Criteria goes here} and CurrentBar - EntBar > 0 then Buy at
Market;
If MP = 1 and MP[1] <> 1 then EntBar = CurrentBar;
I use MP instead of TS MarketPosition and EntBar instead of BarsSinceEntry
because it eliminates the possibility of encountering potential Bugs. The
reasoning has been discussed here before.
I'm sure there are simpler ways of doing this, but this should work...
-------------------------------------------------
At 08:54 PM 2/18/98 -0800, you wrote:
>Can anyone offer a work around to prevent multiple entries
>in the same bar? -- First, I am dealing with daily data.
>
>Example: If I enter the day in a long position from the previous
>bar I would like to ONLY allow a reversal to short. I do NOT want
>to allow a subsequent reversal back to a long position in the same bar.
>
>Any help would be appreciated.
>Bill Keyer
>
>
>
|