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

Re: Signals vrs Indicators



PureBytes Links

Trading Reference Links

> 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