TradingView Integration with Stoxxo Intelligent Trading Bridge

Trading View Integration

If you’re a TradingView user, then you are able to place orders from TradingView to your broker using the Intelligent Bridge without needing programming or any technical knowledge.

 

To integrate the TradingView with a bridge there are three ways. We can divide tradingview into two parts, Free version and the Paid Version. Both free and paid versions of TradingView give real-time data with some limitations in the free version, and also you can use both versions for trading.

 

To communicate with the TradingView, Intelligent Bridge uses its Alerts functionality to catch any signal. Alerts are available in free and paid both versions However, there are limitations of the number of alerts and the way alerts work in free versions. In the free version you cannot use continuous alerts, Once you set an alert, it will trigger once and then disable automatically. Also, webhooks in alerts are not available as a free option.

 

Message / Comments format for Paid Users (WebHook) or Free Users (on Screen Alerts) will remain the same.

 

TradingView WebHooks (For Paid Users)

 

This is the most reliable way to communicate with the TradingView, however WebHooks alerts are only available to paid users of tradingview.

 

If you’re a Paid TradingView user, then this is the best way to communicate with TradingView. Please follow below Simple Steps and you’re done.

 

 

  1. Click Options Button and then Select Settings and Plugin Installation.

  1. Select TradingView
  2. Tick on Enable TradingView WebHooks.
  3. Click Get WebHook Url Button (this button generates a new url every time. If in future you want to change your URL, then you only need to click this button.)
  4. Select the Default Strategy. (This will be the default strategy if you are not setting STAG in Alerts.)

5. Finally, Click on Configure so that Settings can be saved in the Bridge.

6. Check TradingView Integration

7. If all is completed properly, copy and paste the webhook url into chrome or your browser.

8. You should see a message “success” in chrome / browser and an error message “Invalid Parameters in TradingView Signal, Input: -” in your Stoxxo- Intelligent Trading Bridge’s logs grid.

 

Great, now you’re with a WebHook URL which can be set into TradingView Alerts for catching signals in the Bridge.

 

Now set this URL into your TradingView alerts and remember to set the Message / Comments in the Alerts / PineScript. All the Parameters are given in the table below, you can use them as per your requirements. Give care for mandatory parameters as per your case.

TRADING VIEW FOR FREE USERS

TradingView Plugin (For Free
Users)

 

Stoxxo- Intelligent Trading Bridge is having a dedicated chrome plugin for TradingView which can be
utilized by the free users of TradingView. It is important to note that free
users having few restrictions from trading view such as can enable only 1
active alert at a time.

 

Please follow
the below step to enable Chrome Plugin for TradingView.

 

  1. Close the Chrome Browser if already
    opened.
  2. Click Options Button and then Select Settings and Plugin Installation.
 
  1. Select TradingView
  2. Tick on Enable TradingView Plugin.
  3. Click on Click Here to download Chrome Plugin.

6. On clicking the Link, IAB will open chrome with a URL having plugin.

7. Click on IABTV Crx file and it will automatically starts installing into Chrome.

8. Click the Add extension when asked by chrome and you’re done with installing the plugin.

  1. Finally, Click on Configure in IAB so that Settings can be saved in the Bridge.

Great, now you can open a tradingview chart and check your newly installed plugin.

Few Examples for Message / Comments format:

  1. Sending Market Order (Assuming your mapping is set to Market Order)

SYMBOL: SBIN

TYPE: LE

Or

SYMBOL: SBIN, TYPE: LE

Or

SYMBOL: SBIN : TYPE: LE

Or

SYMBOL: {{ticker}}, TYPE: LE

  1. Sending Limit Order (Assuming your mapping is set to Market Order)

SYMBOL: SBIN

TYPE: LE

ORDERTYPE: LIMIT

PRICE: 240.15

Or

SYMBOL: SBIN, TYPE: LE, ORDERTYPE: LIMIT, PRICE: 240.15

Or

SYMBOL: SBIN : TYPE: LE : ORDERTYPE: LIMIT : PRICE: 240.15

Or

SYMBOL: {{ticker}}, TYPE: LE, ORDERTYPE: LIMIT, PRICE: {{close}}

You can use the parameter from the table below and can create a message which is more appropriate in your requirements.

Multiple Signals in One Alert

In cases and depending upon your strategy you may want to send Multiple Signals in a single alert. Example on an alert, you may want to send an exit signal and a new entry signal at the same time.

This can be achieved by sending both signals by separating them by semicolon (;)

Suppose you want to send

Signal 1: SYMBOL: SBIN, TYPE: LE

Signal 2: SYMBOL: ICICIBANK, TYPE: LX

Signal 3: SYMBOL: CANBK, TYPE: SE

So, in place of sending three different signals you can send all 3 at once by separating by semicolon (; ) as given below.

Example: SYMBOL: SBIN, TYPE: LE; SYMBOL: ICICIBANK, TYPE: LX; SYMBOL: CANBK, TYPE: SE

Very Important Notes

  1. Format and Case of the Parameters are very important. Parameters should be the same as given below grid only in capital case only and ending with : (colon). Example TYPE:
  2. Never share your WebHook URL. Anyone with the URL can send signals to your bridge. If you see any suspicious activity or feel someone has seen your URL, then you can change that URL immediately by clicking “Get WebHook Url” Button under settings as mentioned in above points. Clicking the button will regenerate a new URL. Remember to click Configure so that settings can be saved.
  3. To avoid the duplicate signals, remember to set the strategy misfire settings such as no duplicate signal till seconds etc.

