
This is a Strategy file for Chart Logic that will display three lines on your chart for each position: a percent profit target, and ADR target, and (if the position is in drawdown) a scale-in line. These lines are useful for position trading, to see where your targets are and to know when you're far enough to scale in.
This file demonstrates some useful features of Chart Logic. For instance, when determining where to place the scale in line, we need to get the trade in the position that is the farthest in drawdown, and calculate our ADR distance from that trade's opening price. Chart Logic makes this really easy. When you use the Trade Condition and ask for a parameter that is above or below some value, and there are multiple trades that match, then it will return the farthest one automatically. We want the farthest trade in drawdown, so we ask for a trade with an open price above/below the position average, and it returns the farthest one above/below the average price.

The BE line here is not coming from the Target Line strategy file, I also have the BE Line strategy running. This is available separately in the Files section.

Another pattern I'm showing here is putting all of the configuration options in a single Logic Set at the start of the strategy, and configuring them as global variables. If you want to adjust the behavior of this strategy, for instance if you want to set a different percent or ADR target, then you don't need to dig around to try to find where these are declared; they are in the Configuration section.
There's an indicator available from the Free Stuff section of the website called Coral Target that this is based on. But Coral Target only works when you're not hedged; it can't handle correctly when you're in positions in both directions at the same time. This strategy file for Chart Logic is better than Coral Target, as far as hedged positions goes. And it was far easier to write!