MCPcopy Create free account
hub / github.com/TraderOracle/ATAS / OnRender

Method OnRender

Defibrillator.cs:72–137  ·  view source on GitHub ↗
(RenderContext context, DrawingLayouts layout)

Source from the content-addressed store, hash-verified

70 }
71
72 protected override void OnRender(RenderContext context, DrawingLayouts layout)
73 {
74 if (ChartInfo is null)
75 return;
76
77 var xH = ChartInfo.PriceChartContainer.GetXByBar(_highBar, false);
78 var yH = ChartInfo.PriceChartContainer.GetYByPrice(_highest, false);
79 context.DrawLine(defibPen.RenderObject, xH, yH, Container.Region.Right, yH);
80 DrawString(context, _highS, yH, defibPen.RenderObject.Color);
81
82 var xL = ChartInfo.PriceChartContainer.GetXByBar(_lowBar, false);
83 var yL = ChartInfo.PriceChartContainer.GetYByPrice(_lowest, false);
84 context.DrawLine(defibPen.RenderObject, xL, yL, Container.Region.Right, yL);
85 DrawString(context, _lowS, yL, defibPen.RenderObject.Color);
86
87 if (bShowOvernight)
88 {
89 yH = ChartInfo.PriceChartContainer.GetYByPrice(A05, false);
90 context.DrawLine(defibPen.RenderObject, xH, yH, Container.Region.Right, yH);
91 DrawString(context, "0.5", yH, defibPen.RenderObject.Color);
92
93 yH = ChartInfo.PriceChartContainer.GetYByPrice(A113, false);
94 context.DrawLine(defibPen.RenderObject, xH, yH, Container.Region.Right, yH);
95 DrawString(context, "1.13", yH, defibPen.RenderObject.Color);
96 yH = ChartInfo.PriceChartContainer.GetYByPrice(A150, false);
97 context.DrawLine(defibPen.RenderObject, xH, yH, Container.Region.Right, yH);
98 DrawString(context, "1.5", yH, defibPen.RenderObject.Color);
99 yH = ChartInfo.PriceChartContainer.GetYByPrice(A1618, false);
100 context.DrawLine(defibPen.RenderObject, xH, yH, Container.Region.Right, yH);
101 DrawString(context, "1.618", yH, defibPen.RenderObject.Color);
102 yH = ChartInfo.PriceChartContainer.GetYByPrice(A200, false);
103 context.DrawLine(defibPen.RenderObject, xH, yH, Container.Region.Right, yH);
104 DrawString(context, "2", yH, defibPen.RenderObject.Color);
105 yH = ChartInfo.PriceChartContainer.GetYByPrice(A213, false);
106 context.DrawLine(defibPen.RenderObject, xH, yH, Container.Region.Right, yH);
107 DrawString(context, "2.13", yH, defibPen.RenderObject.Color);
108 yH = ChartInfo.PriceChartContainer.GetYByPrice(A250, false);
109 context.DrawLine(defibPen.RenderObject, xH, yH, Container.Region.Right, yH);
110 DrawString(context, "2.5", yH, defibPen.RenderObject.Color);
111 yH = ChartInfo.PriceChartContainer.GetYByPrice(A2618, false);
112 context.DrawLine(defibPen.RenderObject, xH, yH, Container.Region.Right, yH);
113 DrawString(context, "2.618", yH, defibPen.RenderObject.Color);
114
115 yH = ChartInfo.PriceChartContainer.GetYByPrice(nA113, false);
116 context.DrawLine(defibPen.RenderObject, xH, yH, Container.Region.Right, yH);
117 DrawString(context, "1.13", yH, defibPen.RenderObject.Color);
118 yH = ChartInfo.PriceChartContainer.GetYByPrice(nA150, false);
119 context.DrawLine(defibPen.RenderObject, xH, yH, Container.Region.Right, yH);
120 DrawString(context, "1.5", yH, defibPen.RenderObject.Color);
121 yH = ChartInfo.PriceChartContainer.GetYByPrice(nA1618, false);
122 context.DrawLine(defibPen.RenderObject, xH, yH, Container.Region.Right, yH);
123 DrawString(context, "1.618", yH, defibPen.RenderObject.Color);
124 yH = ChartInfo.PriceChartContainer.GetYByPrice(nA200, false);
125 context.DrawLine(defibPen.RenderObject, xH, yH, Container.Region.Right, yH);
126 DrawString(context, "2", yH, defibPen.RenderObject.Color);
127 yH = ChartInfo.PriceChartContainer.GetYByPrice(nA213, false);
128 context.DrawLine(defibPen.RenderObject, xH, yH, Container.Region.Right, yH);
129 DrawString(context, "2.13", yH, defibPen.RenderObject.Color);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected