Hi Soren, Your example below also helped me, as I have been trying return a vector from a custom indicator function I have built. Could you explain the use of the variable "i" that is given as an argument in the internal fucntion .randPos you define below? What part of the function provides "i"? Is this somehow linked to the internal control flow of the sapply you invoke later? Thank you in advance. Tim
-- View this message in context: http://r.789695.n4.nabble.com/Quantstrat-Error-while-applying-strategy-tp3472438p4323625.html Sent from the Rmetrics mailing list archive at Nabble.com. _______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-finance -- Subscriber-posting only. If you want to post, subscribe first. -- Also note that this is not the r-help list where general R questions should go.
