Page 1 of 2

How to import custom API modules into Bookmap

Posted: Tue Oct 30, 2018 10:37 pm
by Serg
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 35323 times
00-1.png
00-1.png (33.96 KiB) Viewed 35323 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 35323 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 35323 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 35323 times
Step 5

Enjoy!

Re: How to import custom API modules into Bookmap

Posted: Fri Dec 07, 2018 12:57 am
by kahwai
My "Add" button in "Strategies Configuration" dialog is disabled, how can I activate it for importing API module?

Re: How to import custom API modules into Bookmap

Posted: Fri Dec 07, 2018 7:49 am
by SuperDriveGuy
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.
-----------------------------------------------

Re: How to import custom API modules into Bookmap

Posted: Fri Dec 07, 2018 6:45 pm
by kahwai
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!

Re: How to import custom API modules into Bookmap

Posted: Sun Jan 20, 2019 11:36 am
by rubys
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 34831 times
I'm using Bookmap version 7.0.0 build 55.

What am I missing?
Thanks

Re: How to import custom API modules into Bookmap

Posted: Mon Jan 21, 2019 5:41 am
by Serg
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.

Re: How to import custom API modules into Bookmap

Posted: Fri Feb 01, 2019 12:15 am
by Sire
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 /GCJ9@DXFEED_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)

Re: How to import custom API modules into Bookmap

Posted: Fri Feb 01, 2019 11:35 am
by Andry API support
Hi Sire
Using strategies/indicators with DXFEED is blocked at the moment. Maybe it will be allowed in future, maybe not.

Re: How to import custom API modules into Bookmap

Posted: Fri Feb 15, 2019 5:04 pm
by fundraiser
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.

Re: How to import custom API modules into Bookmap

Posted: Mon Mar 04, 2019 10:34 am
by Andry API support
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.