PureBytes Links
Trading Reference Links
|
I dealt with this issue a while back, but I believe I remember the
particulars:
If your position exits, then re-enters on the same bar based on the logic
that MP = 0, a Signal "knows" that you went from say MP=1, to MP=0, to MP=-1
all within the same bar. To an indicator, you simply went from MP=1 to
MP=-1. Indicator logic doesn't detect the MP=0 condition intrabar.
Which is very ironic considering that it's the Indicator that you can choose
to have evaluate "tick by tick".
Hope this helps,
Gene Pope
----- Original Message -----
From: "Gary Fritz" <fritz@xxxxxxxx>
To: "fxtrader" <fxtrader@xxxxxxxxxx>
Cc: <omega-list@xxxxxxxxxx>
Sent: Saturday, October 19, 2002 9:28 PM
Subject: Re: Signals vrs Indicators
> > Anyone know what to use in an indicator in place of BarsSinceEntry?
>
> This is really fairly messy. There no I_BarsSinceEntry to use in
> indicators. You can build your own with I_MarketPosition, but
> guess what? I_MarketPosition and MarketPosition don't always
> change at the same time !!
>
> The specific details of when MarketPosition changes in a system
> are a bit obtuse, depending on whether you enter by a stop or at
> the open or close. It's been quite a while since I took a very
> brief look at this, but if I remember right I_MarketPosition
> changes on the bar when the system enters or exits.
>
> This should work, but there may be certain conditions I didn't
> think to test. It's at start at least.
>
> var: I_BarsSinceEntry(0);
> I_BarsSinceEntry = I_BarsSinceEntry + 1;
> if MP = 0 then I_BarsSinceEntry = 0;
>
> Gary
>
>
>
|