|
Attention! Read the forum rules carefully before posting a topic.
Try to find an answer in Wiki before asking a question. Submit programming questions in this forum only. Off topics are strictly forbidden.
Any topics which do not satisfy these rules will be deleted.
Total marklet depht data not true. |
NightOwl
|
Post subject: Total marklet depht data not true. |
Post rating: 0
|
Posted: Tue 05 Jun, 2018, 15:45
|
|
User rating: 4
Joined: Wed 23 May, 2018, 20:08 Posts: 44 Location: FinlandFinland
|
Hello, I am using tick.getTotalBidVolume(); & tick.getTotalAskVolume(); as you can see the information Dukascopy servers gives me is not always true, in fact, it is quite often wrong and does not match with the information that JForex Application gives me. Why, please? Also here is the code for setting my stop losses order = engine.submitOrder("EBIN" + System.currentTimeMillis(), Instrument.EURUSD, IEngine.OrderCommand.BUY, 0.1, 0, 10, tick.getAsk() - 10 * Instrument.EURUSD.getPipValue(), tick.getAsk() + 30 * Instrument.EURUSD.getPipValue(), 0, "EBIN"); The stop loss is not always accepted by the server, resulting only in a payment of the spread. What is the cause for this, can you tell me please? Also, when my strategy should put SELL orders with a STOP LOSS of X, they only result in payment of spread and the servers only accept my LONG positions, resulting in a win, what would have otherwise been a lost. Server-Side-Trickery, I can not blame, but the day I put money on this strategy is not near, because now this is profitable because of a server that does not follow my orders. EDIT: Sorry for the misleading title, the data is true, but it totally changes from the expected value of "200" to "1".  
Attachments: |
csfds.PNG [1.24 KiB]
Downloaded 278 times
|
what.PNG [1.31 KiB]
Downloaded 303 times
|
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on
this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control
on their content. Anyone accessing this webpage and downloading or otherwise making use of any document,
data or information found on this webpage shall do it on his/her own risks without any recourse against
Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from
the use and/or reliance on any document, data or information found on this webpage.
|
|
|
|
|
 |
API Support
|
Post subject: Re: Total marklet depht data not true. |
Post rating: 0
|
Posted: Wed 06 Jun, 2018, 15:38
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
Total Ask/Total Bid volume cannot have such volume. It's more like a volume of one level. https://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=65&t=56520 In this topic we already discussed about correct Market Depth comparison. Most likely you use another strategy, which requests totally different data, not related to tick Total Ask/Bid volumes. Quote: The stop loss is not always accepted by the server, resulting only in a payment of the spread. What is the cause for this, can you tell me please? This can be caused by many reasons. If you will provide your code sample - I can tell more.
|
|
|
|
 |
NightOwl
|
Post subject: Re: Total marklet depht data not true. |
Post rating: 0
|
Posted: Wed 06 Jun, 2018, 15:47
|
|
User rating: 4
Joined: Wed 23 May, 2018, 20:08 Posts: 44 Location: FinlandFinland
|
public void onTick(Instrument instrument, ITick tick) throws JFException { if (instrument != this.instrument) { return; } double A = tick.getTotalAskVolume(); double B = tick.getTotalBidVolume(); double C = XXXXXXXXXX if (XXXXXXX) { console.getOut().println(" Total Ask Volume: " + A + " Total Bid Volume: " + B + " BUY "); order = engine.submitOrder("EBIN" + System.currentTimeMillis(), Instrument.EURUSD, IEngine.OrderCommand.BUY, 0.1, 0, 10, tick.getAsk() - 10 * Instrument.EURUSD.getPipValue(), tick.getAsk() + 30 * Instrument.EURUSD.getPipValue(), 0, "EBIN");
} else if (XXXXXXXXXXX) { console.getOut().println(" Total Ask Volume: " + A + " Total Bid Volume: " + B + " SELL "); order = engine.submitOrder("EBIN" + System.currentTimeMillis(), Instrument.EURUSD, IEngine.OrderCommand.SELL, 0.1, 0, 10, tick.getBid() - 10 * Instrument.EURUSD.getPipValue(), tick.getBid() + 30 * Instrument.EURUSD.getPipValue(), 0, "EBIN");
} } This data looks normal "Total Bid Volume: 200" etc. until it starts to place bids, then the value shown in console changes to "Total bid Volume: 1 " for example.
|
|
|
|
 |
API Support
|
Post subject: Re: Total marklet depht data not true. |
Post rating: 0
|
Posted: Wed 06 Jun, 2018, 16:19
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
|
|
|
 |
NightOwl
|
Post subject: Re: Total marklet depht data not true. |
Post rating: 0
|
Posted: Wed 06 Jun, 2018, 16:50
|
|
User rating: 4
Joined: Wed 23 May, 2018, 20:08 Posts: 44 Location: FinlandFinland
|
Multi-currency issue solved, thank you!
|
|
|
|
 |
NightOwl
|
Post subject: Re: Total marklet depht data not true. |
Post rating: 0
|
Posted: Wed 06 Jun, 2018, 18:45
|
|
User rating: 4
Joined: Wed 23 May, 2018, 20:08 Posts: 44 Location: FinlandFinland
|
order = engine.submitOrder("EBIN" + System.currentTimeMillis(), Instrument.EURUSD, IEngine.OrderCommand.SELL, 0.1, 0, 10, tick.getBid() + 5 * Instrument.EURUSD.getPipValue(), tick.getBid() -15 * Instrument.EURUSD.getPipValue(), 0, "EBIN");
console.getOut().println(" Total Ask Volume: " + A + " Total Bid Volume: " + B + " BUY "); order = engine.submitOrder("EBIN" + System.currentTimeMillis(), Instrument.EURUSD, IEngine.OrderCommand.BUY, 0.1, 0, 10, tick.getAsk() - 5 * Instrument.EURUSD.getPipValue(), tick.getAsk() + 15 * Instrument.EURUSD.getPipValue(), 0, "EBIN");
I assume this is on OrderCommand.SELL, stop loss +5pips and on ORderCommand.BUY stop loss -5 pips. The orders just blink and pay the spread. So this is what I set my orders to but it still does not register it, what is wrong this time? Can you help me, please? Godspeed, NightwOwl.
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|