NexusFi: Find Your Edge


Home Menu

 





Bid/Ask Spread Plot


Discussion in TradeStation

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




 
Search this Thread

Bid/Ask Spread Plot

  #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:	677
Size:	27.3 KB
ID:	71263  
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
How to apply profiles
Traders Hideout
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
ZombieSqueeze
Platforms and Indicators
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
 
  #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,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

philmg,

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

Regards,
ABCTG

Follow me on Twitter 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,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

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 Twitter 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,464 since Jun 2009
Thanks Given: 33,242
Thanks Received: 101,662


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



Join the free Markets Chat beta: one platform, all the trade rooms!

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 Twitter Visit my NexusFi Trade Journal Reply With Quote




Last Updated on April 7, 2014


© 2024 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 - Privacy Policy - Downloads - Top
no new posts