Plots fine on time charts but not on non-time based charts - EasyLanguage Programming | futures io social day trading
futures io futures trading


Plots fine on time charts but not on non-time based charts
Updated: Views / Replies:1,129 / 10
Created: by olobay Attachments:4

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 4  
 
Thread Tools Search this Thread
 

Plots fine on time charts but not on non-time based charts

  #1 (permalink)
Elite Member
Montreal
 
Futures Experience: Intermediate
Platform: MultiCharts
Broker/Data: IB Canada/IQFeed
Favorite Futures: TF, CL
 
Posts: 261 since Jul 2011
Thanks: 288 given, 332 received

Plots fine on time charts but not on non-time based charts

Hi,

The following code plots fine on time based charts but not on non-time based charts like tick, range, volume, etc. The problem is that every time a new bar is formed, the lines do not continue to plot on any of the newly formed bars. On a minute chart, it plots fine. The only way I get it to update on non-time based charts is to turn the indicator off and then back on. Does anybody have any idea? I am using MultiCharts v9.0.

Thanks.

 
Code
Inputs:
	StartCalcTime		(0900),
	EndCalcTime		(0905),
	TLStartTime		(0900),
	TLEndTime		 (1430),
	yHigh			(101.00), 
	yLow			(100.00), 
	yClose			(100.50),
	A_Val			(.08),
	C_Val			(.13),
	PlaceTextRight	(true),
	Plot_All_Days		(False),
	HistoryCutoff		(1),
	IgnoreWeekends	(true),
	OR_Color		(white), 
	OR_Style		(2),  
	OR_LineSize		(0),
	A_Color		(Red), 
	A_Style		(2),  
	A_LineSize		(0),
	C_Color		(Cyan), 
	C_Style		(3),  
	C_LineSize		(1),
	PP_Color		(yellow), 
	PP_Style		(2),  
	PP_LineSize		(1),
	yHighLow_Color	(darkgray),
	yHighLow_Style	(3),
	yHighLow_LineSize	(2),
	yClose_Color		(darkred),
	yCLose_Style		(3),
	yClose_LineSize	(2),
	Font_Name		("Arial"),
	Font_Size		(9);
		
