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

Re: code help



PureBytes Links

Trading Reference Links

On Dec 9,  8:02pm, Phil wrote:
> Subject: code help
> 
> 
>    Is there anyway to write code for TradeStation 4 that will show when one
> moving avg. say the 5 day, crosses say the 30 day, not the first cross or
> the second cross, but the third cross over?   It can be an alert, show me,
> paint bar, etc. But I would like to know when the average crosses the other
> avg. the third time?

This might not be a meaningful thing to do, as stated:

Take a look at the following sequence of up (^) and down (v) crosses:
	       v             v            v
     ----x-----x------x------x------x-----x-----x
	 ^            ^             ^           ^
	 1            2             3           4

The up-cross numbered 3 looks like the 3rd one, but so does 4, if
you start counting at two.  Some sort of reset condition is needed
to cause the count to go back to zero?