public void Update() { double d10 = Distance / 30; //For enter Ray _eDot = _strategy.DrawDot("enterDot", true, 0, RealRayPrice(EntryRay), _dotColor); double s = RealRayPrice(EntryRay); _eText = _strategy.DrawText("enterText", TextForma(s), 0, RealRayPrice(EntryRay) + d10, _textColor); //For stop Ray _sDot = _strategy.DrawDot("stopDot", true, 0, RealRayPrice(StopRay), _dotColor); double text = RealRayPrice(StopRay); _sText = _strategy.DrawText("stopText", TextForma(text), 0, RealRayPrice(StopRay) + d10, _textColor); //For TP Ray _tpDot = _strategy.DrawDot("TPDot", true, 0, RealRayPrice(ProfitTargetRay), _dotColor); double priceText = RealRayPrice(ProfitTargetRay); _tpText = _strategy.DrawText("TPText", TextForma(priceText), 0, RealRayPrice(ProfitTargetRay) + d10, _textColor); //Check if have turn on the Closing Half and is The ray exist because without ray we will got the error if (ClosingHalf && HalfCloseRay != null) { double priceT = RealRayPrice(HalfCloseRay); _hcDot = _strategy.DrawDot("HCDot", true, 0, priceT, _dotColor); _hcText = _strategy.DrawText("HCText", TextForma(priceT), 0, RealRayPrice(HalfCloseRay) + d10, _textColor); } }
public void UpdateSlopeLine(Slope slope) { double price = _strategy.Instrument.MasterInstrument.Round2TickSize(slope.Price); _ray = _strategy.DrawRay("Slope", false, slope.Bar, price, slope.Bar - 3, price, SlopeLineColor, DashStyle.Solid, 2); _dot = _strategy.DrawDot("slopeDot", false, 0, price, Color.Black); _text = _strategy.DrawText("SlopeText", TextForma(price), 0, price, Color.Black); _strategy.ChartControl.ChartPanel.Invalidate(); }