Variables:
	Monday2Friday		(false),
	A_Up			(0),
	C_Up			(0),
	A_Down			(0),
	C_Down			(0),
	PP			(0),
	PV			(0), 
	PVR			(0),
	ORHighTL		(0),
	ORLowTL		(0),
	A_UPTL 		(0),
	C_UPTL			(0),
	A_DownTL		(0),
	C_DownTL 		(0),
	PPTL			(0),
	PVRHighTL		(0),
	PVRLowTL		(0),
	yHighTL		(0),
	yLowTL			(0),
	yCloseTL		(0),
	DayHi			(-999999),
	DayLo			(+999999),
	HaveTLs		(false),
	HaveLevels		(false),
	StartTime		(0),
	EndTime		(0),
	ORHighTxt		(0),
	ORLowTxt		(0),	
	A_UPTxt		(0),
	C_UpTxt		(0),
	A_DownTxt		(0),
	C_DownTxt		(0),
	PPTxt			(0),
	PVRHighTxt		(0),
	PVRLowTxt		(0),
	YHighTxt		(0),
	YLowTxt		(0),
	YCloseTxt		(0),
	SessClose		(0);
			
	If (Plot_All_Days OR D >= Currentdate - HistoryCutoff) then
		begin

	If IgnoreWeekends then begin
		If DayOfWeek(Date) >= Monday and DayOfWeek(Date) <= Friday then 
			Monday2Friday = true
		else 
			Monday2Friday = false;
	
	end
	else begin
		Monday2Friday = true;
	end;
			
	If Monday2Friday then begin
	
		If Date <> Date[1] then
			HaveLevels = false;
			HaveTLs = false;
	
		end; //If Date <> Date[1] then begin...	
	
		If Time > StartCalcTime and Time <= EndCalcTime then begin
			If High >= DayHi then DayHi = High;
			If Low <= DayLo then DayLo = Low;
		end;//If Time > StartCalcTime and Time <= EndCalcTime then begin...
		
		if Time > EndCalcTime and HaveLevels = false then
		begin 
			HaveLevels = true;
	
		If HaveTLs = false then begin
			HaveTLs = true;
					
			A_UP = DayHi + A_Val;
			C_UP = DayHi + C_Val;
			A_Down = DayLo - A_Val;
			C_Down = DayLo - C_Val;
			PP = (yHigh + yLow + yClose ) /3;
			PV = (yHigh + yLow) /2;
			PVR = (PP - PV); //Pivot Range Value
			
			ORHighTL = TL_New(Date, TLStartTime, DayHi, Date, TLEndTime, DayHi);
				TL_SetColor(ORHighTL, OR_Color);
				TL_SetSize(ORHighTL, OR_LineSize);	
				TL_SetStyle(ORHighTL, OR_Style);
				
			ORLowTL = TL_New(Date, TLStartTime, DayLo, Date, TLEndTime, DayLo);
				TL_SetColor(ORLowTL, OR_Color);
				TL_SetSize(ORLowTL, OR_LineSize);	
				TL_SetStyle(ORLowTL, OR_Style);
			
			A_UpTL = TL_New(Date, TLStartTime, A_UP, Date, TLEndTime, A_UP);
				TL_SetColor(A_UPTL, A_Color);
				TL_SetSize(A_UPTL, A_LineSize);	
				TL_SetStyle(A_UPTL, A_Style);			
			
			C_UPTL = TL_New(Date, TLStartTime, C_UP, Date, TLEndTime, C_UP);
				TL_SetColor(C_UPTL, C_Color);
				TL_SetSize(C_UPTL, C_LineSize);	
				TL_SetStyle(C_UPTL, C_Style);
						
			A_DownTL = TL_New(Date, TlStartTime, A_Down, Date, TLEndTime, A_Down);
				TL_SetColor(A_DownTL, A_Color);
				TL_SetSize(A_DownTL, A_LineSize);	
				TL_SetStyle(A_DownTL, A_Style);
				
			C_DownTL = TL_New(Date, TLStartTime, C_Down, Date, TLEndTime, C_Down);
				TL_SetColor(C_DownTL, C_Color);
				TL_SetSize(C_DownTL, C_LineSize);	
				TL_SetStyle(C_DownTL, C_Style);
				
			PPTL = TL_New(Date, TLStartTime, PP, Date, TLEndTime, PP);
				TL_SetColor(PPTL, PP_Color);
				TL_SetSize(PPTL, PP_LineSize);	
				TL_SetStyle(PPTL, PP_Style);
				
			PVRHighTL = TL_New(Date, TLStartTime, PP + PVR, Date, TLEndTime, PP + PVR);
				TL_SetColor(PVRHighTL, PP_Color);
				TL_SetSize(PVRHighTL, PP_LineSize);	
				TL_SetStyle(PVRHighTL, PP_Style);
									
			PVRLowTL = TL_New(Date, TLStartTime, PP - PVR, Date, TLEndTime, PP - PVR);
				TL_SetColor(PVRLowTL, PP_Color);
				TL_SetSize(PVRLowTL, PP_LineSize);	
				TL_SetStyle(PVRLowTL, PP_Style);
				
			yHighTL = TL_New(Date, TLStartTime, yHigh, Date, TLEndTime, yHigh);
				TL_SetColor(yHighTL, yHighLow_Color);
				TL_SetSize(yHighTL, yHighLow_LineSize);	
				TL_SetStyle(yHighTL, yHighLow_Style);
				
			yLowTL = TL_New(Date, TLStartTime, yLow, Date, TLEndTime, yLow);
				TL_SetColor(yLowTL, yHighLow_Color);
				TL_SetSize(yLowTL, yHighLow_LineSize);	
				TL_SetStyle(yLowTL, yHighLow_Style);
				
			yCloseTL = TL_New(Date, TLStartTime, yClose, Date, TLEndTime, yClose);
				TL_SetColor(yCloseTL, yClose_Color);
				TL_SetSize(yCloseTL, yClose_LineSize);	
				TL_SetStyle(yCloseTL, yClose_Style);						
															
			ORHighTxt = Text_New(Date, TLStartTime, DayHi, "OR High");
				Text_SetStyle(ORHighTxt, 1, 1);
				Text_SetColor(ORHighTxt, OR_Color);
				Text_SetFontName(ORHighTxt, Font_Name); 
				Text_SetSize(ORHighTxt, Font_Size);
	
			ORLowTxt = Text_New(Date, TLStartTime, DayLo, "OR Low");
				Text_SetStyle(ORLowTxt, 1, 1);	
				Text_SetColor(ORLowTxt, OR_Color);
				Text_SetFontName(ORLowTxt, Font_Name); 
				Text_SetSize(ORLowTxt, Font_Size);
			
			A_UPTxt = Text_New(Date, TLStartTime, A_UP, "A Up");
				Text_SetStyle(A_UPTxt, 1, 1);
				Text_SetColor(A_UPTxt, A_Color);
				Text_SetFontName(A_UPTxt, Font_Name); 
				Text_SetSize(A_UPTxt, Font_Size);
						
			C_UpTxt = Text_New(Date, TLStartTime, C_Up, "C Up");
				Text_SetStyle(C_UpTxt, 1, 1);	
				Text_SetColor(C_UpTxt, C_Color);
				Text_SetFontName(C_UPTxt, Font_Name); 
				Text_SetSize(C_UPTxt, Font_Size);
				
			A_DownTxt = Text_New(Date, TLStartTime, A_Down, "A Down");
				Text_SetStyle(A_DownTxt, 1, 1);	
				Text_SetColor(A_DownTxt, A_Color);
				Text_SetFontName(A_DownTxt, Font_Name); 
				Text_SetSize(A_DownTxt, Font_Size);
				
			C_DownTxt = Text_New(Date, TLStartTime, C_Down, "C Down");
				Text_SetStyle(C_DownTxt, 1, 1);	
				Text_SetColor(C_DownTxt, C_Color);
				Text_SetFontName(C_DownTxt, Font_Name); 
				Text_SetSize(C_DownTxt, Font_Size);
				
			PPTxt = Text_New(Date, TLStartTime, PP, "PP");
				Text_SetStyle(PPTxt, 1, 1);	
				Text_SetColor(PPTxt, PP_Color);
				Text_SetFontName(PPTxt, Font_Name); 
				Text_SetSize(PPTxt, Font_Size);
				
			PVRHighTxt = Text_New(Date, TLStartTime, PP + PVR, "PR High");
				Text_SetStyle(PVRHighTxt, 1, 1);	
				Text_SetColor(PVRHighTxt, PP_Color);
				Text_SetFontName(PVRHighTxt, Font_Name); 
				Text_SetSize(PVRHighTxt, Font_Size);
				
			PVRLowTxt = Text_New(Date, TLStartTime, PP - PVR, "PR Low");
				Text_SetStyle(PVRLowTxt, 1, 1);	
				Text_SetColor(PVRLowTxt, PP_Color);
				Text_SetFontName(PVRLowTxt, Font_Name); 
				Text_SetSize(PVRLowTxt, Font_Size);
				
			yHighTxt = Text_New(Date, TLStartTime, yHigh, "Y High");
				Text_SetStyle(YHighTxt, 1, 1);	
				Text_SetColor(YHighTxt, yHighLow_Color);
				Text_SetFontName(YHighTxt, Font_Name); 
				Text_SetSize(YHighTxt, Font_Size);
				
			yLowTxt = Text_New(Date, TLStartTime, yLow, "Y Low");
				Text_SetStyle(YLowTxt, 1, 1);	
				Text_SetColor(YLowTxt, yHighLow_Color);
				Text_SetFontName(YLowTxt, Font_Name); 
				Text_SetSize(YLowTxt, Font_Size);
				
			yCloseTxt = Text_New(Date, TLStartTime, yClose, "Y Close");
				Text_SetStyle(YCloseTxt, 1, 1);	
				Text_SetColor(YCloseTxt, yClose_Color);
				Text_SetFontName(YCloseTxt, Font_Name); 
				Text_SetSize(YCloseTxt, Font_Size);
				
			If PlaceTextRight then begin
				Text_SetLocation(ORHighTxt, Date, TLEndTime, DayHi);
				Text_SetLocation(ORLowTxt, Date, TLEndTime, DayLo);
				Text_SetLocation(A_UPTxt, Date, TLEndTime, A_Up);
				Text_SetLocation(C_UPTxt, Date, TLEndTime, C_Up);
				Text_SetLocation(A_DownTxt, Date, TLEndTime, A_Down);
				Text_SetLocation(C_DownTxt , Date, TLEndTime, C_Down);
				Text_SetLocation(PPTxt, Date, TLEndTime, PP);
				Text_SetLocation(PVRHighTxt, Date, TLEndTime, PP + PVR);
				Text_SetLocation(PVRLowTxt, Date, TLEndTime, PP - PVR);
				Text_SetLocation(yHighTxt, Date, TLEndTime, yHigh);
				Text_SetLocation(yLowTxt, Date, TLEndTime, yLow);
				Text_SetLocation(yCloseTxt, Date, TLEndTime, yClose);
			
			end; //If PlaceTextRight then begin...
															
		end; //If HaveTLs = false then begin...
	
	end; //If Monday2Friday then begin...

	If (Time > TLEndTime and Time[1] <= TLEndTime) then begin
		DayHi = -999999;
		DayLo = 999999;
	end; //If (Time > TLEndTime and Time[1] <= TLEndTime) then begin
	end; //If (Today_Only OR D >= Currentdate - HistoryCutoff) then begin

Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,533 since Apr 2013
Thanks: 231 given, 855 received
Forum Reputation: Legendary


olobay,

I tried it on a 1 min @ES# chart in MC9 and it didn't plot anything here, 5 days back and using your default settings.
There also seems something off in the code, if you look at the image, the date reset only affects the HaveLevels flag, which is not even used in the code. That makes the second market part obsolete in my opinion.
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Regards,
ABCTG

Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #4 (permalink)
Elite Member
Montreal
 
Futures Experience: Intermediate
Platform: MultiCharts
Broker/Data: IB Canada/IQFeed
Favorite Futures: TF, CL
 
Posts: 261 since Jul 2011
Thanks: 288 given, 332 received


ABCTG View Post
olobay,

I tried it on a 1 min @ES# chart in MC9 and it didn't plot anything here, 5 days back and using your default settings.
There also seems something off in the code, if you look at the image, the date reset only affects the HaveLevels flag, which is not even used in the code. That makes the second market part obsolete in my opinion.
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Regards,
ABCTG

For some reason on the weekend, the only way to get it to plot is to change the Plot All Days to True. But the code works fine when trading starts except that it doesn't update on non-time based charts.

Reply With Quote
 
  #5 (permalink)
Elite Member
Montreal
 
Futures Experience: Intermediate
Platform: MultiCharts
Broker/Data: IB Canada/IQFeed
Favorite Futures: TF, CL
 
