Bookmap API price getting process

Custom indicators, trading strategies, data export and recording and more...
Andry API support
Posts: 548
Joined: Mon Jul 09, 2018 11:18 am
Has thanked: 25 times
Been thanked: 85 times

Re: Bookmap API price getting process

Post by Andry API support » Wed Oct 28, 2020 10:24 am

Please try:
7.1.0.53 for 7.1
7.0.0.97 for 7.0

Tags:

DanyloL
Posts: 20
Joined: Mon Oct 19, 2020 12:44 pm
Has thanked: 6 times
Been thanked: 1 time

Re: Bookmap API price getting process

Post by DanyloL » Wed Oct 28, 2020 2:07 pm

AndreyR wrote:
Wed Oct 28, 2020 10:24 am
Please try:
7.1.0.53 for 7.1
7.0.0.97 for 7.0
I changed it to the 7.1.0.53 and it works. Thank you!

DanyloL
Posts: 20
Joined: Mon Oct 19, 2020 12:44 pm
Has thanked: 6 times
Been thanked: 1 time

Re: Bookmap API price getting process

Post by DanyloL » Sat Oct 31, 2020 7:17 am

AndreyR wrote:
Sun Oct 25, 2020 4:54 pm
Hi!
the price you're getting is measured in pips. You need to multiply it by pips value to get the readable price. You can get it from InstrumentInfo object in initialize method.

Code: Select all

@Override
public void initialize(String alias, InstrumentInfo info, Api api, InitialState initialState) {
You can draw lines and show info simultaneously. Take a look at this one.
Just change methods called for graphics in this example for

Code: Select all

graphics.drawString("your text here", ...





Hi again. My new question is about pips and pips value. For some reason, now the price given by the send() method of MarketByOrderDepthDataListener is about right (it seems it rounds the price to an integer value though (3001.75 --> 3002 or 3001)). But if I multiply this given price by the pips value, as you suggested, the price goes down by a factor of 4 (the real price is about 3000 and the shown price is about 750). I'm testing the indicator using replayed data. Can this be the reason of the issue? Or I'm doing something wrong? Thanks 

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

Re: Bookmap API price getting process

Post by Andry API support » Sat Oct 31, 2020 8:37 am

Hi!
For some reason, now the price given by the send() method of MarketByOrderDepthDataListener is about right 
I need to find out what causes such behavior. I have sent you a private message.
 

Post Reply