package main; import java.awt.*; import com.ib.client.Contract; class allContracts { static final Contract NQ = new Contract( "NQ", "FUT", "200706", 0., "", "GLOBEX", "", "", null); static final Contract ES = new Contract( "ES", "FUT", "200706", 0., "", "GLOBEX", "", "", null); static final Contract ER2 = new Contract( "ER2", "FUT", "200706", 0., "", "GLOBEX", "", "", null); static final Contract YM = new Contract( "YM", "FUT", "200712", 0., "", "ECBOT", "", "", null); static final Contract EUR = new Contract( "EUR", "FUT", "200712", 0., "", "GLOBEX", "", "", null); static final Contract ZN = new Contract( "ZN", "FUT", "200712", 0., "", "ECBOT", "", "", null); static final Contract ZG = new Contract( "ZG", "FUT", "200712", 0., "", "ECBOT", "", "", null); static final Contract QM = new Contract( "QM", "FUT", "200712", 0., "", "NYMEX", "", "", null); static final Contract ZB = new Contract( "ZB", "FUT", "200712", 0., "", "ECBOT", "", "", null); static final Contract INDU = new Contract( "INDU", "IND", "", 0., "", "NYSE", "", "", null); static final Contract NDX = new Contract( "NDX", "IND", "", 0., "", "NASDAQ", "", "", null); static final Contract SPX = new Contract( "SPX", "IND", "", 0., "", "CBOE", "", "", null); static final Contract QG = new Contract( "QG", "FUT", "200411", 0., "", "NYMEX", "", "", null); } class allTimeFrames { // // { rt, v, t, s, m} // // 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711 ... // static final int[][] NQ = { { 55}, { 610, 1597}, {}, {}, { 3}}; static final int[][] ES = { { 34, 89}, { 1597, 4181}, {}, {}, { 3}}; static final int[][] QM = { { 34}, { 233, 610}, {}, {}, { 3}}; static final int[][] EUR = { { 55}, { 377, 987}, {}, {}, { 3}}; static final int[][] YM = { { 34}, { 144, 377}, {}, {}, { 3}}; static final int[][] ZN = { { 55}, { 6765, 17711}, {}, {}, { 3}}; static final int[][] ZG = { { 21}, { 89}, {}, {}, { 3}}; static final int[][] ER2 = { { 21}, { 144}, {}, {}, { 3}}; static final int[][] ZB = { { 34}, { 1597, 2584}, {}, {}, { 3}}; static final int[][] replay_vector = { { 34}, { 1597, 233}, {}, { 30}, { 3}}; } class allChartCoords { static final Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); static final int W = screenSize.width/4; static final int H = screenSize.height/3 -25; static final int[][] NQ = { { 0, 2*H/3, W -16, 2*H/3 -16, 5}}; static final int[][] ES = { { W, H, W, H, 11}, { 2*W, 0, W, H, 4}, { W, 0, W, H, 12}}; static final int[][] QM = { { 3*W, 0, W, 2*H/3, 1}}; static final int[][] EUR = { { 3*W, 2*H/3, W, 2*H/3, 6}}; static final int[][] YM = { { 0, 0, W, 2*H/3, 7}}; static final int[][] ZN = { { 0, 4*H/3, W, H/2, 8}}; static final int[][] ZG = { { 3*W, 4*H/3, W, 2*H/3, 9}}; static final int[][] ER2 = { { 16, 2*H/3 +16, W -16, H -16, 0}}; static final int[][] ZB = { { 0, H, W, 2*H/3, 0}}; } class DataRequest { public Contract contract; double dresol; int[][] charts; int[][] timeframes; String current_file; String cme_symbol; String cme_file; int cme_iparam; DataRequest ( Contract contract, double dresol, int[][] charts, int[][] timeframes, String current_file, String cme_symbol, String cme_file, int cme_iparam) { this.contract = contract; this.dresol = dresol; this.charts = charts; this.timeframes = timeframes; this.current_file = current_file; this.cme_symbol = cme_symbol; this.cme_file = cme_file; this.cme_iparam = cme_iparam; } } public class Parameters { public static final DataRequest[] allDataRequests = { new DataRequest( allContracts.EUR, 0.0001, allChartCoords.EUR, allTimeFrames.EUR, "current_ec.txt", "EC", "gx.imm", 24), new DataRequest( allContracts.YM, 1.0, allChartCoords.YM, allTimeFrames.YM, "current_equity_indexes.txt", "", "", 1), new DataRequest( allContracts.ES, 0.25, allChartCoords.ES, allTimeFrames.ES, "current_equity_indexes.txt", "ES", "gx.iom", 27), new DataRequest( allContracts.ER2, 0.10, allChartCoords.ER2, allTimeFrames.ER2, "current_equity_indexes.txt", "ER", "gx.gem", 27), new DataRequest( allContracts.NQ, 0.25, allChartCoords.NQ, allTimeFrames.NQ, "current_equity_indexes.txt", "NQ", "gx.iom", 27), new DataRequest( allContracts.QM, 0.025, allChartCoords.QM, allTimeFrames.QM, "current_crude_oil.txt", "", "", 1), new DataRequest( allContracts.ZN, 0.015625, allChartCoords.ZN, allTimeFrames.ZN, "current_interest_rates.txt", "", "", 1), new DataRequest( allContracts.ZG, 0.10, allChartCoords.ZG, allTimeFrames.ZG, "current_gold.txt", "", "", 1), new DataRequest( allContracts.ZB, 0.03125, allChartCoords.ZB, allTimeFrames.ZB, "current_interest_rates.txt", "", "", 1) }; Parameters () { } }