Mainly to find the best bar to 'anchor' a regression channel - it's an adaptation of mine of an existing one - I've worked up a simple indicator (code below) which numbers the bars on a chart. The first bar of each session = 0, etc. This could be useful for a number of purposes.
private int level =1600; ... IText text = DrawText("My text" + CurrentBar,Bars.BarsSinceSession.ToString(), 0, [B]Level[/B], Color.Black);
The problem arises with Forex charts, such as EUR/USD which is obviously a decimal (currently about 1.3060), as the appropriate parameter in IText can only be an integer. (From Help: "Y = An int value representing the y value of the draw object.)
Is there some kind of workaround for this? If I want the text to appear at level = 1.3060, say, is there any way of doing this?
Any ideas will be greatly appreciated.
Comment