I am happy to assist.
You could name each DrawRay as "Stockline"+Previouscrossclose or something more useful for referencing them, then use the RemoveDrawObject("Stockline"+Previouscrossclose); method to get rid of them
Alternatively you could store all the IRay objects in a list or something and iterate through the list to check for conditions and delete.
Here is a forum post with some references to uses of Foreach with draw objects : http://www.ninjatrader.com/support/f...ad.php?t=45776
Please let me know if I may assist further.
Leave a comment: