Buy & Hold Amount by Ken Rose on Trader Talks TDA

soary

Member
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.

Code:
#
#Received from [email protected]
#
#Buy and Hold Yield
#------Calculating Yield
def FirstPrice = compoundValue(1, if barNumber() < barnumber()[1] then close else firstprice[1],close);
def HPY = (close-firstPrice)/firstPrice;
#------Placing Yield on the chart

AddLabel(Yes, Concat(Round(hpy,4)*100, "% Buy and Hold Yield"));

https://tos.mx/3vZKNKG
 
Last edited by a moderator:

Similar threads

Top