AmiBroker - Omnesys (NestPlus API) Trading Bridge  - Features :



  • Once the Bridge is installed (as explained Here), read the instructions shown on the chart and replace the sample Buy/Sell Strategy provided with the Bridge with your own strategy.




  • Right click on the chart, select 'Parameters' which will show following configurable parameters for the Trading Bridge.



  • Enter correct information first before selecting 'Yes' for 'Start Trading ?'



  • Slippage : This new field is added from version 1.3 to add / subtract margin to limit order price to adjust volatility. It accepts positive as well as negative values. So to Buy above trigger value, you will need to enter positive value and to Buy below LTP, you will enter negative value. Same will go for Sell

    Usage example : if you specify 1 as slippage and if trigger price is 100, Buy order limit price will be 101 and Sell order limit price will be 99. If you specify -1 as slippage, Buy order limit price will be 99 and Sell order limit price will be 101.



Line Pair Trading (LPT) :

What is this :

'Line Pair Trading (LPT)' allows user to enter / exit positions on the basis of positions of 2 lines (Buy Line & Sell Line) in the chart. User can position these lines anywhere in the chart as per their will. This type of trading DOES NOT REQUIRE any programming knowledge. User can also combine entry / exit of his own strategy with LPT.


How to use 'Line Pair Trading (LPT)' - Usage Instructions

  • As soon as LPT is enabled from Chart Parameters (right click on chart and select 'Parameters'), it shows 'how to use' instructions on chart - as below.




  • After reading these instructions, you can hide them by right-clicking on Chart>>Parameters>>Line Pair Trading>>Hide Usage Instructions from chart?>>Yes - as shown below.



  • From menu Insert, insert a Line on chart. Double-click on this line and in the Properties box that opens up, write GB against 'Study ID'. This is our 'BUY LINE'. You can change its colour to GREEN for easy referencing during trading.

     You can enter any type of line as per your wish which allows its identification using 'Study ID' - as explained below.









  • Follow same procedure to insert a SELL LINE. i.e. from menu Insert, insert a Line on chart. Double-click on this line and in the Properties box that opens up, write GS against 'Study ID'. This is our 'SELL LINE'. You can change its colour to RED during trading.



  • Right-click on Chart, Select Parameters and Select appropriate choice for 'Use Line Pair for Trading?". You can choose from the following 3 options :



    • Yes and use only LPT to generate Signals : This disables user strategy and generates signals only on the basis of the lines drawn.
    • Yes and use LPT + strategy-based signals (whichever hits first) : Lets you combine entry / exit of the user-strategy with those of LPT - on 'whichever hits first' basis.
    • No - do not use LPT at all (signals only through strategy) : Generates signals only on the basis of user strategy and disables LPT.


  • Users can use LPT & strategy-based trading exclusively or combine them in any manner. For example :
    • entry by LPT and exit by LPT - users trading short term trends or part-time traders or people without programming knowledge (choose 1st option above).
    • entry by strategy and exit by LPT - useful for profit-protect / stoploss orders (choose 2nd option above)
    • entry by LPT and exit by strategy - useful if you login late or decide to trade a signal after some time but once entered, want to exit as per the strategy only  (choose 2nd option above)
    • entry by strategy and exit by strategy - useful for traders who trade on readymade trading strategies from strategy vendors, traders who have their entry/exit rules written and prefer to follow the rules strictly (choose 3rd option above)




  • Select the 'trigger field' for Buy and Sell Orders (Low, Close or High).
  • Enter other trading information and then finally select 'Yes' to 'Start Trading?'.






  • Ensure that NestTrader is already started and you are logged in to NestPlus (from NestPlus menu).




 You can also select 'Trend Line' from menu Insert (or from toolbar) - to accurately select the triggering candle - as shown below.




 If you have more than 1 line on chart with same name (study id), AmiBroker triggers signals as per first drawn line. To ensure that all previous studies are removed from the chart before drawing a fresh one, right-click on chart and select 'Delete all Studies' - as shown below.





Manual Trading (MT) :

What is this :

'Manual Trading (LPT)' allows user to enter / exit positions ANY TIME as per their will - directly from the chart. This type of trading DOES NOT REQUIRE any programming knowledge. User can also combine entry / exit of his own strategy with LPT as well as existing user strategies.


How to use 'Manual Trading (MT)' - Usage Instructions

  • As soon as MT is enabled from Chart Parameters (right click on chart and select 'Parameters'), it shows 'how to use' instructions on chart - as below.




  • After reading these instructions, you can hide them by right-clicking on Chart>>Parameters>>Manual Trading>>Hide Usage Instructions from chart?>>Yes - as shown below.




  • As soon as MT is enabled and 'Usage Instructions' are hidden, 2 buttons will show at extreme right end of the chart - as shown below.


 Manual Trading buttons are displayed only when you are at the extreme right end of the chart with some blank space - sufficient enough to draw the buttons. If the buttons are not visible, press END button once or twice so that you are at the extreme right edge of the chart.
 You will need to make sure that 'Start Trading' is enabled - to see these buttons - as shown below.




  • You can use MT standalone (without combining with any strategy or LPT) or combine it with your existing strategy / LPT.
  • 'Min wait time for next order in sec' is provided so that user does not click on same button accidentally. Please use sufficient wait time (default is 5sec) - as shown below.





Skip doubling the quantities for first order on AmiBroker start :
If you want that the first order after starting AmiBroker should always use single-side quantity - even if you have selected Long and Short strategies - you can do so by selecting 'Same as above even if Long and Short' for 'Qty ONLY FOR first Order on AmiBroker start?' from Parameters>>Trade Information - as shown below.





Trailing Stoploss :
If users want to apply Trailing Stoploss for their existing strategy - even if it does not exist in their original code - they can do so by using 'Trailing Stoploss' feature of our Trading Bridge.




1. Use Trailing Stoploss : Select Yes to apply Trailing Stoploss to your existing strategy (which does not originally have any such provision).

2. Trailing Stoploss Method : You can choose either 'Percentage of Entry Price' - or 'Fixed Value'.

3. Trailing Stoploss Value : You can enter the stoploss value here. Based on your choice for Trailing Stoploss Method (Percentage or Fixed Value), stoploss will be calculated.

4. For Long, trail with respect to : You can choose 'Highest High since Buy', 'Highest Close since Buy' or 'Lowest Low since Buy'. Accordingly, the stoploss will trail from your selection.

5. For Short, trail with respect to : You can choose 'Lowest Low since Short', 'Lowest Close since Short' or 'Highest High since Short'. Accordingly, the stoploss will trail from your selection.

6. For Long, triggering field for trailing stoploss : You can select Low or Close. Only when selected field breaches trailing stoploss, position will be closed on chart / order will be sent to NestTrader.

7. For Short, triggering field for trailing stoploss : You can select High or Close. Only when selected field breaches trailing stoploss, position will be closed on chart / order will be sent to NestTrader.

8. Show Trailing Stoploss lines : When enabled, it will show the trailing stoploss as lines on chart (green dashed line for Long and red dashed line for Short). To avoid clutter, only single trailing stoploss line corresponding to last signal triggered on chart (towards extreme right end) will be shown. For example, if last signal on chart is Buy, trailing stoploss line only for Buy will be shown on chart.

9. Hide Usage Instructions from Chart : Selecting this setting will hide 'usage instructions' from chart.




Target Based Exit :
If users want to add Target Based Exits for their existing strategy - even if it does not exist in their original code - they can do so by using 'Target Based Exit' feature of our Trading Bridge.




1. Use Target-based Exits : Select Yes to apply Target-based Exits to your existing strategy (which does not originally have any such provision).

2. Target Calculation Method : You can choose either 'Percentage of Entry Price' - or 'Fixed Value'.

3. Target Value : You can enter the target value here. Based on your choice for Target Calculation Method (Percentage or Fixed Value), Target will be calculated.

4. For Long, triggering field for Target : You can select High or Close. Only when selected field breaches Target, position will be closed on chart / order will be sent to NestTrader.

5. For Short, triggering field for Target : You can select Low or Close. Only when selected field breaches Target, position will be closed on chart / order will be sent to NestTrader.

6. Show Target lines : When enabled, it will show the Targets as lines on chart (green thick line for Long and red thick line for Short). To avoid clutter, only single Target line corresponding to last signal triggered on chart (towards extreme right end) will be shown. For example, if last signal on chart is Buy, Target line only for Buy will be shown on chart.

7. Hide Usage Instructions from Chart : Selecting this setting will hide 'usage instructions' from chart.



Symbol Mapping Dictionary :
Users can use symbol mapping dictionary to specify the mapping between symbols used in Chart and related trading symbol in NestTrader. This is useful for traders trading many symbols at once using same trading strategy.



1. AmiBroker-to-NestTrader Symbol Mapping Preference? : You have following choices to specify the Symbol Name in AmiBroker which matches with symbol name as required by NestTrader for placing order.
Background : Often, charting platforms symbology does not match with trading platform. In order to place order, you need to convert the chart platform symbol name to corresponding symbol name in trading platform, so that order can be placed. For example, often current month futures symbol of underlying NIFTY is shown as NIFTY-I in chart whereas in trading platform, it is NIFTY12NOVFUT, NIFTY12DECFUT, etc.. The dictionary can be used to create a pre-mapped symbols so that same chart can be reused to place order for multiple symbols.

2. Use Symbol Mapper Dictionary : If you choose this option, you will need to specify the corresponding symbol in Symbol Mapper Dictionary file (GFDL_NEST_Symbol_Mapper.csv) and you can find it in Formulas\GFDL-NEST directory on your computer. This is a text file in CSV format which contains comma-separated-values (CSV) of symbol names as shown in AmiBroker and symbol as required in NestTrader - in each row. You may open / edit / create such a file in Windows Notepad.
By any chance if the file is not present / deleted, you can download sample file from our Download Section.

3. Use Symbol Code below : If you choose this option, you will need to specify the symbol name as required in NestTrader in next parameter 'Symbol Name as shown in NestTrader' (point 5 in above screenshot).


4. Use Symbol Mapper Dictionary OR Symbol Code below : If you choose this option, you can either specify the symbol name in symbol mapper dictionary or directly in next parameter (point 5 in above screenshot). This is the default and suggested option which will work for most requirements.







Close Position Intraday :
If you do not want to carry any position home after market close, this facility should come handy to you. You can close your intraday positions on chart as per your time preferences - as explained below.


1. Close position intraday ? Choose Yes if you do not want to carry positions home and No (default) if you want to carry forward position as per the chart on next day.

2. Close NSE position at (HHMMSS) : If you choose Yes above, you can enter the time at which you want your position to close in the chart. For example, if you want to exit your position for NSE symbols at 3:20PM, you can enter 152000 here (15 for hour, 20 for min and 00 for sec).
Note for nimbleDataPro Users : Candle in nimbleDataPro ends at 59 sec and hence if you want to exit your position at 3:20PM, you should enter 151959 here (15 for hour, 19 for minutes and 59 for seconds).

3. Close MCX position at (HHMMSS) : If you choose Yes above, you can enter the time at which you want your position to close in the chart. For example, if you want to exit your position for MCX symbols at 10:05PM, you can enter 220500 here (22 for hour, 05 for min and 00 for sec).
Note for nimbleDataPro Users : Candle in nimbleDataPro ends at 59 sec and hence if you want to exit your position at 3:20PM, you should enter 151959 here (15 for hour, 19 for minutes and 59 for seconds).






Plot Current Trade Entry Line, Current Market Price (CMP) Line, Current Trade Profit :
You can view entry price for latest signal, current market price and realtime profit / loss in last trade by enabling following Parameters. These give excellent visual feedback to the user.


1. Plot Entry Line ? Choose Yes if you want to see entry price. This is drawn as a straight horizontal line from the entry candle close till last candle. Close price of entry candle is shown above this line as entry price.

2. Plot Current Price Line ? : Choose Yes if you want to see CMP (Current Market Price) Line. This is drawn as a straight horizontal dashed line. The line changes its position every second or as and when there is price update in the chart.

3. Plot Current Trade Profit / Loss ? : If you choose Yes, it shows profit / loss in last trade just next to the last candle in the chart and just above the Current Price Line. The profit / loss is shown in absolute points and difference of close of entry point and current price is considered for calculations. Profit is shown as green and loss is shown as red with (-) negative sign.





Detailed Profit / Loss Report :


If you want to see detailed profit / loss report but do not know how to use Backtest in AmiBroker, don't worry. Here is a handy facility for you which will show you profit / loss statement for current day, week, month & year. You can also see Report between any 2 dates - as explained below.




1. Show Profit / Loss Report ? Choose Yes if you want to see detailed profit loss report. When enabled, it shows detailed profit / loss report for current date, week, month, year and report for custom 2 dates chosen by you - overlaid on your existing chart. You can change your underlying strategy like entry-exit parameters, timeframe, etc. and it will dynamically update the Profit / Loss statement in the chart. Please note that Close of Entry / Exit candle is considered for Profit / Loss Report.

2. No. of Lots ? : Choose No. of Lots for Profit / Loss Report. Please note that this setting is used only in report and does not change your trading parameters.

3. Lotsize ? : Choose Lotsize for Profit / Loss Report. Please note that this setting is used only in report and does not change your trading parameters.

4. Brokerage ? : You have 4 choices for the report to include the brokerage in Profit / Loss Report - as explained below.



4.1. Fixed Percentage per trade : If you choose this, brokerage will be calculated as per fixed percentage per trade.

4.2. Fixed Amount per trade : If you choose this, brokerage will be calculated as per fixed amount per trade.

4.1. Fixed Amount per lot : If you choose this, brokerage will be calculated as per fixed amount per lot.

4.1. Do not include Brokerage : If you choose this, profit / loss report will be shown without considering brokerage.

5. Brokerage Value : Enter the Brokerage value here.
6. For custom report, start date : Enter the start date to see profit / loss report between any 2 dates. The date should be entered as DDMMYYYY without any spaces.
Example : To enter 1st January 2013 as start date, enter 01012013. Please note that the date entered here must be a trading day.

7. For custom report, end date : Enter the end date to see profit / loss report between any 2 dates. The date should be entered as DDMMYYYY without any spaces.
Example : To enter 31st January 2013 as end date, enter 31012013. Please note that the date entered here must be a trading day.


A sample Profit / Loss report generated is enclosed below (Courtesy & copyright : tradinganalysis.co.in : ACE Nifty Futures Trading System)





Suggestions :