NexusFi: Find Your Edge


Home Menu

 





bid&Ask on Chart for current bar only


Discussion in EasyLanguage Programming

Updated
    1. trending_up 2,051 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 3 posts
    2. attach_file 0 attachments




 
Search this Thread

bid&Ask on Chart for current bar only

  #1 (permalink)
 aczk 
London, UK
 
Experience: Intermediate
Platform: MultiCharts
Trading: equities, futures
Posts: 36 since Jan 2012
Thanks Given: 3
Thanks Received: 2

hi
I am trying to create marking of the bid & ask price on the chart, works, see my code:
 
Code
variables:	var0( 0 ),var1( 0 ) ;
Input:	offset(3);	
if GetAppInfo( aiRealTimeCalc ) = 1 then                                           
	begin
	var0 = InsideBid ;
	var1 = InsideAsk ;
	
	Plot1[-offset]( var0, "Bid");
	Plot2[-offset]( var1, "Ask");
	end ;
...this displays two dots in front of the bar showing the bid&ask, but....

I only want to show those for the current bar and get rid of the past ones on the chart in order not to leave a useless trail of bid&ask markets behind

help anyone thx!!!

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
ZombieSqueeze
Platforms and Indicators
Cheap historycal L1 data for stocks
Stocks and ETFs
How to apply profiles
Traders Hideout
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Quant vue
Trading Reviews and Vendors
 
  #3 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629


aczk,

here is a quick and dirty solution that does the trick by removing the old plots.

Regards,
ABCTG

 
Code
variables:	var0( 0 ),var1( 0 ) ;
Input:	offset(3);	
if GetAppInfo( aiRealTimeCalc ) = 1 then                                           
	begin
	var0 = InsideBid ;
	var1 = InsideAsk ;
	
	NoPlot[-offset+1](1);
	NoPlot[-offset+1](2);	
	
	Plot1[-offset]( var0, "Bid");
	Plot2[-offset]( var1, "Ask");
	end ;

Follow me on Twitter Reply With Quote
  #4 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

Instead of continuously removing the plot from the previous bar you could also simply remove the plots for the current bar when this bar is closed:

 
Code
variables:	var0( 0 ),var1( 0 ) ;
Input:	offset(3);	
if GetAppInfo( aiRealTimeCalc ) = 1 then                                           
	begin
	var0 = InsideBid ;
	var1 = InsideAsk ;
			
	Plot1[-offset]( var0, "Bid");
	Plot2[-offset]( var1, "Ask");
	
	if BarStatus(1) = 2 then
	begin
		NoPlot[-offset](1);
		NoPlot[-offset](2);
	end;
end ;
Regards,
ABCTG

Follow me on Twitter Reply With Quote




Last Updated on February 24, 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