Post
Topic
Board Project Development
Re: Qt Bitcoin Trader [Open Source secure trading client for Mac/Windows/Linux]
by
burza625
on 16/02/2023, 19:52:19 UTC
Hello,

Is it possible to add an Event/Function "LastMyPrice" wchich would by a combination of "LastMyBuyPrice" and "LastMySellPrice". What I mean is to get value of my last transaction without separating it to ask or bid.

   Egsample 1:

10:00 0.1 BTC sold     at 3700 $
  9:50 0.2 BTC sold     at 3500 $
  9:40 0.1 BTC bought at 3400 $

"LastMyPrice" is 3700.

   Egsample 2:

10:00 0.1 BTC bought at 2500 $
  9:50 0.2 BTC sold     at 3000 $
  9:40 0.1 BTC bought at 2700 $

"LastMyPrice" is 2500.

Existing Event/Function "MyLastTrade" is without value of the transaction.

You will able to fetch and analyze separated orders in next version of script language.

I'm refreshing the topic. Is there any possibility to select the transaction value of my last order whether it is a buy or a sell? Maybe it's possible to use, for example, javascript commands? At the moment I am using this script:

Code:
if (Math.abs(trader.get("LastMyBuyPrice") - trader.get("LastPrice")) < Math.abs(trader.get("LastMySellPrice") - trader.get("LastPrice")))
{
var MojOstatniKurs_ASTBTC = trader.get("LastMyBuyPrice");
}

if (Math.abs(trader.get("LastMyBuyPrice") - trader.get("LastPrice")) > Math.abs(trader.get("LastMySellPrice") - trader.get("LastPrice")))
{
var MojOstatniKurs_ASTBTC = trader.get("LastMySellPrice");
}

but I realize that this is not an optimal solution due to exchange rate fluctuations between LastMyBuyPrice and LastMySellPrice.