[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: M is for Market



PureBytes Links

Trading Reference Links

Dan

Use a latch to "remember" when the market is bullish. The following basic
structure should work as long as the end of the bullish is period is not
dependent on some aspect of the start of the bullish period. If that were
the case then you'd need a more complicated PREV based latch but its still
workable. The 'I' variable ensures that you don't miss the first signals
that would otherwise happen with this type of latch. You can use a secondary
latch to remember that a trade is in progress.

N:=Fml("your bullish signal");
X:=Fml("your not bullish signal");
I:=Cum(N+X>-1)=1;
R:=BarsSince(I OR N)<BarsSince(I OR X);
R;

Roy

> Maybe I am making this too hard but, I want to test a system that enters
> long trades only when the market is bullish.  I have several ideas for
> conditions that would say that the market is "bullish" however, I need to
> code them so that they stay true until I get an entry signal based on
> another condition.  In other words:
>
> Condition 1 = Bullish
>
> some time later
>
> Condition 2 = Enter position
>
> How do I hold condition 1 true until condition 2 is triggered?
>
> Thanks,
>
> Dan
>
> _________________________________________________________________
> Add photos to your e-mail with MSN 8. Get 2 months FREE*.
> http://join.msn.com/?page=features/featuredemail
>
>
>