9911939149 support@algoji.com

Integration

You can send Signals in Chart bridge through an external program such as Amibroker/MT4/TradingView/Python/C# etc.

Understanding How Signals Work

The Chart bridge works based on “Signals”. A Signal is basically a decision to Buy or Sell with specific conditions. The Chart bridge processes 4 types of Signals:

  • Long Entry (LE)     : Equivalent to fresh Buy for creating Long position
  • Long Exit (LX)    : Equivalent to Sell for reducing/squareoff Long position
  • Short Entry (SE)    : Equivalent to fresh Sell for creating Short position
  • Short Exit (SX)    : Equivalent to Buy for reducing/squareoff Short position

For placing orders, the Chart bridge requires values either from Signal, or from Symbol Settings window. Any values given in Symbol Settings window over-ride the Signal values.

As per above process diagram, the sequence of Signal processing is as follows:
  1. Signal is received in Chart bridge 2. Values are taken from Symbol Settings window by matching symbol given in Signal with “Input Symbol”
  2. Signal Setting rules are applied from Application Settings -> Signal Settings
  3. Risk Management rules are applied from Application Settings -> Global Risk Management
  4. Order is sent to API
    Integration Specific Files

    Chart bridge connects with signal generation applications at three levels. Contact your Chart bridge Administrator (from where you purchased copy of this software) for these integration specific files.
    Easiest – Zero Programming Effort
    Trading View :  An external app TVConnector to fetch & process alerts
    Intermediate – Programming via Scripts
    Amibroker  :  AFL codes for adding to strategy, dll plugin files
    MT4 :  Mq4, ex4 and mqh files
    NinjaTrader :   ninjascript files
    Advanced – Socket Programming
    Python/C#/Excel VBA  :   Code for socket connection
    Note: Multiple Targets, Partial exits, custom position sizing, scalping, multi-leg execution etc. may be available via Chart bridge. Contact your administrator for details.

    Signal Format & Coding Guide
    Chart bridge allows you to customize all values at each signal, such as quantity, or order type. You can program your own strategy to place orders with all custom values at each signal. For controlling order params via code, you should leave blank values in the Chart bridge under Symbol Settings. The mandatory values for each Symbol are marked with * under Symbol Settings. The Signal format is:
    ID, Type, Symbol, Order Type, Trig Price, Price, Qty, Instrument Name, Strategy Tag

    1. ID (mandatory): unique id for each signal. If two signals have the same id, the status for the respective order placed may be wrong.
    2. Type (mandatory): can be either LE, LX, SE or SX.
    3. Symbol (mandatory): symbol name which will be matched to Input Symbol under Symbol Settings. If you want to send strike/expiry also through Amibroker, you can combine it in syntax “Symbol | Expiry | Strike | OptionType”
    4. OrderType (optional): can be Limit, Market, SLL or SLM. It can be combined for ProductType using “|”.
    5. TrigPrice (optional): should be 0 or Null for market/limit orders. If you want to send extra parameters for OCO order, you can combine it in syntax “TrigPrice | StopLoss | SquareOff | TrailingTicks”
    6. Price (optional): should be 0 or Null for market orders
    7. Qty (optional): Order Quantity
    8. InstrumentName (optional): It should be any of the following EQ|FUTIDX|FUTSTK|OPTIDX|OPTSTK|FUTCUR|FUTCOM
    9. StrategyTag (optional): It can be any string to identify which particular strategy is sending Signals
    Coding Examples

    All example Signal codes given below are sent using mostly blank columns in Chart bridge to place order.

    Example 1: Send Market Order in Equities to create Short position:
    AlgoJi_Signal(“1”, “SE”,”SBIN”,”Market|MIS”,””,””,”100″,”EQ”,””);

    Example 2: Send Stop Limit Order in Equities to create Short position:
    AlgoJi_Signal(“1”, “SE”,”SBIN”,”SLL|MIS”,”302.50″,”302″,”100″,”EQ”,””);

    Example 3: Send Stop Market Order in Equities to create Long position:
    AlgoJi_Signal(“8”, “LE”,”SBIN”,”SLM|MIS”,”302″,”0″,”100″,”EQ”,”STG1″);

    Example 4: Send Bracket Order in Equities for Long trade:
    Algoji_Signal(“6”, “LE”,”SBIN”,”SLL|BO”,”302|1.5|3″,”302.10″,”100″,”EQ”,”STG1″);

    Example 5: Send Limit Order in BankNifty Futures to create Short position:
    Algoji_Signal(“6”, “LE”,”BANKNIFTY”,”Limit|NRML”,””,”28400″,”20″,”FUTIDX”,”STG1″);

    Example 6: Send Limit Order in BankNifty Options to exit Long position:
    Algoji_Signal(“6”, “LX”,”BANKNIFTY|28Nov2019|28400|CE”,”Limit|NRML”,””,”102.50″,”20″,”OPTIDX”,”STG1″);

    Example 7: Send Market order in Currency Futures to exit Long position:
    Algoji_Signal(“6”, “LX”,”EURINR|27Nov2019″,”Market|NRML”,””,”0″,”1000″,”FUTCUR”,”STG1″);