Hi, I have a few charts, some are in 5 min and some are daily.
I'd like to draw a trendline say 5 bars ago to 5 bars later. Under minutes chart I just do:
tl_new(olddate, oldtime, level, olddate, oldtime+25, level)
but then this code doesn't work with daily chart.
Is there a way to draw trendline based on how many bars into the future?
Thanks a lot!
Sean
Extend Trendline to a few bars under different freq
- TJ
- Posts: 7740
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2221 times
Re: Extend Trendline to a few bars under different freq
Look up:Hi, I have a few charts, some are in 5 min and some are daily.
I'd like to draw a trendline say 5 bars ago to 5 bars later. Under minutes chart I just do:
tl_new(olddate, oldtime, level, olddate, oldtime+25, level)
but then this code doesn't work with daily chart.
Is there a way to draw trendline based on how many bars into the future?
Thanks a lot!
Sean
TL_NEW_Bn
Re: Extend Trendline to a few bars under different freq
thanks a lot! didn't know there is this function.
however, i had some trouble with using BarNumber. When I click on the charts, there is a display of OHLC and bar number information.
Then I wrote a few code to print the bar number on top of each bar, and I notice that BarNumber printed is different from what is displayed if click the mouse. Any idea? Thanks!
Sean
however, i had some trouble with using BarNumber. When I click on the charts, there is a display of OHLC and bar number information.
Then I wrote a few code to print the bar number on top of each bar, and I notice that BarNumber printed is different from what is displayed if click the mouse. Any idea? Thanks!
Sean
- Andrew MultiCharts
- Posts: 1587
- Joined: 11 Oct 2011
- Has thanked: 931 times
- Been thanked: 559 times
Re: Extend Trendline to a few bars under different freq
Hello kkhorse,however, i had some trouble with using BarNumber. When I click on the charts, there is a display of OHLC and bar number information.
Then I wrote a few code to print the bar number on top of each bar, and I notice that BarNumber printed is different from what is displayed if click the mouse. Any idea? Thanks!
Please use Symbol_CurrentBar.