How to import custom API modules into Bookmap

Custom indicators, trading strategies, data export and recording and more...
Serg
Posts: 94
Joined: Mon Jun 11, 2018 12:40 pm
Has thanked: 13 times
Been thanked: 23 times

How to import custom API modules into Bookmap

Post by Serg » Tue Oct 30, 2018 10:37 pm

A recommended background for this post is: Step 1

First, you need to obtain the jar file that contains custom API module(s). To get the example collection of custom modules, visit its Github page, and download the jar file from the "releases" tab as shown below. If you have your own Jar file, then skip this step.

00.png
00.png (57.06 KiB) Viewed 1900 times
00-1.png
00-1.png (33.96 KiB) Viewed 1900 times
Step 2

Launch Bookmap, click Settings->API plugins configuration, then click on Add button, navigate to your Jar file, select, click Open:

12.png
12.png (49.34 KiB) Viewed 1900 times
Step 3

Since the Jar file may include more than a single custom module, select the module you wish to load. Let's use ATR Trailing Stop indicator first. Select it and click Load:

13.png
13.png (49.88 KiB) Viewed 1900 times

Step 4

The configuration panel may be empty until the custom module is enabled (this will be fixed soon). Enable it using the checkbox on the left side and then you can start using and configuring it:

14.png
14.png (310.97 KiB) Viewed 1900 times
Step 5

Enjoy!

Tags:

kahwai
Posts: 9
Joined: Fri Dec 07, 2018 12:55 am
Been thanked: 1 time

Re: How to import custom API modules into Bookmap

Post by kahwai » Fri Dec 07, 2018 12:57 am

My "Add" button in "Strategies Configuration" dialog is disabled, how can I activate it for importing API module?

SuperDriveGuy
Posts: 37
Joined: Thu Nov 01, 2018 1:50 pm
Has thanked: 24 times
Been thanked: 5 times

Re: How to import custom API modules into Bookmap

Post by SuperDriveGuy » Fri Dec 07, 2018 7:49 am

Hi Kahwai,
Send a email to support asking for it(adding indicators) to be enabled for you.
Regards,
SDG

-----------------
API Requirements, limitations, and known bugs

Post by Serg » Fri Nov 02, 2018 6:38 pm
Requirements

Installed Bookmap version must be 7.0 build 49 or above.
Your Bookmap license should be enabled for API. Until the self-enabling mechanism is ready, please send a request to [email protected] and include either your license key or Bookmap registration email.
-----------------------------------------------

kahwai
Posts: 9
Joined: Fri Dec 07, 2018 12:55 am
Been thanked: 1 time

Re: How to import custom API modules into Bookmap

Post by kahwai » Fri Dec 07, 2018 6:45 pm

SuperDriveGuy wrote:
Fri Dec 07, 2018 7:49 am
Hi Kahwai,
Send a email to support asking for it(adding indicators) to be enabled for you.
Regards,
SDG

-----------------
API Requirements, limitations, and known bugs

Post by Serg » Fri Nov 02, 2018 6:38 pm
Requirements

Installed Bookmap version must be 7.0 build 49 or above.
Your Bookmap license should be enabled for API. Until the self-enabling mechanism is ready, please send a request to [email protected] and include either your license key or Bookmap registration email.
-----------------------------------------------
Thanks!

rubys
Posts: 5
Joined: Sun Jan 20, 2019 9:16 am
Has thanked: 2 times

Re: How to import custom API modules into Bookmap

Post by rubys » Sun Jan 20, 2019 11:36 am

Serg wrote:
Tue Oct 30, 2018 10:37 pm
Launch Bookmap, click Settings->Strategies, then click on Add button, navigate to your Jar file, select, click Open:
Hi Serg,
I probably missing something but I don't have 'Strategies' option under the 'Settings' menu as you can see here:
Capture.PNG
Capture.PNG (87.79 KiB) Viewed 1207 times
I'm using Bookmap version 7.0.0 build 55.

What am I missing?
Thanks

