Hi,
the tl_new function uses beginning time and end time for drawing a trendlines. What if I am putting this on a tick chart? and I want it to move forward 5 bars? I dont know the time of the 5th bar, as its a tick chart, what do i do?
easylanguage TL_new in tickchart
-
- Posts: 186
- Joined: 10 May 2012
- Has thanked: 14 times
- Been thanked: 11 times
- Andrew MultiCharts
- Posts: 1587
- Joined: 11 Oct 2011
- Has thanked: 931 times
- Been thanked: 559 times
Re: easylanguage TL_new in tickchart
Hello KhaosTrader,
Unfortunately you cannot reference bar numbers or something else. You will have to use approximate bar time for plotting your trendlines on tick resolution. .
Unfortunately you cannot reference bar numbers or something else. You will have to use approximate bar time for plotting your trendlines on tick resolution. .
-
- Posts: 186
- Joined: 10 May 2012
- Has thanked: 14 times
- Been thanked: 11 times
Re: easylanguage TL_new in tickchart
Well, I think a more clever approach would be to move it to one minute in the future, and then adjust it to the current time of the current tick and once current time is exceeded you end the bar length change.
Would you agree?
Would you agree?
- Andrew MultiCharts
- Posts: 1587
- Joined: 11 Oct 2011
- Has thanked: 931 times
- Been thanked: 559 times
Re: easylanguage TL_new in tickchart
Try this example:
Code: Select all
var: id(0);
if id=0 then
id = tl_new_s(d,time_s,close,d,time_s,close);
tl_setbegin_s(id, d,time_s,close);
tl_setend_s(id, d,time_s+100,close);