I got this buy and hold label from Ken Rose on Trader Talks TDA. His suggestion is to enter an amount in the script being tested like $10,000 and then compare Floating P/L report results to the buy and hold amount generated by the script and shown on the label. He says, there will be a difference in the amounts because Floating P/L does not have the ability to do compounding over time but if the results are withing 90-100% then may consider it a good strategy.
# #Received from [email protected] # #Buy and Hold Yield #------Calculating Yield def FirstPrice = compoundValue(1, if barNumber() < barnumber() then close else firstprice,close); def HPY = (close-firstPrice)/firstPrice; #------Placing Yield on the chart AddLabel(Yes, Concat(Round(hpy,4)*100, "% Buy and Hold Yield"));
Last edited by a moderator: