Can't get trendlines to plot - futures io
futures io futures trading

Can't get trendlines to plot

Discussion in EasyLanguage Programming

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

Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
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

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

Search this Thread

Can't get trendlines to plot

(login for full post details)
  #1 (permalink)
Dallas, TX
Posts: 7 since Jul 2012
Thanks: 1 given, 0 received

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.

Input: 	TextOffset(.25),

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;
		PivotH = Close[1]; //Set Last Pivot High Price
		PHBarNumber = BarNumber[1];		 	
	//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);
	Else Begin 
		If PivotH = PivotH[1] Then 
			Value4 = TL_SetEnd(Value3, Date, Time, PivotH);
	//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);
		Else Begin If Top = Top Then 
			Value7 = TL_SetEnd(Value5, Date, Time, Top);

Reply With Quote

Can you help answer these questions
from other members on futures io?
Second Entry Indicator (Looking for testers/feedback)
What blockvolume is visible? - order processing
ZigZag with Depth and Backstep
EasyLanguage Programming
COTbase for quant trading?
Elite Algorithmic NinjaTrader Trading
Automatic pattern research with NT
Elite Algorithmic NinjaTrader Trading
Best Threads (Most Thanked)
in the last 7 days on futures io
Selling Options on Futures?
109 thanks
Battlestations: Show us your trading desks!
108 thanks
Rank your Futures vs Stocks trading priority
55 thanks
Want your NinjaTrader indicator created, free?
27 thanks
Whats this confusion with margins?
21 thanks

futures io Trading Community Platforms and Indicators EasyLanguage Programming > Can't get trendlines to plot

Last Updated on August 19, 2012

Upcoming Webinars and Events

NinjaTrader Indicator Challenge!


Battlestations! Show us your trading desk - $1,500 in prizes!


Importance of Finding Your Own Way w/Adam Grimes

Elite only

Journal Challenge w/Jigsaw


Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432,
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