Posts: 261 since Jul 2011
Thanks: 288 given, 332 received

@ABCTG,

Even your 24hrPivots indicator doesn't update the lines on new bars on tick charts. The chart below shows what I mean. You might think it's a case of the EndCalcTime but my issue has no bearing on it. It could be set to any time and it doesn't update on new bars for tick charts. Can you reproduce this issue on your end?

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


Last edited by olobay; December 12th, 2014 at 04:15 PM. Reason: clarify
Reply With Quote
 
  #6 (permalink)
Elite Member
Montreal
 
Futures Experience: Intermediate
Platform: MultiCharts
Broker/Data: IB Canada/IQFeed
Favorite Futures: TF, CL
 
Posts: 261 since Jul 2011
Thanks: 288 given, 332 received

This is the ES. Indicator is set to update every tick. 2000 tick chart.

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Reply With Quote
 
  #7 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,533 since Apr 2013
Thanks: 231 given, 855 received
Forum Reputation: Legendary

olobay,

what settings are you using? It looks different on my end with the default settings.

Regards,
ABCTG


olobay View Post
This is the ES. Indicator is set to update every tick. 2000 tick chart.

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #8 (permalink)
Elite Member
Montreal
 
Futures Experience: Intermediate
Platform: MultiCharts
Broker/Data: IB Canada/IQFeed
Favorite Futures: TF, CL
 
Posts: 261 since Jul 2011
Thanks: 288 given, 332 received

The PlotToDateEnd does not make a difference for me whether it's true or false.

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Reply With Quote
 
  #9 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,533 since Apr 2013
Thanks: 231 given, 855 received
Forum Reputation: Legendary

olobay,

thanks, I have been able to reproduce it and I have started to create a new version that addresses those issues and allows for more flexibility with the time settings for example. However it upsets me that studies I give out for free are taken and sold by others - which on the one hand is a compliment of sorts, but the upsetting part is that someone pays for something intended to be free.
The work around would be to only post the closed code, which also has it's cons and I haven't decided on the best approach, yet.

Regards,
ABCTG


olobay View Post
The PlotToDateEnd does not make a difference for me whether it's true or false.

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #10 (permalink)
Elite Member
Montreal
 
Futures Experience: Intermediate
Platform: MultiCharts
Broker/Data: IB Canada/IQFeed
Favorite Futures: TF, CL
 
Posts: 261 since Jul 2011
Thanks: 288 given, 332 received



ABCTG View Post
olobay,

thanks, I have been able to reproduce it and I have started to create a new version that addresses those issues and allows for more flexibility with the time settings for example. However it upsets me that studies I give out for free are taken and sold by others - which on the one hand is a compliment of sorts, but the upsetting part is that someone pays for something intended to be free.
The work around would be to only post the closed code, which also has it's cons and I haven't decided on the best approach, yet.

Regards,
ABCTG

Anything new on making the indicator work on non time based charts?

Reply With Quote

Reply



futures io > > > > > Plots fine on time charts but not on non-time based charts

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Why Tick Charts instead of Time Based Charts? or other chart types Fadi Traders Hideout 53 October 12th, 2017 11:18 AM
Info on time based P&F charts aquarian1 Emini Index Futures Trading 25 September 8th, 2014 07:50 PM
Converting time based charts to volume and tick based charts SeanKozak Commodities Futures Trading 1 April 1st, 2014 10:05 PM
Tick Charts vs Range Charts vs Time Charts sketchbo Traders Hideout 3 March 25th, 2014 10:26 AM
Indicator plotting time in the volume based charts or volume delta charts. Czechmade Traders Hideout 5 November 8th, 2012 11:53 PM


All times are GMT -4. The time now is 11:35 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-12-17 in 0.14 seconds with 20 queries on phoenix via your IP 54.221.73.186