TL_SetBegin_S: Not behave the same depending on scale  [SOLVED]

Questions about MultiCharts and user contributed studies.
arjfca
Posts: 1292
Joined: 23 Nov 2010
Has thanked: 725 times
Been thanked: 223 times

TL_SetBegin_S: Not behave the same depending on scale

Postby arjfca » 19 Jun 2015

Hello

A small indicator is use to show a trend line of across the chart representing the last price

Code: Select all

If (ShowLastPriceLine = true) then begin
TL_SetEnd_S(TL_LastPrice ,date,time_s[2],close);
TL_setbegin_S(TL_Lastprice,date,time_s[2],close);
end
A blue horizontal line starting at time_s[2]. 2 BARS AGO

Work fine for scale 1H and less. Higher scale, the line start at the border of the chart

Snap picture will explain better than me... Look at the left beginning of the blue trend line. I want it to start 2 bars ago for all scales. This little problem will be present for scale above 1 H

15 minute chart
http://screenpresso.com/=Fo2ld

2H chart
http://screenpresso.com/=JIptg

Martin

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: TL_SetBegin_S: Not behave the same depending on scale  [SOLVED]

Postby TJ » 19 Jun 2015

Hello

A small indicator is use to show a trend line of across the chart representing the last price

Code: Select all

If (ShowLastPriceLine = true) then begin
TL_SetEnd_S(TL_LastPrice ,date,time_s[2],close);
TL_setbegin_S(TL_Lastprice,date,time_s[2],close);
end
A blue horizontal line starting at time_s[2]. 2 BARS AGO

Work fine for scale 1H and less. Higher scale, the line start at the border of the chart

Snap picture will explain better than me... Look at the left beginning of the blue trend line. I want it to start 2 bars ago for all scales. This little problem will be present for scale above 1 H

15 minute chart
http://screenpresso.com/=Fo2ld

2H chart
http://screenpresso.com/=JIptg

Martin
Try this:

Code: Select all

If (ShowLastPriceLine = true) then begin
TL_SetEnd_S( TL_LastPrice, date[2], time_s[2], close );
TL_setbegin_S( TL_Lastprice, date[2], time_s[2], close );
end

arjfca
Posts: 1292
Joined: 23 Nov 2010
Has thanked: 725 times
Been thanked: 223 times

Re: TL_SetBegin_S: Not behave the same depending on scale

Postby arjfca » 19 Jun 2015

Hello

A small indicator is use to show a trend line of across the chart representing the last price

Code: Select all

If (ShowLastPriceLine = true) then begin
TL_SetEnd_S(TL_LastPrice ,date,time_s[2],close);
TL_setbegin_S(TL_Lastprice,date,time_s[2],close);
end
A blue horizontal line starting at time_s[2]. 2 BARS AGO

Work fine for scale 1H and less. Higher scale, the line start at the border of the chart

Snap picture will explain better than me... Look at the left beginning of the blue trend line. I want it to start 2 bars ago for all scales. This little problem will be present for scale above 1 H

15 minute chart
http://screenpresso.com/=Fo2ld

2H chart
http://screenpresso.com/=JIptg

Martin
Try this:

Code: Select all

If (ShowLastPriceLine = true) then begin
TL_SetEnd_S( TL_LastPrice, date[2], time_s[2], close );
TL_setbegin_S( TL_Lastprice, date[2], time_s[2], close );
end
TJ, what would be MC forum without your generous help.
Have a great day.

Martin

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: TL_SetBegin_S: Not behave the same depending on scale

Postby TJ » 19 Jun 2015

TJ, what would be MC forum without your generous help.
Have a great day.

Martin
You are always welcome Martin. :-)
Good trading to you.


Return to “MultiCharts”