Returns a current width of candle bar


SYNTAX


public int BarsWidth { get; }


EXAMPLE


using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using PTLRuntime.NETScript;
using PTLRuntime.NETScript.Charts;

namespace ChartPropertiesExamples
{
     public class ChartPropertiesExamples : NETIndicator
     {
     StringFormat stringFormat = new StringFormat();
     stringFormat.Alignment = StringAlignment.Far;
     stringFormat.LineAlignment = StringAlignment.Far;
     PointF startPoint;
     RectangleF rectf = new RectangleF(0, 0, BarsWidth, 20);
     
         public override void OnQuote(){
            startPoint=CurrentChart.GetChartPoint(CurrentData.Time(),CurrentData.GetPrice(PriceType.Close,0)); 
         }
         public override void OnPaintChart(object sender, PTLRuntime.NETScript.Charts.PaintChartEventArgs args)
         {
             rectf.X=startPoint.X;
             rectf.Y=startPoint.Y;
         args.Graphics.DrawString("$", new Font("Arial", 10, FontStyle.Bold), new SolidBrush(Color.White), rectf, stringFormat);
         }
     }
}