What's New With Trade Unafraid

A couple of new features...

Computed Targets

When you call the webhook (whether from TradingView or from your own code), you can now include an array of targets within the payload, like so.


Price is the price of the underlying, so you'll take those profits when the price of the stock or ETF reaches that level, whether you're in shares or options.  Of course, the rest of the Trade Plan is still at work, so be sure to coordinate what you include in the webhook with the Trade Plan Template you specify.

qtyPct is a percentage expressed as a decimal, so 0.1 is 10% of your position.

As with all targets in Trade Unafraid, we try to exit something at every target, so if your entire position is one contract, that first 10% target will "round" up to 1, and you'll be flat.  We will compute the percentage to the best of our ability, but targets should always perform some exit.  If the position is too small to accommodate the percentage specified, then the target might be your full position.  Something to keep in mind.

Returned Trade Plan ID

When you successfully open a Trade Plan via a webhook, the response will contain the tradePlanId.  (If you do this in TradingView, you'll never see that response.  But if you make the call from your own code, this might be of interest.)  Here is a sample response, with the ID at the bottom:

    "targets": [
    "tradePlanTemplate""myWebHookTP v1",

Why do you care about the ID?  Because you can now use it to programmatically flatten your position!

Just POST to http://<YOUR_TU_SERVER_URL>/tradePlans/{tradePlanId}/flatten, replacing {tradePlanId} with the ID you received, and the position will be flattened.

The body of the POST needs to include the same "secret" parameter in order to get past the bouncers.

Stay tuned for more...