Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

  • Welcome Guests

    Welcome. You are currently viewing the forum as a guest which does not give you access to all the great features at Traders Laboratory such as interacting with members, access to all forums, downloading attachments, and eligibility to win free giveaways. Registration is fast, simple and absolutely free. Create a FREE Traders Laboratory account here.

Tams

Trendline (EasyLanguage)

Recommended Posts

Thats odd AAA the code you posted should run once a day! It should not slow things down.

 

It's OK over 1 mn chart (5, 15 etc...)

 

Could you try on a 1 mn chart, wait 1 hour and resize the graph multiple times and let me know if it' OK ?

 

Multicharts rasterisation had always been snotbag slow,

 

I'm new with MC and it's true that resizing is not as fluent as other softwares

 

I use 2 screens 1920 x 1200 and I thought it was hard for GPU to manage all pixels

 

The best is that nevere ever I crashed MC eventho it turns 10 hours a day

Share this post


Link to post
Share on other sites

I've just status on the indicator

 

resizing 3 times with the mouse on the price scale and moved down 4 times with the pad

 

and now the screen is frozen during 10 seconds each time I move up or down

 

Now status off

 

And it's OK with a "normal" 1-2 seconds delay resizing

Share this post


Link to post
Share on other sites

I think that I've found

 

I recompile the indicator and now it's OK

 

May be the last compilation crashed ?

 

Anyway, thank you for your patience

Share this post


Link to post
Share on other sites

For those interested with problems with MC

 

