User rating: 0
Joined: Fri 17 Jan, 2014, 17:43 Posts: 16
|
Hello,
I would like to back up data in a array. For example every minute, a new data I can't exceed the [0] element that resets itself to each new data. My code: // create open variable double open = askBar.getOpen(); System.out.println("open = " + open);
double[] tabOpen = { open };
for (int i = 0; i < tabOpen.length; i++) { System.out.println("Position " + i + " : " + tabOpen[i]); }
Result Instrument: EUR/GBP open 0.70402 close: 0.70403 low 0.70402 high 0.70403 time : 1439907320000 open = 0.70402 Position 0 : 0.70402 Instrument: EUR/GBP open 0.70402 close: 0.70407 low 0.70402 high 0.70407 time : 1439907330000 open = 0.70402 Position 0 : 0.70402 Instrument: EUR/GBP open 0.70408 close: 0.70404 low 0.70404 high 0.70408 time : 1439907340000 open = 0.70408 Position 0 : 0.70408
Thank you for your help Greetings
|
|