Bollingers will give decimals for ZT(2yr note)
I have found a bit of code that converts the price markers from decimals to the appropriate fractions. Is there anyway to to get streamwriter to write a line of text that wil have the exact same values as teh price markers i need them in the same format as the order book.
If the price marker outputs 110'750 for x then i want it to write that to a file. But im not sure how to access the pricemarkers, if i call Upper[0], Lower[0], or Close[0] it will give me a decimal.
The code that changes the price markers:
public override string FormatPriceMarker(double price) { double trunc = Math.Truncate(price); int fraction = Convert.ToInt32(320 * Math.Abs(price - trunc) - 0.0001); // rounding down for ZF and ZT string priceMarker = ""; if (TickSize == 0.03125) { fraction = fraction/10; if (fraction < 10) priceMarker = trunc.ToString() + "'0" + fraction.ToString(); else priceMarker = trunc.ToString() + "'" + fraction.ToString(); } else if (TickSize == 0.015625 || TickSize == 0.0078125) { if (fraction < 10) priceMarker = trunc.ToString() + "'00" + fraction.ToString(); else if (fraction < 100) priceMarker = trunc.ToString() + "'0" + fraction.ToString(); else priceMarker = trunc.ToString() + "'" + fraction.ToString(); } else priceMarker = price.ToString(Gui.Globals.GetTickFormatString(Tic kSize)); return priceMarker;
Comment