(If I'm out of subject, please send me a private message and I will ask to the moderator to erase them)

 

I've made a 2 weeks ghost and now MC is quicker to redraw rasters/screen

 

As a detective I'm wondering if these upgrades programms since my ghost was guilty

 

IE8

Office2007 SP2

ATI driver

 

IE8 was in conflit with a soft

Office SP2 crashed badly and I had to reinstall from the CD

ATI drives the rasters...

 

Yesterday I had 280 Mo free space left on my C: with a 1 Mo pagefile

 

After "ghosting" I had 2.2 Go free space

 

What happened with the 1,92 Go ?

 

 

I am ghosting, (with a diary of EVERY changed done) since 8 years and it's a nice way to keep a computer safe and resolve problems.

 

I hope that I've helped with this message

Share this post


Link to post
Share on other sites

How to change the width of a trendline

 

 

TL_SetSize

 

Assigns the specified width to a trendline with the specified ID number;

returns a value of 0 if the line width was successfully assigned,

and a value of -2 if the specified trendline ID number is invalid.

 

 

Usage

 

TL_SetSize( TL_ID, LineWidth )

 

Where:

TL_ID - a numerical expression specifying the trendline ID number

LineWidth - a numerical expression specifying the trendline width;

trendline width can range from 0 to 6

 

 

Note

 

A trendline-specific ID number is returned by TL_New when the trendline is created.

 

 

Example

 

Assign the width of 5 to the trendline with an ID number of 3:

 

Value1 = TL_SetSize( 3, 5 );

Share this post


Link to post
Share on other sites

This example is from the Trendline Automatic indicator.

 

I have added user configurable trendline width.

The added code is highlighted by: {<--- added line}

 

Enjoy!

 

 

 

{ 
This indicator:
(1) INSERTS DnTL's/UpTL's connecting each new SwingHi/SwingLo with the next most 
   recent higher/lower SwingHi/SwingLo within the last 10 SwingHi's/SwingLo's; 
(2) EXTENDS each new TL to the right and SETS it's color and alert type; 
(3) TRUNCATES a DnTL/UpTL on the right when the next new DnTL/UpTL is drawn (if the 
   History input is set to "Yes"), or BarsPast bars after it has been breached, 
   whichever comes first.
(4) DELETES a DnTL/UpTL when the next new DnTL/UpTL is drawn, if the History input 
   is set to "No".

NOTE: This indicator may not work well with low-count tick bars, such as 10-tick bars, 
etc., because the time resolution of the bars may not be high enough for each bar to 
have a distinct time stamp.
}

inputs: 
SwHiStrength( 4 ), 
SwLoStrength( 4 ), 
BarsPast( 10 ), 
History( "Yes" ), 
DnTLColor( Red ), 
UpTLColor( Cyan ), 
AlertType( "IntraBar" ) ,

width(1); {<--- added line}

variables: 
DnTLRef( -1 ), 
DnTLEndBar( 0 ), 
DnTLBreak( false ), 
DnTLColorNum( DnTLColor ), 

UpTLRef( -1 ), 
UpTLEndBar( 0 ), 
UpTLBreak( false ), 
UpTLColorNum( UpTLColor ), 

Index( 0 ), 
BarNum( 0 ), 
HistoryTF( false ), 
AlertTypeCAPS( UpperStr( AlertType ) ) ;

arrays: 
SwHiDate[10]( 0 ), 
SwHiTime[10]( 0 ), 
SwHiVal[10]( -1000000 ), 
SwLoDate[10]( 0 ), 
SwLoTime[10]( 0 ), 
SwLoVal[10]( 1000000 ) ;

if CurrentBar = 1 then 
HistoryTF = UpperStr( History ) = "YES" or UpperStr( History ) = "Y" ;
{ should also be able to do this via declaration above }

BarNum = BarNumber ;

if SwingHighBar( 1, High, SwHiStrength, SwHiStrength + 1 ) = SwHiStrength then 
{ ie, if just confirmed SwHi }
begin

{ push arrays back }
for Value1 = 9 downto 0 
	begin
	SwHiDate[ Value1 + 1 ] = SwHiDate[Value1] ;
	SwHiTime[ Value1 + 1 ] = SwHiTime[Value1] ;
	SwHiVal[ Value1 + 1 ] = SwHiVal[Value1] ;
	end ;

{ read in parameters of new SwHi into 0-elements of arrays }
SwHiDate[0] = Date[swHiStrength] ;
SwHiTime[0] = Time[swHiStrength] ;
SwHiVal[0] = High[swHiStrength] ;

{ find and save the index of the next-most-recent higher SwHi if it exists }
for Value2 = 1 to 10 
	begin
	if SwHiVal[Value2] > SwHiVal[0] then 
		begin
		Index = Value2 ;
		Value2 = 11 ; { short circuit the looping with 11 instead of 10; the 11
		 will become 12 in the final pass }
		end ;
	end ;

if Value2 = 12 then { ie, if next-most-recent higher SwHi exists }
	begin
	if DnTLRef >= 0 then  { ie, if previous DnTL exists }
		begin
		if HistoryTF and DnTLBreak = false then 
			{ if history reqd and most recent DnTL not already truncated 
			  elsewhere, truncate it now }
			begin
			TL_SetEnd( DnTLRef, Date, Time, TL_GetValue( DnTLRef, Date, Time ) ) ;
			TL_SetExtRight( DnTLRef, false ) ;
			end
		else if HistoryTF = false then
			{ if history not reqd, delete most recent DnTL }
			TL_Delete( DnTLRef ) ;
		end ;
	{ draw new DnTL, reset break flag, save endbar, set extents/color/alert }
	DnTLRef = TL_New( SwHiDate[index], SwHiTime[index], SwHiVal[index], 
	 SwHiDate[0], SwHiTime[0], SwHiVal[0] ) ;

	TL_SetSize( DnTLRef, width ); {<--- added line}

	if DnTLBreak = true then 
		DnTLBreak = false ;
	DnTLEndBar = BarNum - SwHiStrength ;
	TL_SetExtLeft( DnTLRef, false ) ;
	TL_SetExtRight( DnTLRef, true ) ;
	if DnTLColorNum <> 99 then 
		TL_SetColor( DnTLRef, DnTLColorNum ) ;
	if AlertTypeCAPS = "ONCLOSE" then 
		TL_SetAlert( DnTLRef, 2 )
	else if AlertTypeCAPS = "INTRABAR" then 
		TL_SetAlert( DnTLRef, 1 )
	else
		TL_SetAlert( DnTLRef, 0 ) ;
	end ;
end ;

if SwingLowBar( 1, Low, SwLoStrength, SwLoStrength + 1 ) = SwLoStrength then 
{ ie, if just confirmed SwLo }
begin

{ push arrays back }
for Value1 = 9 downto 0 
	begin
	SwLoDate[Value1+1] = SwLoDate[Value1] ;
	SwLoTime[Value1+1] = SwLoTime[Value1] ;
	SwLoVal[Value1+1] = SwLoVal[Value1] ;
	end ;

{ read in parameters of new SwLo into 0-elements of arrays }
SwLoDate[0] = Date[swLoStrength] ;
SwLoTime[0] = Time[swLoStrength] ;
SwLoVal[0] = Low[swLoStrength] ;

{ find and save the index of the next-most-recent lower SwLo if it exists }
for Value2 = 1 to 10 
	begin
	if SwLoVal[Value2] < SwLoVal[0] then 
		begin
		Index = Value2 ;
		Value2 = 11 ;{ short circuit the looping with 11 instead of 10; the 11
		 will become 12 in the final pass }
		end ;
	end ;

if Value2 = 12 then  { ie, if next-most-recent lower SwLo exists }
	begin
	if UpTLRef >= 0 then { ie, if previous UpTL exists }
		begin
		if HistoryTF and UpTLBreak = false then 
			{ if history reqd and most recent UpTL not already truncated 
			  elsewhere, truncate it now }
			begin
			TL_SetEnd( UpTLRef, Date, Time, TL_GetValue( UpTLRef, Date, Time ) ) ;
			TL_SetExtRight( UpTLRef, false ) ;
			end
		else if HistoryTF = false then
			{ if history not reqd, delete most recent UpTL }
			TL_Delete( UpTLRef ) ;
		end ;
	{ draw new UpTL, reset break flag, save endbar, set extents/color/alert }
	UpTLRef = TL_New( SwLoDate[index], SwLoTime[index], SwLoVal[index], 
	 SwLoDate[0], SwLoTime[0], SwLoVal[0] ) ;

	TL_SetSize( UPTLRef, width ); {<--- added line}

	if UpTLBreak = true then
		UpTLBreak = false ;
	UpTLEndBar = BarNum - SwLoStrength ;
	TL_SetExtLeft( UpTLRef, false ) ;
	TL_SetExtRight( UpTLRef, true ) ;
	if UpTLColorNum <> 99 then 
		TL_SetColor( UpTLRef, UpTLColorNum ) ;
	if AlertTypeCAPS = "ONCLOSE" then 
		TL_SetAlert( UpTLRef, 2 )
	else if AlertTypeCAPS = "INTRABAR" then 
		TL_SetAlert( UpTLRef, 1 )
	else
		TL_SetAlert( UpTLRef, 0 ) ;
	end ;
end ;

{ if most recent DnTL/UpTL exists AND has not yet been truncated here AND was drawn 
 at least BarsPast ago AND was breached BarsPast bars ago THEN truncate it here and 
 set break flag }

if DnTLRef >= 0 
and DnTLBreak = false
and BarNum > DnTLEndBar + SwHiStrength + BarsPast 
and ( Close > TL_GetValue( DnTLRef, Date, Time ) )[barsPast]
then 
begin
TL_SetEnd( DnTLRef, Date, Time, TL_GetValue( DnTLRef, Date, Time ) ) ;
TL_SetExtRight( DnTLRef, false ) ;
DnTLBreak = true ;
end ;

if UpTLRef >= 0 
and UpTLBreak = false
and BarNum > UpTLEndBar + SwLoStrength + BarsPast 
and ( Close < TL_GetValue( UpTLRef, Date, Time ) )[barsPast]
then 
begin
TL_SetEnd( UpTLRef, Date, Time, TL_GetValue( UpTLRef, Date, Time ) ) ;
TL_SetExtRight( UpTLRef, false ) ;
UpTLBreak = true ;
end ;


{ ** Copyright (c) 1991-2003 TradeStation Technologies, Inc. All rights reserved. ** 
 ** TradeStation reserves the right to modify or overwrite this analysis technique 
    with each release. ** }

Share this post


Link to post
Share on other sites

Trend line related keywords

 

TL_SetAlert

 

TL_SetBegin

TL_SetEnd

 

TL_SetColor

 

TL_SetExtLeft

TL_SetExtRight

 

TL_SetSize

TL_SetStyle

 

 

.

Edited by Tams

Share this post


Link to post
Share on other sites

Hi all,

 

I am fairly new to the forum and I am appreciating all of the great solutions already posted here. I have spent quite a few hours working on a trendline study and I am at a place where I am stuck. Attached screenshot explains what I am attempting to do. I have placed horizontal trendlines on a chart based on the last 10 pivots (number of pivots is not relevant). Some of the pivots have been "taken out" by a higher high and are not relevant. I wish to retain and draw lines only on the relevant pivots.

 

What is the best way to accomplish this? I have tried - to write a formula comparing a new pivot to the previous 10, and adding a 2nd array that would store the relevant pivots. the 2nd method works OK, but requires the array to be cleared out each time a new value is added and I have no idea how to do that.

 

I appreciate any assistance on this and thanks in advance.

 

WT

5aa71030784dd_arraytrendlines.thumb.png.56aad3459c945b903db3c1edfddd973e.png

Share this post


Link to post
Share on other sites
didn't you ask this question before with another handle?

 

 

 

heh, not that i am aware of.

 

thanks for the tip. i will search more to see if that question has been asked before. my apologies if it has been duplicated.

Share this post


Link to post
Share on other sites
This example is from the Trendline Automatic indicator.

 

I have added user configurable trendline width.

The added code is highlighted by: {<--- added line}

 

Enjoy!

 

 

 

{ 
This indicator:
(1) INSERTS DnTL's/UpTL's connecting each new SwingHi/SwingLo with the next most 
   recent higher/lower SwingHi/SwingLo within the last 10 SwingHi's/SwingLo's; 
(2) EXTENDS each new TL to the right and SETS it's color and alert type; 
(3) TRUNCATES a DnTL/UpTL on the right when the next new DnTL/UpTL is drawn (if the 
   History input is set to "Yes"), or BarsPast bars after it has been breached, 
   whichever comes first.
(4) DELETES a DnTL/UpTL when the next new DnTL/UpTL is drawn, if the History input 
   is set to "No".

NOTE: This indicator may not work well with low-count tick bars, such as 10-tick bars, 
etc., because the time resolution of the bars may not be high enough for each bar to 
have a distinct time stamp.
}

inputs: 
SwHiStrength( 4 ), 
SwLoStrength( 4 ), 
BarsPast( 10 ), 
History( "Yes" ), 
DnTLColor( Red ), 
UpTLColor( Cyan ), 
AlertType( "IntraBar" ) ,

width(1); {<--- added line}

variables: 
DnTLRef( -1 ), 
DnTLEndBar( 0 ), 
DnTLBreak( false ), 
DnTLColorNum( DnTLColor ), 

UpTLRef( -1 ), 
UpTLEndBar( 0 ), 
UpTLBreak( false ), 
UpTLColorNum( UpTLColor ), 

Index( 0 ), 
BarNum( 0 ), 
HistoryTF( false ), 
AlertTypeCAPS( UpperStr( AlertType ) ) ;

arrays: 
SwHiDate[10]( 0 ), 
SwHiTime[10]( 0 ), 
SwHiVal[10]( -1000000 ), 
SwLoDate[10]( 0 ), 
SwLoTime[10]( 0 ), 
SwLoVal[10]( 1000000 ) ;

if CurrentBar = 1 then 
HistoryTF = UpperStr( History ) = "YES" or UpperStr( History ) = "Y" ;
{ should also be able to do this via declaration above }

BarNum = BarNumber ;

if SwingHighBar( 1, High, SwHiStrength, SwHiStrength + 1 ) = SwHiStrength then 
{ ie, if just confirmed SwHi }
begin

{ push arrays back }
for Value1 = 9 downto 0 
	begin
	SwHiDate[ Value1 + 1 ] = SwHiDate[Value1] ;
	SwHiTime[ Value1 + 1 ] = SwHiTime[Value1] ;
	SwHiVal[ Value1 + 1 ] = SwHiVal[Value1] ;
	end ;

{ read in parameters of new SwHi into 0-elements of arrays }
SwHiDate[0] = Date[swHiStrength] ;
SwHiTime[0] = Time[swHiStrength] ;
SwHiVal[0] = High[swHiStrength] ;

{ find and save the index of the next-most-recent higher SwHi if it exists }
for Value2 = 1 to 10 
	begin
	if SwHiVal[Value2] > SwHiVal[0] then 
		begin
		Index = Value2 ;
		Value2 = 11 ; { short circuit the looping with 11 instead of 10; the 11
		 will become 12 in the final pass }
		end ;
	end ;

if Value2 = 12 then { ie, if next-most-recent higher SwHi exists }
	begin
	if DnTLRef >= 0 then  { ie, if previous DnTL exists }
		begin
		if HistoryTF and DnTLBreak = false then 
			{ if history reqd and most recent DnTL not already truncated 
			  elsewhere, truncate it now }
			begin
			TL_SetEnd( DnTLRef, Date, Time, TL_GetValue( DnTLRef, Date, Time ) ) ;
			TL_SetExtRight( DnTLRef, false ) ;
			end
		else if HistoryTF = false then
			{ if history not reqd, delete most recent DnTL }
			TL_Delete( DnTLRef ) ;
		end ;
	{ draw new DnTL, reset break flag, save endbar, set extents/color/alert }
	DnTLRef = TL_New( SwHiDate[index], SwHiTime[index], SwHiVal[index], 
	 SwHiDate[0], SwHiTime[0], SwHiVal[0] ) ;

	TL_SetSize( DnTLRef, width ); {<--- added line}

	if DnTLBreak = true then 
		DnTLBreak = false ;
	DnTLEndBar = BarNum - SwHiStrength ;
	TL_SetExtLeft( DnTLRef, false ) ;
	TL_SetExtRight( DnTLRef, true ) ;
	if DnTLColorNum <> 99 then 
		TL_SetColor( DnTLRef, DnTLColorNum ) ;
	if AlertTypeCAPS = "ONCLOSE" then 
		TL_SetAlert( DnTLRef, 2 )
	else if AlertTypeCAPS = "INTRABAR" then 
		TL_SetAlert( DnTLRef, 1 )
	else
		TL_SetAlert( DnTLRef, 0 ) ;
	end ;
end ;

if SwingLowBar( 1, Low, SwLoStrength, SwLoStrength + 1 ) = SwLoStrength then 
{ ie, if just confirmed SwLo }
begin

{ push arrays back }
for Value1 = 9 downto 0 
	begin
	SwLoDate[Value1+1] = SwLoDate[Value1] ;
	SwLoTime[Value1+1] = SwLoTime[Value1] ;
	SwLoVal[Value1+1] = SwLoVal[Value1] ;
	end ;

{ read in parameters of new SwLo into 0-elements of arrays }
SwLoDate[0] = Date[swLoStrength] ;
SwLoTime[0] = Time[swLoStrength] ;
SwLoVal[0] = Low[swLoStrength] ;

{ find and save the index of the next-most-recent lower SwLo if it exists }
for Value2 = 1 to 10 
	begin
	if SwLoVal[Value2] < SwLoVal[0] then 
		begin
		Index = Value2 ;
		Value2 = 11 ;{ short circuit the looping with 11 instead of 10; the 11
		 will become 12 in the final pass }
		end ;
	end ;

if Value2 = 12 then  { ie, if next-most-recent lower SwLo exists }
	begin
	if UpTLRef >= 0 then { ie, if previous UpTL exists }
		begin
		if HistoryTF and UpTLBreak = false then 
			{ if history reqd and most recent UpTL not already truncated 
			  elsewhere, truncate it now }
			begin
			TL_SetEnd( UpTLRef, Date, Time, TL_GetValue( UpTLRef, Date, Time ) ) ;
			TL_SetExtRight( UpTLRef, false ) ;
			end
		else if HistoryTF = false then
			{ if history not reqd, delete most recent UpTL }
			TL_Delete( UpTLRef ) ;
		end ;
	{ draw new UpTL, reset break flag, save endbar, set extents/color/alert }
	UpTLRef = TL_New( SwLoDate[index], SwLoTime[index], SwLoVal[index], 
	 SwLoDate[0], SwLoTime[0], SwLoVal[0] ) ;

	TL_SetSize( UPTLRef, width ); {<--- added line}

	if UpTLBreak = true then
		UpTLBreak = false ;
	UpTLEndBar = BarNum - SwLoStrength ;
	TL_SetExtLeft( UpTLRef, false ) ;
	TL_SetExtRight( UpTLRef, true ) ;
	if UpTLColorNum <> 99 then 
		TL_SetColor( UpTLRef, UpTLColorNum ) ;
	if AlertTypeCAPS = "ONCLOSE" then 
		TL_SetAlert( UpTLRef, 2 )
	else if AlertTypeCAPS = "INTRABAR" then 
		TL_SetAlert( UpTLRef, 1 )
	else
		TL_SetAlert( UpTLRef, 0 ) ;
	end ;
end ;

{ if most recent DnTL/UpTL exists AND has not yet been truncated here AND was drawn 
 at least BarsPast ago AND was breached BarsPast bars ago THEN truncate it here and 
 set break flag }

if DnTLRef >= 0 
and DnTLBreak = false
and BarNum > DnTLEndBar + SwHiStrength + BarsPast 
and ( Close > TL_GetValue( DnTLRef, Date, Time ) )[barsPast]
then 
begin
TL_SetEnd( DnTLRef, Date, Time, TL_GetValue( DnTLRef, Date, Time ) ) ;
TL_SetExtRight( DnTLRef, false ) ;
DnTLBreak = true ;
end ;

if UpTLRef >= 0 
and UpTLBreak = false
and BarNum > UpTLEndBar + SwLoStrength + BarsPast 
and ( Close < TL_GetValue( UpTLRef, Date, Time ) )[barsPast]
then 
begin
TL_SetEnd( UpTLRef, Date, Time, TL_GetValue( UpTLRef, Date, Time ) ) ;
TL_SetExtRight( UpTLRef, false ) ;
UpTLBreak = true ;
end ;


{ ** Copyright (c) 1991-2003 TradeStation Technologies, Inc. All rights reserved. ** 
 ** TradeStation reserves the right to modify or overwrite this analysis technique 
    with each release. ** }

 

u are trying to sell something here

Share this post


Link to post
Share on other sites
...

What is the best way to accomplish this? I have tried - to write a formula comparing a new pivot to the previous 10, and adding a 2nd array that would store the relevant pivots. the 2nd method works OK, but requires the array to be cleared out each time a new value is added and I have no idea how to do that.

 

I appreciate any assistance on this and thanks in advance.

 

WT

 

this thread might help you on the array:

http://www.traderslaboratory.com/forums/f56/array-easylanguage-5785.html

 

 

14751d1257019257-array-easylanguage-2d_array.gif

 

14758d1257052126-array-easylanguage-array-address.jpg

Share this post


Link to post
Share on other sites
... the 2nd method works OK, but requires the array to be cleared out each time a new value is added and I have no idea how to do that.

...

 

try this idea:

 

// musical chair

if barstatus = 2 and condition1 = true then
begin
   arr[1,3] = arr[1,2];
   arr[1,2] = arr[1,1];
   arr[1,1] = variable1;
end;

Edited by Tams

Share this post


Link to post
Share on other sites

Here is a TradeStation help code example:

 

Variable: ID(-1);

If Low < Low[1] AND Close > High[1] Then Begin
 ID = TL_New(Date[1], Time[1], Low, Date, Time, Low);
 Value1 = TL_SetExtRight(ID, True);
End;

 

The above code adds multiple trendlines to my chart. Every time the conditions are met, a new trendline is added to the chart. Each trendline is extended all the way to the current right hand edge of the chart. The reserved word "TL_SetExtRight" causes the trendline to extend continuously from the starting point to the right.

 

So, this means that multiple trend lines can be created from one trendline variable. A trendline variable is not confined to only having one trendline.

Share this post


Link to post
Share on other sites

I add some code to label the line in the chart (from day 1 to day 4 from today ) but I find that some letters is missed after it is enabled. For example, d2H = day 2 high, it display d2 without H. After a while, it will show up all. Any idea?

 

 

===============================

 

input:

lookback( 4 ),

Line.size ( 1 ),

Line.style ( 2 ),

color.h1( blue ),

color.l1( blue ),

color.h2( red ),

color.l2( red ),

color.h3( darkgreen ),

color.l3( darkgreen ),

color.h4( cyan ),

color.l4( cyan ),

hori_txdisp(10); {horizontal distance}

 

vars: d1Htid(0), d1Ltid(0),

d2Htid(0), d2Ltid(0),

d3Htid(0), d3Ltid(0),

d4Htid(0), d4Ltid(0);

 

// 1

if date <> date[1] and lookback = 1 then begin

value1 = tl_new_s(d , time_s , highd(1), d , time_s, highd(1 ));

value2 = tl_new_s(d , time_s, lowd(1), d , time_s, lowd(1));

 

tl_setcolor( value1, color.h1 );

TL_SetSize( value1, Line.size );

TL_SetStyle( value1, Line.style );

 

tl_setcolor( value2 , color.l1 );

TL_SetSize( value2, Line.size );

TL_SetStyle( value2, Line.style );

end;

 

if lookback = 1 then begin

tl_setend_s(value1, d , time_s , highd(1) );

tl_setend_s(value2, d , time_s , lowd(1) );

end;

 

// 2

if date <> date[1] and lookback = 2 then begin

value1 = tl_new_s(d , time_s , highd(1), d , time_s, highd(1 ));

value2 = tl_new_s(d , time_s, lowd(1), d , time_s, lowd(1));

value3 = tl_new_s(d , time_s , highd(2), d , time_s, highd(2 ));

value4 = tl_new_s(d , time_s, lowd(2), d , time_s, lowd(2));

 

tl_setcolor( value1, color.h1 );

TL_SetSize( value1, Line.size );

TL_SetStyle( value1, Line.style );

 

tl_setcolor( value2 , color.l1 );

TL_SetSize( value2, Line.size );

TL_SetStyle( value2, Line.style );

 

tl_setcolor( value3, color.h2 );

TL_SetSize( value3, Line.size );

TL_SetStyle( value3, Line.style );

 

tl_setcolor( value4 , color.l2 );

TL_SetSize( value4, Line.size );

TL_SetStyle( value4, Line.style );

end;

if lookback = 2 then begin

tl_setend_s(value1, d , time_s , highd(1) );

tl_setend_s(value2, d , time_s , lowd(1) );

tl_setend_s(value3, d , time_s , highd(2) );

tl_setend_s(value4, d , time_s , lowd(2) );

end;

 

// 3

if date <> date[1] and lookback = 3 then begin

value1 = tl_new_s(d , time_s , highd(1), d , time_s, highd(1 ));

value2 = tl_new_s(d , time_s, lowd(1), d , time_s, lowd(1));

value3 = tl_new_s(d , time_s , highd(2), d , time_s, highd(2 ));

value4 = tl_new_s(d , time_s, lowd(2), d , time_s, lowd(2));

value5 = tl_new_s(d , time_s , highd(3), d , time_s, highd(3 ));

value6 = tl_new_s(d , time_s, lowd(3), d , time_s, lowd(3 ));

 

tl_setcolor( value1, color.h1 );

TL_SetSize( value1, Line.size );

TL_SetStyle( value1, Line.style );

 

tl_setcolor( value2 , color.l1 );

TL_SetSize( value2, Line.size );

TL_SetStyle( value2, Line.style );

 

tl_setcolor( value3, color.h2 );

TL_SetSize( value3, Line.size );

TL_SetStyle( value3, Line.style );

 

tl_setcolor( value4 , color.l2 );

TL_SetSize( value4, Line.size );

TL_SetStyle( value4, Line.style );

 

tl_setcolor( value5, color.h3 );

TL_SetSize( value5, Line.size );

TL_SetStyle( value5, Line.style );

 

tl_setcolor( value6 , color.l3 );

TL_SetSize( value6, Line.size );

TL_SetStyle( value6, Line.style );

end;

 

if lookback = 3 then

begin

tl_setend_s(value1, d , time_s , highd(1) );

tl_setend_s(value2, d , time_s , lowd(1) );

tl_setend_s(value3, d , time_s , highd(2) );

tl_setend_s(value4, d , time_s , lowd(2) );

tl_setend_s(value5, d , time_s , highd(3) );

tl_setend_s(value6, d , time_s , lowd(3) );

 

if lastbaronchart then

begin

tl_setextright(value1, true);

tl_setextright(value2, true);

tl_setextright(value3, true );

tl_setextright(value4, true);

tl_setextright(value5, true);

tl_setextright(value6, true);

end;

end;

 

 

// 4

if date <> date[1] and lookback = 4 then begin

value1 = tl_new_s(d , time_s , highd(1), d , time_s, highd(1 ));

value2 = tl_new_s(d , time_s, lowd(1), d , time_s, lowd(1));

value3 = tl_new_s(d , time_s , highd(2), d , time_s, highd(2 ));

value4 = tl_new_s(d , time_s, lowd(2), d , time_s, lowd(2));

value5 = tl_new_s(d , time_s , highd(3), d , time_s, highd(3 ));

value6 = tl_new_s(d , time_s, lowd(3), d , time_s, lowd(3 ));

value7 = tl_new_s(d , time_s , highd(4), d , time_s, highd(4 ));

value8 = tl_new_s(d , time_s, lowd(4), d , time_s, lowd(4 ));

 

tl_setcolor( value1, color.h1 );

TL_SetSize( value1, Line.size );

TL_SetStyle( value1, Line.style );

//piv1tid = Text_New(date, Minlist(Time + hori_txdisp, SessionEndTime(0, 1) + hori_txdisp), highd(1) - (textscale * MinMove/PriceScale), "d1H");

d1Htid = Text_New(date, currenttime+hori_txdisp , highd(1), "d1H");

 

tl_setcolor( value2 , color.l1 );

TL_SetSize( value2, Line.size );

TL_SetStyle( value2, Line.style );

d1Ltid = Text_New(date, currenttime+hori_txdisp, lowd(1) , "d1L");

 

tl_setcolor( value3, color.h2 );

TL_SetSize( value3, Line.size );

TL_SetStyle( value3, Line.style );

d2Htid = Text_New(date, currenttime+hori_txdisp , highd(2), "d2H");

 

tl_setcolor( value4 , color.l2 );

TL_SetSize( value4, Line.size );

TL_SetStyle( value4, Line.style );

d2Ltid = Text_New(date, currenttime+hori_txdisp, lowd(2) , "d2L");

 

tl_setcolor( value5, color.h3 );

TL_SetSize( value5, Line.size );

TL_SetStyle( value5, Line.style );

d3Htid = Text_New(date, currenttime+hori_txdisp , highd(3), "d3H");

 

tl_setcolor( value6 , color.l3 );

TL_SetSize( value6, Line.size );

TL_SetStyle( value6, Line.style );

d3Ltid = Text_New(date, currenttime+hori_txdisp, lowd(3) , "d3L");

 

tl_setcolor( value7, color.h4 );

TL_SetSize( value7, Line.size );

TL_SetStyle( value7, Line.style );

d4Htid = Text_New(date, currenttime+hori_txdisp , highd(4), "d4H");

 

tl_setcolor( value8 , color.l4 );

TL_SetSize( value8, Line.size );

TL_SetStyle( value8, Line.style );

d4Ltid = Text_New(date, currenttime+hori_txdisp, lowd(4) , "d4L");

end;

 

if lookback = 4 then begin

tl_setend_s(value1, d , time_s , highd(1) );

tl_setend_s(value2, d , time_s , lowd(1) );

tl_setend_s(value3, d , time_s , highd(2) );

tl_setend_s(value4, d , time_s , lowd(2) );

tl_setend_s(value5, d , time_s , highd(3) );

tl_setend_s(value6, d , time_s , lowd(3) );

tl_setend_s(value7, d , time_s , highd(4) );

tl_setend_s(value8, d , time_s , lowd(4) );

end;

1.thumb.png.0ffb4c79e1848d62e88f5013b1d5ec4b.png

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Topics

  • Posts

    • Date: 11th July 2025.   Demand For Gold Rises As Trump Announces Tariffs!   Gold prices rose significantly throughout the week as investors took advantage of the 2.50% lower entry level. Investors also return to the safe-haven asset as the US trade policy continues to escalate. As a result, investors are taking a more dovish tone. The ‘risk-off’ appetite is also something which can be seen within the stock market. The NASDAQ on Thursday took a 0.90% dive within only 30 minutes.   Trade Tensions Escalate President Trump has been teasing with new tariffs throughout the week. However, the tariffs were confirmed on Thursday. A 35% tariff on Canadian imports starting August 1st, along with 50% tariffs on copper and goods from Brazil. Some experts are advising that Brazil has been specifically targeted due to its association with the BRICS.   However, the President has not directly associated the tariffs with BRICS yet. According to President Trump, Brazil is targeting US technology companies and carrying out a ‘witch hunt’against former Brazilian President Jair Bolsonaro, a close ally who is currently facing prosecution for allegedly attempting to overturn the 2022 Brazilian election.   Although Brazil is one of the largest and fastest-growing economies in the Americas, it is not the main concern for investors. Investors are more concerned about Tariffs on Canada. The White House said it will impose a 35% tariff on Canadian imports, effective August 1st, raised from the earlier 25% rate. This covers most goods, with exceptions under USMCA and exemptions for Canadian companies producing within the US.   It is also vital for investors to note that Canada is among the US;’s top 3 trading partners. The increase was justified by Trump citing issues like the trade deficit, Canada’s handling of fentanyl trafficking, and perceived unfair trade practices.   The President is also threatening new measures against the EU. These moves caused US and European stock futures to fall nearly 1%, while the Dollar rose and commodity prices saw small gains. However, the main benefactor was Silver and Gold, which are the two best-performing metals of the day.   How Will The Fed Impact Gold? The FOMC indicated that the number of members warming up to the idea of interest rate cuts is increasing. If the Fed takes a dovish tone, the price of Gold may further rise. In the meantime, the President pushing for a 3% rate cut sparked talk of a more dovish Fed nominee next year and raised worries about future inflation.   Meanwhile, jobless claims dropped for the fourth straight week, coming in better than expected and supporting the view that the labour market remains strong after last week’s solid payroll report. Markets still expect two rate cuts this year, but rate futures show most investors see no change at the next Fed meeting. Gold is expected to finish the week mostly flat.       Gold 15-Minute Chart     If the price of Gold increases above $3,337.50, buy signals are likely to materialise again. However, the price is currently retracing, meaning traders are likely to wait for regained momentum before entering further buy trades. According to HSBC, they expect an average price of $3,215 in 2025 (up from $3,015) and $3,125 in 2026, with projections showing a volatile range between $3,100 and $3,600   Key Takeaway Points: Gold Rises on Safe-Haven Demand. Gold gained as investors reacted to rising trade tensions and market volatility. Canada Tariffs Spark Concern. A 35% tariff on Canadian imports drew attention due to Canada’s key trade role. Fed Dovish Shift Supports Gold. Growing expectations of rate cuts and Trump’s push for a 3% cut boosted the gold outlook. Gold Eyes Breakout Above $3,337.5. Price is consolidating; a move above $3,337.50 could trigger new buy signals. Always trade with strict risk management. Your capital is the single most important aspect of your trading business.   Please note that times displayed based on local time zone and are from time of writing this report.   Click HERE to access the full HFM Economic calendar.   Want to learn to trade and analyse the markets? Join our webinars and get analysis and trading ideas combined with better understanding of how markets work. Click HERE to register for FREE!   Click HERE to READ more Market news.   Michalis Efthymiou HFMarkets   Disclaimer: This material is provided as a general marketing communication for information purposes only and does not constitute an independent investment research. Nothing in this communication contains, or should be considered as containing, an investment advice or an investment recommendation or a solicitation for the purpose of buying or selling of any financial instrument. All information provided is gathered from reputable sources and any information containing an indication of past performance is not a guarantee or reliable indicator of future performance. Users acknowledge that any investment in Leveraged Products is characterized by a certain degree of uncertainty and that any investment of this nature involves a high level of risk for which the users are solely responsible and liable. We assume no liability for any loss arising from any investment made based on the information provided in this communication. This communication must not be reproduced or further distributed without our prior written permission.
    • Back in the early 2000s, Netflix mailed DVDs to subscribers.   It wasn’t sexy—but it was smart. No late fees. No driving to Blockbuster.   People subscribed because they were lazy. Investors bought the stock because they realized everyone else is lazy too.   Those who saw the future in that red envelope? They could’ve caught a 10,000%+ move.   Another story…   Back in the mid-2000s, Amazon launched Prime.   It wasn’t flashy—but it was fast.   Free two-day shipping. No minimums. No hassle.   People subscribed because they were impatient. Investors bought the stock because they realized everyone hates waiting.   Those who saw the future in that speedy little yellow button? They could’ve caught another 10,000%+ move.   Finally…   Back in 2011, Bitcoin was trading under $10.   It wasn’t regulated—but it worked.   No bank. No middleman. Just wallet to wallet.   People used it to send money. Investors bought it because they saw the potential.   Those who saw something glimmering in that strange orange coin? They could’ve caught a 100,000%+ move.   The people who made those calls weren’t fortune tellers. They just noticed something simple before others did.   A better way. A quiet shift. A small edge. An asymmetric bet.   The red envelope fixed late fees. The yellow button fixed waiting. The orange coin gave billions a choice.   Of course, these types of gains are rare. And they happen only once in a blue moon. That’s exactly why it’s important to notice when the conditions start to look familiar.   Not after the move. Not once it's on CNBC. But in the quiet build-up— before the surface breaks.   Enter the Blue Button Please read more here: https://altucherconfidential.com/posts/netflix-amazon-bitcoin-blue  Profits from free accurate cryptos signals: https://www.predictmag.com/ 
    • What These Attacks Look Like There are several ways you could get hacked. And the threats compound by the day.   Here’s a quick rundown:   Phishing: Fake emails from your “bank.” Click the link, give your password—game over.   Ransomware: Malware that locks your files and demands crypto. Pay up, or it’s gone.   DDoS: Overwhelm a website with traffic until it crashes. Like 10,000 bots blocking the door. Often used by nations.   Man-in-the-Middle: Hackers intercept your messages on public WiFi and read or change them.   Social Engineering: Hackers pose as IT or drop infected USB drives labeled “Payroll.”   You don’t need to be “important” to be a target.   You just need to be online.   What You Can Do (Without Buying a Bunker) You don’t have to be tech-savvy.   You just need to stop being low-hanging fruit.   Here’s how:   Use a YubiKey (physical passkey device) or Authenticator app – Ditch text message 2FA. SIM swaps are real. Hackers often have people on the inside at telecom companies.   Use a password manager (with Yubikey) – One unique password per account. Stop using your dog’s name.   Update your devices – Those annoying updates patch real security holes. Use them.   Back up your files – If ransomware hits, you don’t want your important documents held hostage.   Avoid public WiFi for sensitive stuff – Or use a VPN.   Think before you click – Emails that feel “urgent” are often fake. Go to the websites manually for confirmation.   Consider Starlink in case the internet goes down – I think it’s time for me to make the leap. Don’t Panic. Prepare. (Then Invest.)   I spent an hour in that basement bar reading about cyberattacks—and watching real-world systems fall apart like dominos.   The internet going down used to be an inconvenience. Now, it’s a warning.   Cyberwar isn’t coming. It’s here.   And the next time your internet goes out, it might not just be your router.   Don’t panic. Prepare.   And maybe keep a backup plan in your back pocket. Like a local basement bar with good bourbon—and working WiFi.   As usual, we’re on the lookout for more opportunities in cybersecurity. Stay tuned.   Author: Chris Campbell (AltucherConfidential) Profits from free accurate cryptos signals: https://www.predictmag.com/   
    • DUMBSHELL:  re the automation of corruption ---  200,000 "Science Papers" in academic journal database PubMed may have been AI-generated with errors, hallucinations and false sourcing 
    • Does any crypto exchanges get banned in your country? How's about other as Bybit, Kraken, MEXC, OKX?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.