NexusFi: Find Your Edge


Home Menu

 





Bid/Ask Spread Plot


Discussion in TradeStation

Updated
      Top Posters
    1. looks_one philmg with 2 posts (0 thanks)
    2. looks_two ABCTG with 2 posts (0 thanks)
    3. looks_3 trader0074x with 1 posts (0 thanks)
    4. looks_4 Big Mike with 1 posts (0 thanks)
    1. trending_up 8,204 views
    2. thumb_up 5 thanks given
    3. group 4 followers
    1. forum 7 posts
    2. attach_file 1 attachments




 
Search this Thread
  #1 (permalink)
 
cbritton's Avatar
 cbritton 
Atlanta, Georgia
 
Experience: Intermediate
Platform: NT
Broker: DDT
Trading: ZN, ZB
Posts: 230 since Mar 2010
Thanks Given: 152
Thanks Received: 256

I put together this indicator to show where the inside bid and inside ask is on a chart. The idea came from a couple of different indicators found on the TS forum. This indicator will plot lines for the inside bid and inside ask on the "space to the right" of the chart. The difference (spread) is also plotted below the low (and slightly to the right, however, the exact position of the text is a work in progress, but I realize that some may prefer a different location). See the screen shots for examples. I've tested this on 5 minute and 6 range charts. However, this indicator may not be useful for big time frame charts where it's not easy to see the small range of the spread.

I don't have multicharts, so I have no idea if this works on that platform.

Regards,
-C
 
Code
Vars: intrabarpersist spread(0),
      intrabarpersist spacing(-1), 
      intrabarpersist plotsize(0),
      loop(maxbarsforward),
      k(0);

if Value1 = 0 then
    Value1 = Text_New(date, time, Close * 2, "  ");
Plot3(c, "Text");        
Text_SetStyle(Value1, 2, 0);
Text_SetColor(Value1, getPlotColor(3));    

If LastBarOnChart then begin
        
    Spread = DecConvPip(insideAsk - insideBid);

    if Value1 > 0 THEN BEGIN
        Text_SetString(Value1,"" + Numtostr(Spread,1));
        Text_SetLocation(Value1, Date, Calctime(time,2.5), Low - 2*(minmove/pricescale));
    end;  
    
    for k = 0 to loop begin
          Plot1[-k](insideBid, "Bid");
          Plot2[-k](insideAsk, "Ask");
    end;
    noplot(1);
    noplot(2);
    
end;
noplot(3);


“Strategy without tactics is the slowest route to victory. Tactics without strategy is the noise before defeat.” - Sun Tzu
Attached Thumbnails
Click image for larger version

Name:	bid_ask_spread.png
Views:	758
Size:	27.3 KB
ID:	71263  
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Hormuz Surges From 14% to 26.5% Intraday as Irans Answer …
Prediction Markets & Event Contracts
After $87M Settles NO: Irans Nuclear Redline Sets Up the …
Prediction Markets & Event Contracts
One Wallet Made $200K in Hours: AP Probes Polymarket Cea …
Prediction Markets & Event Contracts
Iran Lebanon Problem Kills Switzerland Talks, Brent at $ …
Prediction Markets & Event Contracts
CFTC Workforce Shrinks 24% to 15-Year Low While Predicti …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Big Mike in Ecuador
205 thanks
Sober Journey With S&P
21 thanks
30 Sessions
20 thanks
Volume Indicators
8 thanks
Thanks Mike. Godspeed.
7 thanks
  #2 (permalink)
trader0074x
Baton Rouge, La USA
 
Posts: 1 since Aug 2013
Thanks Given: 0
Thanks Received: 0

Had been trying to do this on my own as a rookie and could not quite get there. This is exactly what i was looking for and is educational at same time.


Reply With Quote
  #3 (permalink)
philmg
Frankfurt + Hessen//Germany
 
Posts: 3 since Mar 2014
Thanks Given: 1
Thanks Received: 0


I am getting an error compiling it, because I don't seem to have the function DecConvPip in Tradestation.
What does it do? Can you please share the code of DecConvPip? Thanks a lot!


Reply With Quote
  #4 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,642

philmg,

you can take a look at the modified study here it doesn't work DecConvPip:

Regards,
ABCTG


Follow me on X Reply With Quote
  #5 (permalink)
philmg
Frankfurt + Hessen//Germany
 
Posts: 3 since Mar 2014
Thanks Given: 1
Thanks Received: 0

thanks, but I guess this one doesnt work for forex so far. the onetick word is also not recognized. what can i do?


Reply With Quote
  #6 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,642

philmg,

you will need to copy and paste the whole code from my post. OneTick is a variable declared further up in the code it will be reconized when you use the full code.

Regards,
ABCTG


Follow me on X Reply With Quote
  #7 (permalink)
 Bosch777 
Ireland
 
Experience: Intermediate
Platform: Ninja Trader
Trading: CL GC FDAX
Posts: 118 since Jul 2012
Thanks Given: 89
Thanks Received: 55

Hi folks

does anyone know if there is an indi that will plot the bid/ask on a NT chart for futures and fx?

Cheers...


Reply With Quote
  #8 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,669 since Jun 2009
Thanks Given: 33,669
Thanks Received: 102,584


Bosch777 View Post
Hi folks

does anyone know if there is an indi that will plot the bid/ask on a NT chart for futures and fx?

Cheers...

This is the TradeStation section you posted in. Post in the Ninja section.

Mike




We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on X Visit my NexusFi Trade Journal Reply With Quote




Last Updated on April 7, 2014


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts