Back to blog
PineHook 0.0.13 to 0.0.15: Built to Hold Up When It Counts

PineHook 0.0.13 to 0.0.15: Built to Hold Up When It Counts

Gabriel J., Co-founder9 min read

Since the 0.0.12 release, we've shipped three EA updates; 0.0.13 tightened how the EA handles timing, filters and protections on your terminal. 0.0.14 and the server changes took the same approach to the rest of the system, especially the moments when many alerts arrive at once. 0.0.15 is a small follow-up that makes target positions keep one stop loss and take profit. Here is what changed and how to update.

Why reliability came first#

A relay has to work on the busiest minute of your week. Strategies tend to fire together, at a candle close or right after a news release, and one alert often goes to several accounts at once. Those are also the moments when a late or missed alert costs you the most.

So over the past two weeks we load-tested PineHook with large bursts of simultaneous alerts. Wherever it slowed down, we changed it and ran the test again.

Most of this work is invisible from your side, and it should be. Alerts that arrive together should go out together without anything looking unusual. If you want to see how PineHook performs, the status page shows current figures for MT5 and cTrader.

Steadier when many alerts arrive at once#

We started with how PineHook takes in alerts, because TradingView does not retry a webhook it considers too slow. PineHook now accepts each incoming alert right away, even while it is still delivering earlier ones to your terminals.

Delivery to MT5 got the same attention and now handles larger bursts without backing up. We also made a long list of smaller changes that cut the work PineHook does for each alert and each connected terminal. Each one saves very little on its own. During a burst, though, PineHook repeats that work for every alert, so the savings add up fast.

Your dashboard benefits from the same changes. Open Positions and other pages like Analytics load faster on accounts with a long trade history.

Then, the new DLL handles the terminal side of the problem. Accounts with a very large number of open positions can now connect reliably, larger messages from the server arrive faster, and we fixed a rare connection error during heavy bursts of activity.

Better recovery when connections drop#

Even a steady system loses its connection now and then, whether the cause is your internet or your broker. What matters is how cleanly it recovers, and 0.0.13 and 0.0.14 both put work into that.

When the server ends a session, for example because a license is invalid or the same license connected from another terminal, the EA now always receives the reason and acts on it. That saves pointless reconnection attempts and makes the cause easier to find.

cTrader accounts got the most work here:

  • If a position closes while PineHook is briefly disconnected from your account, PineHook now finds the close in your broker's history and records the real price and time.
  • Linking an account, or moving a license to another account, takes effect within seconds.
  • An alert that arrives during a short reconnection now runs normally, as long as it is still fresh, instead of waiting as a recovery item.
  • We detect within seconds when a cTrader account stops making progress, so we can step in quickly.

These are server changes, so there is nothing to install for cTrader.

Automate strategies you can't edit#

Reliability was the focus, but one new command deserves its own section. Many of you have asked how to automate a TradingView strategy whose code you can't see, and setposition is our answer.

Many strategies on TradingView are invite-only or protected. You can add one to a chart and create alerts from it, but you can't change its code or the messages it sends. Its default order-fill alert only says what the strategy just did, such as "sell 2 contracts", and not where that leaves the position. A reversal from 1 lot long to 1 lot short arrives as a single sell of 2. If one alert goes missing, every buy and sell after it starts from the wrong position.

setposition works differently. You send the position you want to hold rather than an order. TradingView fills in {{strategy.position_size}} with the strategy's whole position after each fill, positive when it is long, negative when it is short and zero when it is flat:

YOUR_LICENSE_KEY,setposition,{{ticker}},target={{strategy.position_size}}

PineHook compares that target with what your account holds and trades only the difference. A missed alert corrects itself at the next fill, and a repeated one changes nothing. Note that, on a hedging account, you must also add a ticket (ticket=) so the alert manages only that strategy's positions.

The guide to mirroring a strategy walks through the full setup, including lot conversion, and the setposition reference covers stops and partial results. If you can edit a strategy's code, writing your own alert messages still gives you more control. For a protected strategy, setposition is the way to go.

One stop for the whole group in 0.0.15#

