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

Method DrawText

ATASVolImb.cs:150–173  ·  view source on GitHub ↗
(int bBar, String strX, Color cI, Color cB, bool bOverride = false, bool bSwap = false)

Source from the content-addressed store, hash-verified

148 private readonly ATR ateer = new ATR() { Period = 14 };
149
150 protected void DrawText(int bBar, String strX, Color cI, Color cB, bool bOverride = false, bool bSwap = false)
151 {
152 var candle = GetCandle(bBar);
153
154 decimal _tick = ChartInfo.PriceChartContainer.Step;
155 decimal loc = 0;
156
157 if (candle.Close > candle.Open || bOverride)
158 loc = candle.High + (_tick * iOffset);
159 else
160 loc = candle.Low - (_tick * iOffset);
161
162 if (candle.Close > candle.Open && bSwap)
163 loc = candle.Low - (_tick * (iOffset * 2));
164 else if (candle.Close < candle.Open && bSwap)
165 loc = candle.High + (_tick * iOffset);
166
167 if (strX == "▼")
168 loc = candle.High + (_tick * iOffset);
169 if (strX == "▲")
170 loc = candle.Low - (_tick * (iOffset * 2));
171
172 AddText("Aver" + bBar, strX, true, bBar, loc, cI, cB, iFontSize, DrawingText.TextAlign.Center);
173 }
174
175 #endregion
176

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected