I will provide the open source of the indicator that filters breaks with primary and secondary targets for Trading View
PS: When the candle breaks the Hi/Lo of the box, the targets will be displayed and the Close of the candle will be taken, the stop will be at the Hi/Lo of the box.
PS2: Target lines will always focus on the last signal to save memory
PS3: In some scenarios, the box will be plotted later but NOT the target lines, this is to avoid repainting.
Characteristics
Enable Buy and Sell: Hide Signals, modify your visuals and select the box size you want
Visuals Box: Choose the color of the boxes, their opacity, the type of line and thickness you want
Enable Targets Line: Hide the target lines and Stop Loss and modify the stop and the different Take Profit to taste
Continue When Reaching: When the price reaches one of the objectives, the line will stop moving. Also hide target labels
Targets: Primary is only the Minimum Target, Secondary is the other targets are added
Line Visuals: Adjust the line visuals to your liking