compile error in writing to file in QuotesDelta.java
Posted: Mon Dec 30, 2019 1:09 am
Following clearly written "Developing with Bookmap API(step-by-step)",
small changes in code "QuotesDelata.java" like
"line1.setColor(Color.Gray)" instead of Color.Orange
are successfully exported into jar and imported into Bookmap through
settings -> Api plugins configuration.
Goal is: communicate order book and trade data through TCP into C# and python program for my
deep learning algorithm based on orderbook and trade data through TCP communication.
As a first step to achieve this goal,
I modified QuotesDelta.java
1. import java.io.FileWriter; // Import the FileWriter class
import java.io.IOException; // Import the IOException class to handle errors
2. modified onDepth method as
@Override
public void onDepth(boolean isBid, int price, int size) {
int prevSize = book.onDepth(isBid, price, size);
if (snapshotCompleted) {
int delta = size - prevSize;
if (isBid) {
bidDelta += delta;
} else {
askDelta += delta;
}
FileWriter myWriter = new FileWriter("D:\\filename3.txt",true); // ERROR!
}
}
In exporting compile error is reported.
What is cause of this error?
I have checked FileWriter statement in independent separate java.
small changes in code "QuotesDelata.java" like
"line1.setColor(Color.Gray)" instead of Color.Orange
are successfully exported into jar and imported into Bookmap through
settings -> Api plugins configuration.
Goal is: communicate order book and trade data through TCP into C# and python program for my
deep learning algorithm based on orderbook and trade data through TCP communication.
As a first step to achieve this goal,
I modified QuotesDelta.java
1. import java.io.FileWriter; // Import the FileWriter class
import java.io.IOException; // Import the IOException class to handle errors
2. modified onDepth method as
@Override
public void onDepth(boolean isBid, int price, int size) {
int prevSize = book.onDepth(isBid, price, size);
if (snapshotCompleted) {
int delta = size - prevSize;
if (isBid) {
bidDelta += delta;
} else {
askDelta += delta;
}
FileWriter myWriter = new FileWriter("D:\\filename3.txt",true); // ERROR!
}
}
In exporting compile error is reported.
What is cause of this error?
I have checked FileWriter statement in independent separate java.