Layer1ApiSoundAlertMessage WARN message help
Posted: Fri Jan 12, 2024 5:43 pm
Version 7.4.0 Build 16
Whenever I call the function below, it works as expected, with the exception that I get a WARN in the Bookmap Log. What do I need to do to get rid of the WARNing. I haven't found any documentation to help on this.
20240111 23:13:11.091(UTC) INFO: [SoundAlertsManager] Obtained: Layer1ApiSoundAlertMessage [textInfo='20240111.18:13:11 : HLine2 6412808779270 8 at 4747.00 ended', showPopup=false, repeatCount=1, repeatDelay=null, alertId='Y1enhPYpRhC9VEZerHauwg==', source=class velox.api.layer1.simplified.demo.RB_CVDImbalancev6, metadata=ESH4.CME@RITHMIC, alias='null', alertDeclarationId='null', priority=0, additionalInfo='null', isCancelMessage=false]
20240111 23:13:11.091(UTC) WARN: Alert message does not specify a linked alert declaration. Messages without declarations will be deprecated in future releases.
public void liquidityLineEndAlert(long t, int mapId, String orderId, long size1, int price1) {
if (settings.enableAlerts == YesNo.YES) {
Date tDate = new Date(t / 1000000);
String str = df2.format(tDate) + String.format(" : HLine%d %s %d at %.2f ended",
mapId, orderId, size1, (double) price1 / 4);
byte[] alertSound = null;
String str2;
if (price1 % 4 == 0)
str2 = String.format("%d at %d ended", size1, price1 / 4);
else if (price1 % 2 == 0)
str2 = String.format("%d at %.1f ended", size1, (double) price1 / 4);
else
str2 = String.format("%d at %.2f ended", size1, (double) price1 / 4);
alertSound = SoundSynthHelper.synthesize(str2);
Layer1ApiSoundAlertMessage msg = new Layer1ApiSoundAlertMessage(alertSound, str, 1, null,
(a, s) -> {
}, this.getClass(), alias);
api.sendUserMessage(msg);
}
}
Whenever I call the function below, it works as expected, with the exception that I get a WARN in the Bookmap Log. What do I need to do to get rid of the WARNing. I haven't found any documentation to help on this.
20240111 23:13:11.091(UTC) INFO: [SoundAlertsManager] Obtained: Layer1ApiSoundAlertMessage [textInfo='20240111.18:13:11 : HLine2 6412808779270 8 at 4747.00 ended', showPopup=false, repeatCount=1, repeatDelay=null, alertId='Y1enhPYpRhC9VEZerHauwg==', source=class velox.api.layer1.simplified.demo.RB_CVDImbalancev6, metadata=ESH4.CME@RITHMIC, alias='null', alertDeclarationId='null', priority=0, additionalInfo='null', isCancelMessage=false]
20240111 23:13:11.091(UTC) WARN: Alert message does not specify a linked alert declaration. Messages without declarations will be deprecated in future releases.
public void liquidityLineEndAlert(long t, int mapId, String orderId, long size1, int price1) {
if (settings.enableAlerts == YesNo.YES) {
Date tDate = new Date(t / 1000000);
String str = df2.format(tDate) + String.format(" : HLine%d %s %d at %.2f ended",
mapId, orderId, size1, (double) price1 / 4);
byte[] alertSound = null;
String str2;
if (price1 % 4 == 0)
str2 = String.format("%d at %d ended", size1, price1 / 4);
else if (price1 % 2 == 0)
str2 = String.format("%d at %.1f ended", size1, (double) price1 / 4);
else
str2 = String.format("%d at %.2f ended", size1, (double) price1 / 4);
alertSound = SoundSynthHelper.synthesize(str2);
Layer1ApiSoundAlertMessage msg = new Layer1ApiSoundAlertMessage(alertSound, str, 1, null,
(a, s) -> {
}, this.getClass(), alias);
api.sendUserMessage(msg);
}
}