Tradingconnector enables executing alerts from closed-source scripts
In its biggest update since the initial launch TradingConnector delivers a variety of features most asked-for as well as one nobody realised was possible.
Now TradingConnector enables to:
Set StopLoss, TakeProfil, Trailing and BreakEven at a percentage distance from the entry price. Alert Syntax would be slperc= instead of sl=. Or tpperc= instead of tp=. And so on. Please check other variants in Alerts Syntax page.
Close all trades or close all trades on a specified ticker with just one alert. Syntax: closeall= and closeall_on_ticker= .
Do not take entries if the slippage is too wide. Syntax: slippage= .
Add comments to your trades. Syntax: comments= .
And the biggest update would be “Search&Replace Alerts Modifier” module, which enables executing alerts which are not in-line with TradingConnector’s Alert Syntax - most probably because they are coming from closed-source scripts.
Alerts Modifier grabs the alert fired by TradingView and modifies it in a well-known from text-editors Search&Replace mechanism before forwarding to MetaTrader for execution. You only need to specify two strings of text for Search&Replace: one to be found in incoming alert and a second one to replace the first one in every occurrence.
Example - let’s say your alert looks like this:
{“id”:1701248700,”symbol”:”XAUUSD”,”command”:"short tradesymbol=XAUUSD lot=0.01”,”time”:1701248700}
Such alert will not be parsed by TradingConnector, because keyword like short will not be found. There is only …mind”:”short - which will not be recognised. But if you process your alerts through Search & Replace Alerts Modifier, specifying to replace “ symbol with plain space, above alert would become this:
{ id :1701248700, symbol : XAUUSD , command : short tradesymbol=XAUUSD lot=0.01 , time :1701248700}
Nicely separated short keyword will be recognised and alert will get executed in MetaTrader. Irrelevant words (time, id, symbol, command) or strings (:1701248700, XAUUSD) will be ignored doing no harm.
Needless to say - you can have more than 1 search&replace pair of strings.