NexusFi: Find Your Edge


Home Menu

 





Bid/Ask line


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one raven1029 with 2 posts (0 thanks)
    2. looks_two ABCTG with 2 posts (1 thanks)
    3. looks_3 semper with 1 posts (0 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 8,263 views
    2. thumb_up 1 thanks given
    3. group 4 followers
    1. forum 6 posts
    2. attach_file 1 attachments




 
Search this Thread

Bid/Ask line

  #1 (permalink)
raven1029
Barcelona + Spain
 
Posts: 2 since Feb 2013
Thanks Given: 0
Thanks Received: 0

One thing I am missing in MC is bid/ask lines running across the chart. I found a semi-functional indicator (in MC) for TradeStation, you can find it if you search for "Bid/Ask Spread Plot" under Tradestation forum on this site (I cannot post links yet).

My MC EL skills are not up to par yet, maybe someone can fix the indicator to run under MC?
Apparently the request to Multicharts to include the feature has been made couple of times in the past, but the platform does not have it built in, yet. In my opinion, it is a very basic feature common in most charting platforms I have seen in the last 15 years.

I hope someone can help out here. Thank you in advance,

Raven

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
Are there any eval firms that allow you to sink to your …
Traders Hideout
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
ZombieSqueeze
Platforms and Indicators
Exit Strategy
NinjaTrader
 
  #3 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,431 since Apr 2013
Thanks Given: 481
Thanks Received: 1,623


raven1029,

how exactly do you want it to look like? MC has a build in indicator called "Bid & Ask" that works in realtime only, but plots the current best bid and ask on the chart. Does this do what you have in mind?

Regards,
ABCTG

Follow me on Twitter Reply With Quote
  #4 (permalink)
raven1029
Barcelona + Spain
 
Posts: 2 since Feb 2013
Thanks Given: 0
Thanks Received: 0

ABCTG, thanks for the reply. "Bid & Ask" built-in indicator functions a bit differently, as it plots historical ask/bid. What I want is real-time bid/ask lines that are drawn from the last bar to the right y-axis (price). Let's say my bar chart starts 10 bars from the right y-price axis, then this indicator would draw two horizontal lines, each 10 bar long. As such, they would depict the real time bid/ask spread.

There is a very accurate post about the same issue on this site, under Tradestation forum. The author of that post included images that show it very well, see if you can google "Bid/Ask Spread Plot tradestation" and it will come up as the top result.

Thank you again!

Reply With Quote
  #5 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,431 since Apr 2013
Thanks Given: 481
Thanks Received: 1,623

I don't have the function "DecConvPip" cbritton uses within his code, but here is a version modified to
work within MC. The only changes are that DecConvPip is exchanged with dividing the spread by one tick. This works fine for futures, we might need to adjust this for currencies though. All the credit goes to cbritton for creating this indicator.


 
Code
Vars: intrabarpersist spread(0),
      intrabarpersist spacing(-1), 
      intrabarpersist plotsize(0),
      OneTick(MinMove/PriceScale),
      loop(maxbarsforward),
      k(0);

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

If LastBarOnChart_s then begin
        
    Spread = (insideAsk - insideBid)/(OneTick);

    if Value1 > 0 THEN BEGIN
        Text_SetString(Value1,"" + Numtostr(Spread,1));
        Text_SetLocation_s(Value1, Date, Calctime_s(time_s,2.5), Low - 2*(OneTick));
    end;  
    
    for k = 0 to loop begin
          Plot1[-k](insideBid, "Bid");
          Plot2[-k](insideAsk, "Ask");
    end;
    noplot(1);
    noplot(2);
    
end;
noplot(3);
Regards,
ABCTG

Follow me on Twitter Reply With Quote
Thanked by:
  #6 (permalink)
semper
Haren Groningen
 
Posts: 3 since May 2016
Thanks Given: 0
Thanks Received: 0

I think what raven 1029 meant, was two lines like the ordinary Ask and Bid lines in say MT4 or Protrader.

Like the yellow lines in the images, whereas the top yellow line is the current pricemarker.


Reply With Quote
  #7 (permalink)
 leescharf 
New York, NY
 
Experience: Beginner
Platform: TradeStation
Trading: Futures
Posts: 17 since Aug 2020
Thanks Given: 4
Thanks Received: 8


ABCTG View Post
I don't have the function "DecConvPip" cbritton uses within his code, but here is a version modified to
work within MC. The only changes are that DecConvPip is exchanged with dividing the spread by one tick. This works fine for futures, we might need to adjust this for currencies though. All the credit goes to cbritton for creating this indicator.


 
Code
Vars: intrabarpersist spread(0),
      intrabarpersist spacing(-1), 
      intrabarpersist plotsize(0),
      OneTick(MinMove/PriceScale),
      loop(maxbarsforward),
      k(0);

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

If LastBarOnChart_s then begin
        
    Spread = (insideAsk - insideBid)/(OneTick);

    if Value1 > 0 THEN BEGIN
        Text_SetString(Value1,"" + Numtostr(Spread,1));
        Text_SetLocation_s(Value1, Date, Calctime_s(time_s,2.5), Low - 2*(OneTick));
    end;  
    
    for k = 0 to loop begin
          Plot1[-k](insideBid, "Bid");
          Plot2[-k](insideAsk, "Ask");
    end;
    noplot(1);
    noplot(2);
    
end;
noplot(3);
Regards,
ABCTG

Hello @ABCTG,

Thank you so much for posting this code. TS seems to be having an issue with "_s" wherever that appears. I have deleted it, but since it's the weekend I can't tell if it works or not. If you have any input here, would greatly appreciate it.

Cheers,
Lee

Reply With Quote




Last Updated on September 19, 2020


© 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