Display price near candle
Display price near candle
30 Sep 2015, 12:04
Hi,
How to display price near candle on cTrader without using bid/ask lines ? Please, thank you.
Replies
LSR2412
30 Sep 2015, 17:33
using System; using cAlgo.API; using cAlgo.API.Indicators; namespace cAlgo.Indicators { [Indicator(IsOverlay = true, AccessRights = AccessRights.None)] public class Priceatcandle : Indicator { public override void Calculate(int index) { { ChartObjects.DrawText("price", MarketSeries.Close[index].ToString(), StaticPosition.Right, Colors.Red); } } } }
please ignore my first code..this is ok
@LSR2412
LSR2412
01 Oct 2015, 08:47
RE:
using System; using cAlgo.API; using cAlgo.API.Indicators; namespace cAlgo.Indicators { [Indicator(IsOverlay = true, AccessRights = AccessRights.None)] public class Priceatcandle : Indicator { public override void Calculate(int index) { { ChartObjects.DrawText(index.ToString(), MarketSeries.Close[index].ToString(), index + 1, MarketSeries.Close[index], VerticalAlignment.Center, HorizontalAlignment.Right, Colors.Gray); ChartObjects.RemoveObject((index - 1).ToString()); } } } }
karlson said:
Thank you very much for your help. Is it possible to have last price moving along the last candle ? Or displaying an arrow along last candle?
this is with "Last" price moving
@LSR2412
LSR2412
01 Oct 2015, 08:51
RE:
using System; using cAlgo.API; using cAlgo.API.Indicators; namespace cAlgo.Indicators { [Indicator(IsOverlay = true, AccessRights = AccessRights.None)] public class Priceatcandle : Indicator { public override void Calculate(int index) { { ChartObjects.DrawText(index.ToString(), "←", index + 1, MarketSeries.Close[index], VerticalAlignment.Center, HorizontalAlignment.Right, Colors.Gray); ChartObjects.RemoveObject((index - 1).ToString()); } } } }
karlson said:
Thank you very much for your help. Is it possible to have last price moving along the last candle ? Or displaying an arrow along last candle?
this is with arrow....put any symbol instead of this arrow in quotation marks and it will be displayed
@LSR2412
LSR2412
30 Sep 2015, 16:14
RE:
showing last price just below last candle
karlson said:
@LSR2412