How to update Trade Status panel

Custom indicators, trading strategies, data export and recording and more...
hesaid
Posts: 21
Joined: Tue Sep 01, 2020 12:34 pm
Has thanked: 1 time
Been thanked: 1 time

How to update Trade Status panel

Post by hesaid » Mon Sep 06, 2021 7:57 pm

Hello,
How can I update trade panel components (Position, P&L, etc.) with my own values? 
Thanks 

Svyatoslav
Site Admin
Posts: 278
Joined: Mon Jun 11, 2018 11:44 am
Has thanked: 2 times
Been thanked: 31 times

Re: How to update Trade Status panel

Post by Svyatoslav » Tue Sep 07, 2021 10:37 am

Hi. If you are writing a Layer0 adapter (connector) you can send updates via onStatus and onBalance callbacks.

hesaid
Posts: 21
Joined: Tue Sep 01, 2020 12:34 pm
Has thanked: 1 time
Been thanked: 1 time

Re: How to update Trade Status panel

Post by hesaid » Tue Sep 07, 2021 3:52 pm

Ok. Thank you, Svyatoslav!

hesaid
Posts: 21
Joined: Tue Sep 01, 2020 12:34 pm
Has thanked: 1 time
Been thanked: 1 time

Re: How to update Trade Status panel

Post by hesaid » Tue Sep 07, 2021 7:31 pm

Hi Svyatoslav!
Update after a short research.
I need implememtation in @Layer1Injectable (extends Layer1ApiInjectorRelay) class. I have implemented BalanceListener, PositionListener interfaces - no effect. onStatus, onBalance, onPositionUpdate aren't called.

Thanks

Svyatoslav
Site Admin
Posts: 278
Joined: Mon Jun 11, 2018 11:44 am
Has thanked: 2 times
Been thanked: 31 times

Re: How to update Trade Status panel

Post by Svyatoslav » Wed Sep 08, 2021 7:17 am

Hi. Is your intention to listen for that data or to send this data into bookmap?
Please note, that when selecting the 1st or 2nd mode on the launchpad (trading simulated by bookmap) you will not receive those events in your indicators since simulated trading layer just does not currently support that. We'll eventually improve the simulation, but I can't tell you when that will happen. Until then it's best to use server-side simulations, such as paper trading accounts.
Also note that Layer1Injectable is core API annotation and PositionListener / BalanceListener are classes from simplified API. So they won't do anything outside of simplified.

hesaid
Posts: 21
Joined: Tue Sep 01, 2020 12:34 pm
Has thanked: 1 time
Been thanked: 1 time

Re: How to update Trade Status panel

Post by hesaid » Wed Sep 08, 2021 9:35 am

The main purpose is to send positon,balance updates from external source to bookmap and display them in trading panel namely in a separate thread I get repetive events which I'd like to push to the position/balance listener

Post Reply