Problems with StaticPosition
Problems with StaticPosition
15 Nov 2012, 21:23
Hello admin,
I've problems with the position of ChartObjects.DrawText.
With this code, i haven't got problems,
string Code = " " + Convert.ToString(Symbol.Code);
string Ask = "\n "+ Convert.ToString(Symbol.Ask);
string Bid = "\n\n "+ Convert.ToString(Symbol.Bid);
string Spread = "\n\n\n "+ Convert.ToString(Convert.ToSingle (Symbol.Spread)*10000);
string Digits = "\n\n\n\n "+ Convert.ToString(Symbol.Digits);
string PipSize = "\n\n\n\n\n "+ Convert.ToString(Symbol.PipSize);
ChartObjects.DrawText("Labels",
"Code:" + "\n"
+ "Ask:" + "\n"
+ "Bid:" + "\n"
+ "Spread:" + "\n"
+ "Digits:" + "\n"
+ "PipSize:" + "\n"
, StaticPosition.TopLeft, Colors.Yellow);
ChartObjects.DrawText("Code", Code, StaticPosition.TopLeft, Colors.LightBlue);
ChartObjects.DrawText("Ask", Ask, StaticPosition.TopLeft, Colors.LightBlue);
ChartObjects.DrawText("Bid", Bid, StaticPosition.TopLeft, Colors.LightBlue);
ChartObjects.DrawText("Spread", Spread, StaticPosition.TopLeft, Colors.LightBlue);
ChartObjects.DrawText("Digits", Digits, StaticPosition.TopLeft, Colors.LightBlue);
ChartObjects.DrawText("PipSize", PipSize, StaticPosition.TopLeft, Colors.LightBlue);
But if i change the static position, the draw is wrong (p.e. StaticPosition.TopRigth, or BottomLeft...
Thanks
Replies
ArthurV
14 Jan 2013, 17:14
RE:
We are looking into it, for the time being please use a different static position.
Hello Admin,
Instead of showing spread 0.1, it shows 0.999999. Could you fix it please?
Also it does not represent the spread accurately as it is on a Market Analysis layout... It delays significantly I suppose...
Basically, I am interested in spread only, so possibly you can reference to any other indicator?
I didn't find anything similar among the indicator list
Kind Regards,
Arthur
@ArthurV
admin
14 Jan 2013, 18:11
Hello Arthur,
You can use Math.Round( Spread, 1) to round to one decimal digit.
string Spread = Convert.ToString(Math.Round(Symbol.Spread*10000, 1));
We will look into the delay issue.
I'm not sure what you mean by this statement though "reference to any other indicator". Could you please be more specific as to what it is you are trying to do?
Regards.
@admin
admin
20 Nov 2012, 17:31
We are looking into it, for the time being please use a different static position.
@admin