Rajandran R Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, USDINR and High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Strongly believe that market understanding and robust trading frameworks are the key to the trading success. Writing about Markets, Trading System Design, Market Sentiment, Trading Softwares & Trading Nuances since 2007 onwards. Author of Marketcalls.in)

How to Plot Bid Vs Ask Dashboard in Amibroker

1 min read

Here is a little Bid Vs Ask Dashboard for Amibroker users which helps to monitor the Bid-Ask Spread during live trading. In a highly liquid market the Bid Ask spread difference will be very thin whereas in a illiquid script the Bid-Ask spread get wider due to less number of buyers and sellers.

How to Get Bid Vs Ask Data
Amibroker supports a function called getRTdata() to retrive realtime data fields like Bid, Ask, BidSize, AskSize, Volume, Last…etc. refer here for more detailed reference

Requirements
1)Realtime Data Subscription Supporting Bid, Ask, BidSize, AskSize, Volume, Last.
2)Preferably Amibroker 5.6 verion or above.

Crude Oil Bid Vs Ask Dashboard
Crude Oil Bid Ask Dashboard

Steps to Install Bid Vs Ask Dashboard
1)Downlad Bid Vs Ask Dashboard Amibroker AFL code
2)Unzip to local folder and Save the AFL script in C:/Program Files/Amibroker/Formulas/Basic Charts folder.
3)Now goto File->New Blank Chart and Apply the Candle Stick Chart or your favorite Trading System
4)Now goto Charts->Basic Charts->Bid Vs Ask. Drag and Drop it to the Charting Space.
5)Bingo you are done. Now you should be able to see the Bid Ask Dashboard as shown above.

Amibroker AFL Code to Plot Bid Vs Ask Dashboard

//Code by Rajandran R
//Author : www.marketcalls.in
//Date : 18th Aug 2014


_SECTION_BEGIN("Bid Vs Ask Dashboard");

messageboard = ParamToggle("Message Board","Show|Hide",1);
if (messageboard == 1 )
{
Bid = GetRTData("Bid"); 
Ask = GetRTData("Ask"); 

GfxSelectFont( "Tahoma", 13, 100 );
GfxSetBkMode( 1 );
GfxSetTextColor( colorWhite );
GfxSelectSolidBrush( colorBlue ); // this is the box background color

pxHeight = Status( "pxchartheight" ) ;
xx = Status( "pxchartwidth");

x = 1000;
x2 =1090;
 
y = pxHeight-400;
 
GfxSelectPen( colorGreen, 1); // broader color
GfxRoundRect( x, y - 98, x2, y-50 , 7, 7 ) ;
GfxTextOut( ( "Bid"),x+13,y-100);
GfxTextOut( (" "),x+27,y-100);
GfxTextOut( (""+Bid), x+13, y-80) ; // The text format location

GfxSelectSolidBrush( colorOrange ); 
 
GfxSelectPen( colorGreen, 1); // broader color
GfxRoundRect( x+92, y - 98, x2+92, y-50 , 7, 7 ) ;
GfxTextOut( ( "Ask"),x+13+92,y-100);
GfxTextOut( (" "),x+27+92,y-100);
GfxTextOut( (""+Ask), x+13+92, y-80) ; // The text format location

}

_SECTION_END();
Rajandran R Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, USDINR and High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Strongly believe that market understanding and robust trading frameworks are the key to the trading success. Writing about Markets, Trading System Design, Market Sentiment, Trading Softwares & Trading Nuances since 2007 onwards. Author of Marketcalls.in)

[Live Coding Webinar] Build Your First Trading Bridge for…

In this course, you will be learning to build your own trading bridge using Python. This 60-minute session is perfect for traders, Python enthusiasts,...
Rajandran R
1 min read

[Webinar] Understanding and Mitigating Curve Fitting in System Trading

"Understanding and Mitigating Curve Fitting in System Trading"! This dynamic session aims to equip novice to intermediate traders, quantitative analysts, and financial engineers with...
Rajandran R
1 min read

P-Signal Strategy Long Only Strategy – Amibroker AFL Code

This tutorial provides an overview of the P-Signal reversal strategy, a quantitative trading strategy that utilizes statistical parameters and error functions to generate probabilistic...
Rajandran R
2 min read

14 Replies to “How to Plot Bid Vs Ask Dashboard in Amibroker”

  1. How to use this Bid-Ask dashboard? Entry Exit points are not specified??

    Thanks in advance !!

  2. sir,
    i have afl query
    i have ema crossover with rsi afl but in this when ema crossover occurs but rsi in still not completing criteria of buy that is above 50 ,and it is completing buy criteria after 3 candles of ema crossover then how to code afl to give buy ignal their
    can u help me
    ex,
    ema 5 crossing to 10 ema but rsi still @46
    rsi crossing 50 after 3 bars of ema crossover then how to give code to plot buy signal when all criteria completed

  3. I have a question related to bid/ask prices. I’m using text files to import into Amibroker. The files have bid/ask prices. I import the bid into Close and Ask into Aux1.

    Now, it’s easy to plot the Aux1 graph and have a graph for the bid and a graph for the ask. However, I’d like to get the OHLC values from the Aux1 graph, however I can’t seem to find any information on how to do this. Do you have any idea?

    Thanks.

      1. Hello Rajandran,
        I am hope you are doing well. I want your help if you dont have any problem. I want to develop completly new trading system. As per my knowledge these system are not used by any trader, it was used by Mr. Gann. I also consist of Tape Reading and different chart system. Plz reply.at [email protected]

        Thanks

  4. Rajendran could you help plz.

    How to draw bid price into a line chart via aux ?
    same with ask price into line chart via aux ?

    Pl help . searched internet but could not find codes.

    Thanks

  5. Hi, it works on new blank chart, but we can’t able to use existing graph. And Ask price is partially hidden. Any changes needed in parameter.

    Thanks in advance.

  6. Hi
    Mr.rajendran how I get bid and ask quantity in lines in amibroker then I need cross over pls help me

  7. I am unable to see bid rate and ask rate in trading hours. It shows EMPTY.
    Could u please help me in this regard.

  8. Rajandran Ji,
    Is their any way we can scan number of buyer seller difference in amibroker 6 ?
    Like a scanner that can scan out total buyer seller difference of more than 2 to 3 times.(Ex- Total buyer 12 lacs and total sellers 24 lacs or more difference).
    I am using accelpix data feed which gives market depth with the feed for my 250 stocks.
    Please help me to make a scanner of the above query.
    Darshan Bhullar

Leave a Reply

Get Notifications, Alerts on Market Updates, Trading Tools, Automation & More