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

Re: sell after a specific # of days



PureBytes Links

Trading Reference Links

Mike,
Use ref(*,-5) to display a condition originating/occurring five days
ago.  Lookback creates a rightshift on chart indicators as recently
pointed out by many on Walter Lake's dbl mavg query this weekend.  For
exploration and system tests it creates a similar delayed response;
whereas the clairvoyant +5 gives advanced warnings when used in
historical contexts.
Craig

michael arnoldi wrote:
> 
> i am trying to write a trading system & don't know if this is the
> correct way for metastock:
> buy:gapup()
> sell:ref(gapup(),+5)
> 
> the sell should occur 5 days AFTER the buy condition.
> 
> thanks.
> mike arnoldi