This is slightly off topic but is there a way to find the bar number of the first bar you can see on the left of a chart? In easylanguage that is. First bar displayed rather than first bar on chart?
Cheers.
First bar displayed
- Marina Pashkova
- Posts: 2758
- Joined: 27 Jul 2007
Hi the first bar on the chart is bar 1 and will quite likely not be seen in the chart window. It will be off the left hand edge some time in the past. Of course it would be there if you scrolled your chart window back
I want to identify the first bar displayed on the screen. That is the the first bar that you can actually see on the left hand side of the window.
Hope that explains it.
Thanks in advance,
Cheers.
I want to identify the first bar displayed on the screen. That is the the first bar that you can actually see on the left hand side of the window.
Hope that explains it.
Thanks in advance,
Cheers.
- Marina Pashkova
- Posts: 2758
- Joined: 27 Jul 2007
Yes that's exactly it Marina. To be honest I am not even sure that TS can do it. This is why I put it as 'slightly off topic'.
Having said that it is very valuable to label things on the righthand edge where it is nicely out of the way of price action.
It would be nice to know this bar if you widen the bars spacing or re-size your chart,
Cheers,
Nick.
Having said that it is very valuable to label things on the righthand edge where it is nicely out of the way of price action.
It would be nice to know this bar if you widen the bars spacing or re-size your chart,
Cheers,
Nick.
- ABC
- Posts: 718
- Joined: 16 Dec 2006
- Location: www.abctradinggroup.com
- Has thanked: 125 times
- Been thanked: 408 times
- Contact:
Nick,
it's possible in EL/PL:
aiLeftDispDateTime:
Identifies date and time of the first (leftmost) bar displayed on the chart.
Returns a DateTime(double) value when called from a chart otherwise returns 0.
aiRightDispDateTime:
Identifies date and time of the last (rightmost) bar displayed on the chart.
Returns a DateTime(double) value when called from a chart otherwise returns 0.
Works like a charm, but you'll need to convert the double DateTime, because Date comes as JulianDate and Time are the minutes from 00:00.
Hope that helps,
ABC
it's possible in EL/PL:
Code: Select all
GetAppInfo(aiLeftDispDateTime);
Identifies date and time of the first (leftmost) bar displayed on the chart.
Returns a DateTime(double) value when called from a chart otherwise returns 0.
aiRightDispDateTime:
Identifies date and time of the last (rightmost) bar displayed on the chart.
Returns a DateTime(double) value when called from a chart otherwise returns 0.
Works like a charm, but you'll need to convert the double DateTime, because Date comes as JulianDate and Time are the minutes from 00:00.
Hope that helps,
ABC
having a small problem extracting the minutes correctly to plot anyidea whats wrong with this?
if LastBarOnChart then begin
jDateTime = GetAppInfo(aiLeftDispDateTime);
FirstBarDate = JulianToDate( IntPortion(jDateTime ) ) ;
FirstBarTime = MinutesToTime( FracPortion(jDateTime ) * 60 * 24 ) ;
Result = Text_New(FirstBarDate, FirstBarTime, Close, "Test1234567890");
end;
Its plotting the text on the correct day but at the first bar of the day? I guess I have misunderstood getting the fractional portion returned by getappinfo into the correct time format for the plot?
Thanks again
nick
if LastBarOnChart then begin
jDateTime = GetAppInfo(aiLeftDispDateTime);
FirstBarDate = JulianToDate( IntPortion(jDateTime ) ) ;
FirstBarTime = MinutesToTime( FracPortion(jDateTime ) * 60 * 24 ) ;
Result = Text_New(FirstBarDate, FirstBarTime, Close, "Test1234567890");
end;
Its plotting the text on the correct day but at the first bar of the day? I guess I have misunderstood getting the fractional portion returned by getappinfo into the correct time format for the plot?
Thanks again
nick
- ABC
- Posts: 718
- Joined: 16 Dec 2006
- Location: www.abctradinggroup.com
- Has thanked: 125 times
- Been thanked: 408 times
- Contact: