Incompatible settings saved in file

Custom indicators, trading strategies, data export and recording and more...
blk
Posts: 44
Joined: Fri Nov 01, 2019 8:59 pm
Has thanked: 7 times

Incompatible settings saved in file

Post by blk » Sun Oct 18, 2020 6:11 pm

Hi,

Is there a way to clear/reset a custom addon settings in order to avoid the following exception?

Code: Select all

 
Your settings may be incompatible with settings saved in file. Do you need to increase settings version?
	at velox.bookmap.bx.getSettings(SourceFile:560)
	at velox.api.layer1.simplified.InstanceWrapper.getSettings(InstanceWrapper.java:632)
Thanks

Andry API support
Posts: 548
Joined: Mon Jul 09, 2018 11:18 am
Has thanked: 25 times
Been thanked: 85 times

Re: Incompatible settings saved in file

Post by Andry API support » Mon Oct 19, 2020 9:28 am

Hi!

Code: Select all

@StrategySettingsVersion(currentVersion = 1, compatibleVersions = {})
This exception says the the module's settings version is incompatible with the current settings version. To make another step we need to know:
- What kind of addon are you loading?
- Is it your addon or Bookmap's addon or somebody's else addon?

blk
Posts: 44
Joined: Fri Nov 01, 2019 8:59 pm
Has thanked: 7 times

Re: Incompatible settings saved in file

Post by blk » Mon Oct 19, 2020 12:49 pm

Hi Andrey,

Thanks for your reply. This is an addon I'm developing and I'm wondering if I can some how reset or override the settings saved on Bookmap and start from scratch?

Code: Select all

@Layer1SimpleAttachable
@Layer1TradingStrategy
@Layer1StrategyName("TestAddon")
@Layer1ApiVersion(Layer1ApiVersionValue.VERSION2)

Andry API support
Posts: 548
Joined: Mon Jul 09, 2018 11:18 am
Has thanked: 25 times
Been thanked: 85 times

Re: Incompatible settings saved in file

Post by Andry API support » Wed Oct 21, 2020 6:35 am

Hi,
is it possible for me to see your settings class? You can send me a private message.

blk
Posts: 44
Joined: Fri Nov 01, 2019 8:59 pm
Has thanked: 7 times

Re: Incompatible settings saved in file

Post by blk » Thu Oct 22, 2020 12:56 pm

Hi Andrey,

I was able to fix the exception by increasing the settings version

Code: Select all


@StrategySettingsVersion(currentVersion = 2, compatibleVersions = {})
I saw that the config.json file inside Bookmap config directory has all the data, is there an easy way to clean up the saved data for any specific addon?

Thanks

Andry API support
Posts: 548
Joined: Mon Jul 09, 2018 11:18 am
Has thanked: 25 times
Been thanked: 85 times

Re: Incompatible settings saved in file

Post by Andry API support » Mon Oct 26, 2020 4:45 pm

Yes. Settings are saved in the configuration file (config.json) and the workspace file (find the latest workspace file name in config.json - it is multiplatform_workspace_file value). Find and remove the settings under the strategy full name.
Backup your Config folder before making changes.
Example with Layer1ApiMarkersDemo
1) getting the workspace file from config.json :

Code: Select all

"multiplatform_workspace_file": "C:\\Bookmap\\Config\\untitled-2020-10-19-15-57-29.bmw",
2) settings saved in Layer1ApiMarkersDemo :

Code: Select all

settingsAccess.setSettings(settingsAlias, INDICATOR_NAME_CIRCLES, settingsObject, settingsObject.getClass());
INDICATOR_NAME_CIRCLES value is the strategy full name in Layer1ApiMarkersDemo:

Code: Select all

private static final String INDICATOR_NAME_CIRCLES = "Order markers";
3) remove the whole block of the "Order markers" settings from both config.json and untitled-2020-10-19-15-57-29.bmw:

Code: Select all

"Order markers": {
"version": 1,
"text": "{\n  \"colors\": {\n    \"Trade markers line\": {\n      \"value\": -65536,\n      \"frgbvalue\": null,\n      \"fvalue\": null,\n      \"falpha\": 0.0,\n      \"cs\": null\n    },\n    \"Markers order circles\": {\n      \"value\": -16711936,\n      \"frgbvalue\": null,\n      \"fvalue\": null,\n      \"falpha\": 0.0,\n      \"cs\": null\n    }\n  }\n}"
},

Post Reply