TradingView
smith26
Sep 11, 2016 3:49 AM

Buy&Hold 

Description

A basic Buy and Hold strategy, which is useful for comparing against your other strategies. You have to specify when you want the strategy to exit in the code, because the built in 'barstate.islast' and 'barstate.isrealtime' functions don't seem to work properly.

Comments
smith26
Good news! Tradingview has now incorporated a Buy&Hold comparison into their backtester, so this should not be needed any longer :)
More