public int GetBarSize(BarInfo Bar) { if (Bar == null) { return(0); } return(Bar.BarSize); }
public double GetClose(BarInfo Bar) { if (Bar == null) { return(0); } return(TickToPrice(Bar.Close)); }
public double GetLow(BarInfo Bar) { if (Bar == null) { return(0); } return(TickToPrice(Bar.Low)); }
public double GetHigh(BarInfo Bar) { if (Bar == null) { return(0); } return(TickToPrice(Bar.High)); }
public double GetOpen(BarInfo Bar) { if (Bar == null) { return(0); } return(TickToPrice(Bar.Open)); }
public BarInfoView Int2Double(BarInfo bar) { if (bar == null) { return(null); } BarInfoView field = new BarInfoView(); field.Open = Codec.TickToPrice(bar.Open); field.High = Codec.TickToPrice(bar.High); field.Low = Codec.TickToPrice(bar.Low); field.Close = Codec.TickToPrice(bar.Close); field.BarSize = bar.BarSize; return(field); }
public BarInfo Double2Int(BarInfoView bar) { if (bar == null) { return(null); } BarInfo field = new BarInfo(); field.Open = Codec.PriceToTick(bar.Open); field.High = Codec.PriceToTick(bar.High); field.Low = Codec.PriceToTick(bar.Low); field.Close = Codec.PriceToTick(bar.Close); field.BarSize = bar.BarSize; return(field); }
public void SetBarSize(BarInfo Bar, int barSize) { Bar.BarSize = barSize; }
public void SetClose(BarInfo Bar, double price) { Bar.Close = PriceToTick(price); }
public void SetLow(BarInfo Bar, double price) { Bar.Low = PriceToTick(price); }
public void SetHigh(BarInfo Bar, double price) { Bar.High = PriceToTick(price); }
public void SetOpen(BarInfo Bar, double price) { Bar.Open = PriceToTick(price); }