I put together an indicator using a Plot that shows a hash and the pricemarker for a higher SMA. For example: I can use it in a 1minute chart so it indicates the SMA20 of a 360min DataSeries. I am not interested in the actual line of that 360 SMA20. I just want to see where it's price is at. Works fine and I can adjust the color through the PlotColor.
Add(new Plot(Color.LightBlue, PlotStyle.Hash, "RoundedSMA"));
PlotColors[0][1] = Color.Transparent; // (I use this so it only shows 1 hash)
Now I would like to add a label into the chart that tells me the timeframe being used. To do that I use DrawText as follows:
DrawText("tag", false, BarsArray[1].Period.ToString(), -1, (SMA(BarsArray[1],20))[0], 0, textcolor, new Font ("Arial", 7, FontStyle.Regular),StringAlignment.Near, Color.Empty, Color.Empty, 0);
My question is whether there are any possibilities to define the textcolor through the Plot color?
sandman
Comment