Can't get trendlines to plot - EasyLanguage Programming | futures io social day trading
futures io futures trading


Can't get trendlines to plot
Updated: Views / Replies:1,529 / 1
Created: by PippiLong Attachments:0

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
 
Thread Tools Search this Thread
 

Can't get trendlines to plot

  #1 (permalink)
Trading Apprentice
Dallas, TX
 
Futures Experience: Intermediate
Platform: Tradestation
Favorite Futures: Futures
 
Posts: 7 since Jul 2012
Thanks: 1 given, 0 received

Can't get trendlines to plot

This was written for a Renko chart. I don't think will work on other types of charts. Any help you can give would be greatly appreciated.

Try as I might I can't figure out why my trendlines won't plot. I think it is something really obvious but ....

In the code below if I add the second trendline plot statement block or anything below the first one entitled

//Draw Trendlines for Pivot Highs

Then none plot. If you comment out Everything below this plot area this trendline plots fine. Also if you change the IF statement in the plot area below entitled

//Draw trendlines for Tops


from if TOP<>Top to 1 > 0 then both the trendline plot above but the second one plots a new trendline for every new bar. I was trying just to have one new trendline plotted each time the pivoth or top value changed but keep extending to the right until a new value is created.

Maybe there is a better way also.




 
Code
Input: 	TextOffset(.25),
		UpLVol(1000),
		DnLVol(1000);

vars: X(0), PivotL(0), PivotH(0), HHigh(0), LLow(0), Top(0), Bottom(0), 
	  PHBarNumber(0), FirstLHBarNumber (0), PLBarNumber(0), DrawCreek(0), DrawIce(0), HHPBarNumber(0),HLPBarNUmber(0), TXT_UT(""),
	  JOC(0), JOCValue(0), FTI(0), FTIValue(0), Spring(0), UpThrust(0), SpringPrice(0), UpThrustPrice(0);


//UpTrends and Tops

If C<C[1] and Upticks[1] > 0 Then Begin //Is a Pivot High
	
	If C[1] > PivotH Then // Higher High Pivot
		HHigh = 1;
	 	DrawIce = 0;
	 	DrawCreek = 0;
	 	HHPBarNumber = BarNumber;
	 
	
	If C[1] = PivotH and HHigh[1] = 1 Then //This is Double Top in an Uptrend Draw Ice at prior pivot high's low
	 	HHigh = 1;
	 	DrawIce = 0;
	 	HHPBarNumber = BarNumber[3]; 
	 	
	 If C[1] = PivotH and HHigh[1] = 0 Then //This is Double Top in a DownTrend
	 	HHigh = 0;
	 	DrawIce = 0;
	 	HHPBarNumber = BarNumber[3];
	 	 
	If C[1] < PivotH And HHigh[1] = 1 Then Begin   //Top - Is Lower than previous pivot high & Last Pivot High was higher than previous pivot high/First LL
		    
			HHigh = 0;
			Top = PivotH[1];  // This is uptrend top 
			PHBarNumber = PHBarNumber[1];
			DrawIce = 1;
			FTI = 1;
			FTIValue = PivotL;
			
			
			//Text For First LH
				 				 
				 Value1 = Text_New(Date[1], Time[1], High[1] + Range * Textoffset , "1stLH");
				 Text_SetColor(Value1, Black);
				 Text_setstyle(Value1, 2, 1); 
				 
			//Text For On The Spring Board Dn 
				If Upthrust = 1 Then Begin 
					Value2 = Text_New(Date[1], Time[1], High[1] + Range * Textoffset , "On SpringBoard");
				 	Text_SetColor(Value2, Black);
				 	Text_setstyle(Value2, 2, 0);
				 	UPthrust = 0;
				 End;	 
				 
	  End;	
		
		PivotH = Close[1]; //Set Last Pivot High Price
		PHBarNumber = BarNumber[1];		 	
End;
		
	//Draw Trendlne for pivot Highs 
	
	If PivotH <> PivotH[1] Then Begin
			Value3 = TL_New(Date[1], Time[1], PivotH, Date, Time, PivotH);
				Tl_setcolor(Value3, Blue);
				Tl_Setstyle(Value3, Tool_Dotted);
				//Tl_setsize(Value3, 1);
	End
	Else Begin 
		If PivotH = PivotH[1] Then 
			Value4 = TL_SetEnd(Value3, Date, Time, PivotH);
	End;
			
	
	//Draw Trendline For Tops 
	
	If top <> Top[1]  Then Begin 
		Value5 = TL_New(Date[1], Time[1], Top, Date, Time, Top);
		Value6 = Tl_setbegin(Value5, Date[BarNumber[1] - PHBarNumber[1] +1], Time[BarNumber[1] - PHBarNumber[1] +1], Top);
			Tl_setcolor(Value5, DarkGreen);
			Tl_setsize(Value5, 1);
	End
		Else Begin If Top = Top Then 
			Value7 = TL_SetEnd(Value5, Date, Time, Top);
	End;

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.


Reply



futures io > > > > > Can't get trendlines to plot

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
Trading Fractals, Multiple Trendlines and Momentum tdaman NinjaTrader 15 February 15th, 2014 11:03 PM
Trendlines not matching from Higher Timeframe to lower Timeframe? bluemele NinjaTrader 26 October 8th, 2012 03:35 PM
Strength Of Trendlines pipsaholic Currency Futures 8 December 28th, 2011 12:45 PM
Duplicating NT7 charts while retaining trendlines and notes? crimmins NinjaTrader 6 January 7th, 2011 12:34 PM
Could you help me with this plot??? andaluz NinjaTrader Programming 2 May 30th, 2010 08:54 PM


All times are GMT -4. The time now is 11:17 AM.

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-13 in 0.07 seconds with 19 queries on phoenix via your IP 54.227.51.103