public static int LoadPriceOHLC(MqlRates price) { LoadPrice(price.open, price.time, 0, 0, price.spread); if (price.close > price.open) { LoadPrice(price.low, price.time, 0, 0, price.spread); LoadPrice(price.high, price.time, 0, 0, price.spread); } else { LoadPrice(price.high, price.time, 0, 0, price.spread); LoadPrice(price.low, price.time, 0, 0, price.spread); } return(LoadPrice(price.close, price.time, price.tick_volume, price.real_volume, price.spread)); }
static void Main(string[] args) { var dados = MqlRates.GetDados(); SetupType(); for (int i = 0; i < dados.Count; i++) { int size = LoadPriceOHLC(dados[i]); } for (int i = 0; i < renko_buffer.Count; i++) { Console.WriteLine("time: {0}, open: {1}, high: {2}, low: {3}, close: {4}, tick_volume: {5}, spread: {6}, real_volume: {7}, Direction: {8}", renko_buffer[i].time, renko_buffer[i].open, renko_buffer[i].high, renko_buffer[i].low, renko_buffer[i].close, renko_buffer[i].tick_volume, renko_buffer[i].spread, renko_buffer[i].real_volume, (renko_buffer[i].open < renko_buffer[i].close ? "Up" : "Down")); } Console.Read(); }