Beispiel #1
0
 protected override void OnStartUp()
 {
     extdat = Bars.BarsType as rwt.IExtendedData;
     if (extdat == null)
     {
         throw new Exception("Only use this indicator on an Extended Data BarType!");
     }
 }
 protected override void OnStartUp()
 {
     extdat = Bars.BarsType as rwt.IExtendedData;
     if (extdat == null)
     {
         throw new Exception("Only use this indicator on an Extended Data BarType!");
     }
     //extdat = (NinjaTrader.Data.RichRange)(Bars.BarsType);
     lastSeen = -1;
 }
        protected override void OnStartUp()
        {
            extdat = Bars.BarsType as rwt.IExtendedData;
            if (extdat == null)
            {
                throw new Exception("Only use this indicator on an Extended Data BarType!");
            }

            paintBrush = new SolidBrush(Color.FromArgb(255, Color.Black));
        }
Beispiel #4
0
        protected override void OnStartUp()
        {
            extdat = Bars.BarsType as rwt.IExtendedData;
            if (extdat == null)
            {
                throw new Exception("Only use this indicator on an Extended Data BarType!");
            }

            sm1      = 0; sm2 = 0; osm1 = 0; osm2 = 0;
            alpha1   = 2.0 / (1.0 + len1);
            alpha2   = 2.0 / (1.0 + len2);
            lastSeen = -1;
        }
Beispiel #5
0
 protected override void OnStartUp()
 {
     memoryUp    = new double[memorySize];
     memoryDn    = new double[memorySize];
     oldMemoryUp = new double[memorySize];
     oldMemoryDn = new double[memorySize];
     prevUp      = 0;
     prevDn      = 0;
     extdat      = Bars.BarsType as rwt.IExtendedData;
     if (extdat == null)
     {
         throw new Exception("Only use this indicator on an Extended Data BarType!");
     }
 }
Beispiel #6
0
 protected override void OnStartUp()
 {
     extdat = Bars.BarsType as rwt.IExtendedData;
     if (extdat == null)
     {
         throw new Exception("Only use this indicator on an Extended Data BarType, fool!");
     }
     lastUpCount = 0;
     lastDnCount = 0;
     buytotals   = new DataSeries(this);
     selltotals  = new DataSeries(this);
     pones       = new DataSeries(this);
     b1          = Bollinger(pones, 1.0, avgLen);
     b2          = Bollinger(pones, 2.0, avgLen);
     uplight     = Color.FromArgb(50, uplight2);
     dnlight     = Color.FromArgb(50, dnlight2);
     updark      = Color.FromArgb(50, updark2);
     dndark      = Color.FromArgb(50, dndark2);
 }
 protected override void OnStartUp()
 {
     weightma    = null;
     expma       = null;
     ol          = new double[4];
     pol         = new double[4];
     hl          = new double[4];
     phl         = new double[4];
     ll          = new double[4];
     pll         = new double[4];
     cl          = new double[4];
     pcl         = new double[4];
     unsmoothed  = new DataSeries(this);
     lastSeenBar = -1;
     extdat      = Bars.BarsType as rwt.IExtendedData;
     if (extdat == null)
     {
         throw new Exception("Only use this indicator on an Extended Data BarType!");
     }
 }
        protected override void OnStartUp()
        {
            base.OnStartUp();
            extdat = Bars.BarsType as rwt.IExtendedData;
            if (extdat == null)
            {
                throw new Exception("Only use this indicator on an Extended Data BarType!");
            }

            paintBrush                 = new SolidBrush(ChartControl.ForeColor);
            backBrush                  = new SolidBrush(ChartControl.BackColor);
            centerFormat               = new StringFormat();
            centerFormat.Alignment     = StringAlignment.Center;
            centerFormat.LineAlignment = StringAlignment.Center;
            centerFormat.Trimming      = StringTrimming.None;
            centerFormat.FormatFlags  |= StringFormatFlags.NoClip;
            centerFormat.FormatFlags  |= StringFormatFlags.NoWrap;
            leftFormat                 = new StringFormat();
            leftFormat.Alignment       = StringAlignment.Near;
            leftFormat.LineAlignment   = StringAlignment.Center;
            leftFormat.Trimming        = StringTrimming.None;
            leftFormat.FormatFlags    |= StringFormatFlags.NoClip;
            leftFormat.FormatFlags    |= StringFormatFlags.NoWrap;
            rightFormat                = new StringFormat();
            rightFormat.Alignment      = StringAlignment.Far;
            rightFormat.LineAlignment  = StringAlignment.Center;
            rightFormat.Trimming       = StringTrimming.None;
            rightFormat.FormatFlags   |= StringFormatFlags.NoClip;
            rightFormat.FormatFlags   |= StringFormatFlags.NoWrap;
            linpen        = new Pen(paintBrush, 2);
            tradedPrices  = new double[2];
            tradedAmounts = new long[2];
            taIdx         = 0;
            lastBarSeen   = -1;
            lastVolume    = 0;
            if (displayvolprofile)
            {
                vprofClear();
            }
            chartedMin          = -1;
            chartedMax          = -1;
            tickHeight          = -1;
            barWidth            = -1;
            deltaFont           = null;
            totalsFont          = null;
            sessionProfileColor = Color.FromArgb(profcolorAlpha, profcolor);
            bigrect             = new RectangleF(0, 0, 0, 0);
            lilrect             = new RectangleF(0, 0, 0, 0);
            totalsrect          = new RectangleF(0, 0, 0, 0);
            rt = false;
            lastSessionBarNum = 0;
            if (displaycandles)
            {
                System.Windows.Forms.Control[] coll = ChartControl.Controls.Find("tsrTool", false);
                if (coll.Length > 0)
                {
                    if (displaygraphical)
                    {
                        button = new System.Windows.Forms.ToolStripButton("Graphics");
                    }
                    else
                    {
                        button = new System.Windows.Forms.ToolStripButton("Text");
                    }
                    if (combinedvol)
                    {
                        button2 = new System.Windows.Forms.ToolStripButton("Combined");
                    }
                    else
                    {
                        button2 = new System.Windows.Forms.ToolStripButton("Split");
                    }
                    button.Click  += switchDisplay;
                    button2.Click += switchCombined;
                    strip          = (System.Windows.Forms.ToolStrip)coll[0];
                    strip.Items.Add(button);
                    strip.Items.Add(button2);
                }
            }
        }