Few Important Links

How to setup TradingView Alerts:

https://www.tradingview.com/support/solutions/43000595315-how-to-set-up-alerts/

How to use a variable value in alert:

https://www.tradingview.com/support/solutions/43000531021-how-to-use-a-variable-value-in-alert/

About TradingView alerts:

https://www.tradingview.com/support/solutions/43000520149-about-tradingview-alerts/

Strategy Alerts:

https://www.tradingview.com/support/solutions/43000481368-strategy-alerts/

Alerts settings:

https://www.tradingview.com/support/folders/43000547663-alerts-settings/

 

 

TRADINGVIEW PARAMETERS

S.NO PARAMETER OPTIONAL/
MANDATORY
DESCRIPTION REMARKS / EXAMPLE
1 TYPE: Mandatory LE, LX, SE, SX, LM, SM
These communicate to the
bridge as to what the incoming
order’s transaction type
Please refer to the signal type section
for more details
2 SYMBOL: Mandatory This is the Source Symbol
which is received with the
Signal and will be used to check
Symbol Mapping.
This is generally a symbol from your
chart.
TradingView Variable:
{{ticker}} – ticker of the symbol
used in alert (AAPL, BTCUSD,
etc.)
3 QTY: Optional Quantity for the Order.
If a user sends Quantity with
Signal, then Bridge will take that
quantity otherwise it will take
quantity from the Symbol
Mapping.
For Future and Options,
Quantity must be supplied in
Lots.
 
4 ORDERTYPE: Optional Order Type for Order.
If not sent with signal then this
will be selected from Symbol
Mapping.
Possible Values: MARKET, LIMIT, SL,
SL-M
Valid For BO: SL and SL-M
Valid For CO: MARKET and LIMIT
5 PRODUCT: Optional Product which is used to select
the Order Variety Example MIS
/ CO / BO etc.
This can be from Symbol
Mapping or from signal. Valid
values are.
● MIS,
● CNC,
● NRML,
● BO,
● CO
Product type of the Order.
6 PRICE: Mandatory
for LIMIT
and SL
Orders
Optional for
others
It conveys the price for Limit
Orders.
➢ Should be mandatorily conveyed
to IAB for LIMIT and SL orders.
➢ Optional if the order types are
Market / SL-M
TradingView Variable can be used:
{{close}}, {{open}}, {{high}},
{{low}}
7 TRIG: Optional Captures the SL or SLM trigger
price from trading platform
➢ If supplied, it will be used as it is
for SL and SL-M orders. It will be
ignored for Limit Orders.
➢ For MARKET and LIMIT Orders,
If the broker is providing the
streaming data, then Bridge will
only place the Simple / CO
Entry Orders when LTP reaches
trigger price.
➢ It will work only for Entry
Orders. If the broker is not
providing the feed, then order
will be placed immediately .TradingView Variable can be used:
{{close}}, {{open}}, {{high}},
{{low}}
8 SL: Mandatory
for BO & CO
Optional for
MIS and
others
Specifies the SL for BO & CO
Orders
➢ Should be mandatorily conveyed
to IAB for BO & CO orders.
➢ Unsupported for other order
types.
➢ If the broker is providing the
data feed, then Bridge will take
care of Stop loss for Simple
Entry Orders.
➢ If you want to specify in points
then just fill the value and if you
want to specify in percentage
then put a % sign after value Eg
0.40% .
9 TGT: Mandatory
for BO
Optional for
others
Specifies the target for BO
Order
➢ Should be mandatorily conveyed
to Bridge for BO orders.
➢ Optional for other order types.
➢ If the broker is providing the
streaming data, then Bridge will
take care of Targets for Simple
and CO Entry Orders.
➢ If you want to specify in target
points then just fill the value and if
you want to specify in
percentage then put a % sign
after value Eg 0.50% . IB
automatically computes the target
based on your input and the entry
/ execution price.
10 TRAILSL: Mandatory
for BO
Optional for
others
Specifies the Trailing SL for BO
& CO Order s
➢ Can be optionally conveyed to
IAB for BO & CO orders.
➢ Unsupported for other order
types.➢ If the broker is providing the
data feed, then Bridge will take
care of Trailing Stop loss for
Simple and CO Entry Orders.
➢ If you want to specify in points
then just fill the value and if you
want to specify in percentage
then put a % sign after value Eg
0.10% .
11 STAG: Mandatory
/Optional
Implements strategy rules as
per symbol mapping.
By using STAG the bridge is
able to locate the related
strategy and can apply the
necessary rules.
➢ One can create their own strategy
tags and link it with an instrument
in the Strategy Settings so that
signals can be linked with strategy
and can apply strategy rules.
12 SLTP: Optional Signal LTP : Captures the
signal price from charting
platform.
➢ LTP from the charting platform.
13 OPTTYPE: Optional If you wanted to specify options
type with the signal, then you
can use this field.
Valid values are.
● CE
● PE
 
14 SIGID Optional Serves as a unique ID for any
given signal from trading
platforms.
Same can be used for Exit
signal and modification.
➢ If you do not wish to use then
send as 0.
➢ However, It is strongly advisable
that
➢ You should supply a unique ID for
each entry signal so that you can
use the same ID to exit that
particular signal.
➢ If ID is not specified then exit
signal will exit the first open entry
signal and so on

Leave a Reply

Your email address will not be published. Required fields are marked *