Hi All, You can also try to use a= barssince(BUY); // number of bars since a buy sign b= valuewhen(Buy,C,1); // the value of close when the last buy signal occured Sell= (a>=5) and (C<=b); Rajiv _________________________________________________________________ Get Windows Live and get whatever you need, wherever you are. Start here. http://www.windowslive.com/default.html?ocid=TXT_TAGLM_WL_Home_082008
