Dukascopy
 
 
Wiki JStore Search Login

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.

Problem with getBars()
 Post subject: Problem with getBars() Post rating: 0   New post Posted: Mon 20 Aug, 2012, 18:47 
User avatar

User rating: 0
Joined: Thu 16 Jun, 2011, 21:37
Posts: 98
Location: SwitzerlandSwitzerland
Hi everyone,

of recent my code has been producing some warnings:
Aug 20, 2012 1:17:25 PM com.dukascopy.api.impl.Indicators calculateIndicator
WARNING: There is not enough data to calculate value for MFI

and my backtests have been grinding to a halt.

When I open VisualVM the cpu time is getting used primarily by com.dukascopy.dds2.greed.agent.strategy.tester.TesterHistory.getBars().
The next process which is using a lot of cpu time is mina SocketConnectoror$Worker.run()

To the best of my knowledge all calculate indicator calls are wrapped in try catch blocks, but I cannot seem to track down where this is coming from. I am doing quite a bit of calculation on every tick using shift 0 to get the current bar value. Could the problem be somehow be coming from that (even though it doesn't seem to have given me problems in the past)?

Thanks,
MM


 
 Post subject: Re: Problem with getBars() Post rating: 0   New post Posted: Mon 20 Aug, 2012, 23:46 
User avatar

User rating: 0
Joined: Thu 16 Jun, 2011, 21:37
Posts: 98
Location: SwitzerlandSwitzerland
After reading this post: viewtopic.php?f=88&t=46420&p=62177&hilit=not+enough+data+to+calculate#p62177

I was able to track down the problem to getting indicators using the retrieval of indicators using a shift of 0 on 2 second bars. It seems that when the bar is flat (no volume) the indicator values are returned as NaN (not a number).

Now to work on a solution :)


 

Jump to:  

  © 1998-2025 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com