When setposition adds to a ticket group on a hedging account, PineHook opens a new position for the difference. In 0.0.14 that new position only got the stop loss and take profit written in the alert that opened it, so a strategy that set its stops on the first entry could end up with unprotected additions. 0.0.15 treats the positions in a ticket= group as one position for their stops:

  • Added positions copy the group's stops. When an alert leaves out the stop loss or take profit, the new position takes the levels the group already has.
  • Management commands use one level. modify with pips or a percentage, breakeven and trail sent with the group's ticket measure from the group's average entry price, so every position ends up at the same level.
  • New positions join an existing trail. If the group already trails or has an armed breakeven, a position added later gets the same one and moves with the rest.
  • One edit moves the whole group. In Open Positions, group rows carry a Group badge, and changing the stop loss or take profit on one of them changes it on every position in the group. The edit window tells you before you apply it. Closing a row still affects only that position.
  • News holds apply to the whole group. With the news filter set to hold modifications, adding to a group during a news window keeps the group's current levels instead of giving only the new position the alert's new ones.

We also fixed dashboard changes to target positions on MT5 accounts whose symbols carry a broker prefix or suffix, such as EURUSD.r. PineHook refused those edits and closes before. Netting accounts and alerts without a ticket work as they did.

Other new features#

A few smaller additions round out these releases:

  • Clear refusals for newer features. If an alert uses something your EA version can't execute, the EA refuses it and asks you to update, instead of silently skipping that part of the alert.
  • Alert Issues Notifications. This optional email tells you when alerts keep getting rejected, missed or left unconfirmed. Turn it on in your dashboard Settings.
  • Ignore single news releases. The News Calendar lets you ignore or restore one release without changing the rest of its category.
  • Signal Logs filtering. You can filter Signal Logs by a UTC date range, and the list now has numbered pages, so finding last Tuesday's alert no longer means endless scrolling.
  • Clearer messages for malformed alerts. When PineHook can't read an alert, the error says why, for example curly quotes copied from a document or a TradingView placeholder that was never replaced. These rejections now appear in your Rejected panel even when the license key isn't in the first field, and PineHook recognizes a key pasted with invisible characters or a typographic dash.

What 0.0.13 tightened#

While the server work was underway, 0.0.13 went through situations that rarely come up but matter when they do. Orders and timing came first. We improved risk-based sizing for pending orders in some edge cases, such as entries placed with a pip or percentage offset. On netting accounts, an eligible pending order can now carry forward valid protection from a position you already hold on the same side, so it no longer needs its own stop loss. Timed closes and pending order expiry now follow UTC deadlines, which keeps them on schedule through terminal restarts and broker clock changes.

Filters and protections also apply in a stricter order. The EA checks symbol filters before any scoped trading or management command runs, and the emergency stop stays in force when an alert also contains an enable command. During a news window, a combined close-and-open alert now closes the position and blocks only the new entry. The EA also refuses an ambiguous symbol mapping before anything reaches your broker, and a reply to an old connection test can no longer confirm a newer one.

The website moved along with the EA. Open Positions shows more accurate prices, profit and loss in your account currency, and the volume left after a partial close. If a refresh fails, the page keeps your last known positions and shows a warning instead of going blank. The Licenses page now shows your MT5 account mode correctly, and we strengthened password changes, session revocation, two-factor authentication and account recovery.

How to update#

If you trade through MT5, download the 0.0.15 bundle from the downloads page and follow the installation guide to replace the files and reattach the EA. The DLL changed in 0.0.14 and is the same in 0.0.15, so if you already run 0.0.14 you only need to replace the EA. If you are on 0.0.13 or earlier, replace both the EA and PineHook.dll. You can skip the versions in between, since the 0.0.15 bundle includes everything above.

Once the EA reattaches, the Experts tab should show a line confirming that PineHook 0.0.15 is connected and authenticated. Send a small test alert on a demo account and check Signal Logs before going back to live alerts. The cTrader and website changes need no download.

Keep telling us what to fix#

If something in this release doesn't behave the way you expect, send us a message through the dashboard. Include the alert and what you expected to happen, with a screenshot if that helps, and we will have a much better starting point for reproducing it.

Thanks for testing with us.

Gabriel J., Co-founder

ShareX

Related posts