Serg
Posts: 94
Joined: Mon Jun 11, 2018 12:40 pm
Has thanked: 13 times
Been thanked: 23 times

Re: How to import custom API modules into Bookmap

Post by Serg » Mon Jan 21, 2019 5:41 am

rubys wrote:
Sun Jan 20, 2019 11:36 am
Serg wrote:
Tue Oct 30, 2018 10:37 pm
Launch Bookmap, click Settings->Strategies, then click on Add button, navigate to your Jar file, select, click Open:
...I don't have 'Strategies' option under the 'Settings' menu as you can see here:
This menu item was renamed in the last build into "API plugins configuration". Thanks, I updated the first post accordingly.

Sire
Posts: 3
Joined: Fri Feb 01, 2019 12:04 am

Re: How to import custom API modules into Bookmap

Post by Sire » Fri Feb 01, 2019 12:15 am

Hi Serg,

After activation of the API via bookmap support, and download of the demo com-bookmap-api-simple-demo-1.1 file, when activating moving average or others for the /[email protected]_CME , the following alert message appears.

I'm running bookmap version 7.0.0 build:60 with dxfeed/CME

Any idea ?




java.lang.RuntimeException: Error while changing checkbox state
at velox.api.layer1.simplified.SimplifiedL1ApiLoader.onStrategyCheckboxEnabled(SimplifiedL1ApiLoader.java:1371)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at velox.bookmap.dc.invoke(SourceFile:60)
at com.sun.proxy.$Proxy24.onStrategyCheckboxEnabled(Unknown Source)
at velox.bookmap.Di.a(SourceFile:600)
at velox.bookmap.Di.a(SourceFile:354)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.JToggleButton$ToggleButtonModel.setPressed(JToggleButton.java:308)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6533)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6298)
at java.awt.Container.processEvent(Container.java:2236)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2294)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
at java.awt.Container.dispatchEventImpl(Container.java:2280)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.awt.EventQueue$4.run(EventQueue.java:729)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at velox.bookmap.Nd.dispatchEvent(SourceFile:606)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.NullPointerException
at velox.api.layer1.simplified.SimplifiedL1ApiLoader.lambda$onStrategyCheckboxEnabled$4(SimplifiedL1ApiLoader.java:1351)
at velox.api.layer1.layers.Layer1ApiInjectorRelay.lambda$inject$0(SourceFile:45)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

AndreyR
Posts: 53
Joined: Mon Jul 09, 2018 11:18 am
Has thanked: 4 times
Been thanked: 17 times

Re: How to import custom API modules into Bookmap

Post by AndreyR » Fri Feb 01, 2019 11:35 am

Hi Sire
Using strategies/indicators with DXFEED is blocked at the moment. Maybe it will be allowed in future, maybe not.

fundraiser
Posts: 1
Joined: Thu Feb 14, 2019 2:50 pm

Re: How to import custom API modules into Bookmap

Post by fundraiser » Fri Feb 15, 2019 5:04 pm

May I please get more info on ''Market maker'' indicator/strategy because I activated it and it ran a couple of trades without my knowledge...Is there a description on how it generates signals, thanks.

AndreyR
Posts: 53
Joined: Mon Jul 09, 2018 11:18 am
Has thanked: 4 times
Been thanked: 17 times

Re: How to import custom API modules into Bookmap

Post by AndreyR » Mon Mar 04, 2019 10:34 am

Hi fundraiser
'Market maker' is a demo trading strategy. 'Trading strategy' here means this module is able to place orders. In general, 'strategies' can place orders, 'indicators' just draw lines and/or calculate data. 'Demo' means the source code is there to give developers ideas how the code can be used in their own strategies. To be safe, never run a strategy in real mode before having it examined in simulation mode so you know what you're doing.
Let's take a look at the 'Market maker' source code.
Line 29 says it is a Layer1TradingStrategy, and once you've seen 'trading strategy' you have got to know this module will place orders.
Understanding the rest of its code requires some developing background. Anyway, you are welcome to ask questions about the source code.

Post Reply