Dukascopy Support Board
http://www.dukascopy.com/swiss/english/forex/jforex/forum/

I need EET candle values (OHLC) using Visual JForex
http://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=146&t=55375
Page 1 of 1

Author:  frangonve [ Thu 27 Jul, 2017, 18:29 ]
Post subject:  I need EET candle values (OHLC) using Visual JForex

I need EET candle values (OHLC) for a Visual JForex strategy. I could "hack" the java code in JForex adding

private JFTimeZone myJFTimeZone = JFTimeZone.EET;
private Period myPeriod = Period.createCustomPeriod(Unit.Day,1,myJFTimeZone);

and modifying the references: from Period.DAILY to myPeriod

It works for Get Historical Candle blocks, but when trying to use values from the last unfinished EET daily bar an exception stops the strategy.

What do you suggest?

Francisco

Author:  amine_chourou [ Fri 28 Jul, 2017, 08:39 ]
Post subject:  Re: I need EET candle values (HLOC) using Visual JForex

Hi there,

As you noticed VJF works with GMT but we'll check the tech team regarding your concern.
Can you send this strategy so that we can check this error ?

Thanks

Author:  frangonve [ Fri 28 Jul, 2017, 14:47 ]
Post subject:  Re: I need EET candle values (HLOC) using Visual JForex

Thanks for your answer.

I've prepared a simple example to reproduce the exception:

In Visual JForex I've setup a strategy retrieving the last finished daily candle (shift 1) for the default instrument, and retrieving the unfinished daily candle too (shift 0).

Image

Then I've modified the java code to print the open value of both candles in the console (mod1). It runs ok in JForex.

The second modification was to change the timezone of the daily candles to EET and then printing only the last finished EET daily candle open value (mod2). It runs ok in JForex.

The third modification was to printing both candles: the last finished EET daily candle open value and the unfinished EET daily candle open too (mod3). It stops with an exception in JForex.

Please find enclosed the code in the attached file.

Best regards

Francisco

Attachments:
TestforUnfinishedCandleExceptionMod3.zip [204.84 KiB]
Downloaded 119 times

Author:  amine_chourou [ Thu 03 Aug, 2017, 14:38 ]
Post subject:  Re: I need EET candle values (HLOC) using Visual JForex

Hi there,

it's strange because when I test the file you sent I have no exceptions with the values printed normally. No exception and no modifications made ..
here is the print:
2017-08-03 13:37:50 _LastFinishedCandle Open:1.18014
2017-08-03 13:37:50 _UnfinishedCandle Open:1.18555
2017-08-03 13:37:40 _LastFinishedCandle Open:1.18014
2017-08-03 13:37:40 _UnfinishedCandle Open:1.18555
2017-08-03 13:37:30 _LastFinishedCandle Open:1.18014
2017-08-03 13:37:30 _UnfinishedCandle Open:1.18555
2017-08-03 13:37:21 _LastFinishedCandle Open:1.18014
2017-08-03 13:37:21 _UnfinishedCandle Open:1.18555

Tested in JForex 3.2.13

Author:  frangonve [ Thu 03 Aug, 2017, 17:14 ]
Post subject:  Re: I need EET candle values (HLOC) using Visual JForex

Thanks for your help:

That's weird!

I'm using the same version of jforex (3.2.13) under windows 8.1.

Francisco

Author:  frangonve [ Fri 11 Aug, 2017, 03:02 ]
Post subject:  Re: I need EET candle values (HLOC) using Visual JForex

Hello,
Here are the messages that I get when running the strategy:

01:54:31 Strategy "TestingCustomPeriod3" is stopped at 2017-08-11 01:54:31.571 GMT on the local computer with parameters "defaultTakeProfit:"=[50], "defaultInstrument:"=[EUR/USD], "defaultSlippage:"=[5], "defaultTradeAmount:"=[0.001], "defaultStopLoss:"=[25], "defaultPeriod:"=[Daily]. Reason: Stopped by Engine
01:54:31 Stopping "TestingCustomPeriod3" strategy at 2017-08-11 01:54:31.046 GMT on the local computer
01:54:30 java.lang.NullPointerException @ com.dukascopy.visualforex.visualjforex.TestingCustomPeriod3.GetHistoricalCandle_block_10(TestingCustomPeriod3.java:209)
01:54:29 Strategy "TestingCustomPeriod3" Strategy ID: 83B0432AB59838013B0812192D06B0AA is started at 2017-08-11 01:54:29.962 GMT on the local computer with parameters "defaultTakeProfit:"=[50], "defaultInstrument:"=[EUR/USD], "defaultSlippage:"=[5], "defaultTradeAmount:"=[0.001], "defaultStopLoss:"=[25], "defaultPeriod:"=[Daily]
01:54:29 Starting "TestingCustomPeriod3" strategy at 2017-08-11 01:54:29.906 GMT on the local computer


Cheers
Francisco

Author:  Alexander_Bogdanov [ Fri 29 Sep, 2017, 08:25 ]
Post subject:  Re: I need EET candle values (HLOC) using Visual JForex

frangonve, do you solve problem with EET candles? i havethe same problem, i need indicator that use EET candles insted GMT .

Author:  frangonve [ Mon 23 Oct, 2017, 05:29 ]
Post subject:  Re: I need EET candle values (HLOC) using Visual JForex

Alexander_Bogdanov wrote:
frangonve, do you solve problem with EET candles? i havethe same problem, i need indicator that use EET candles insted GMT .


I still have the problem with exceptions using EET unfinished candles in my main laptop (Windows 8.1) and my VPS (Windows Server 2008 R2), but it works in my secondary laptop (Windows 10 home)

Author:  frangonve [ Mon 30 Oct, 2017, 13:45 ]
Post subject:  Re: I need EET candle values (HLOC) using Visual JForex

I've upgraded my VPS from Windows Server 2008 to Windows Server 2012, and now the test program works well.

Author:  agodidom [ Mon 30 Oct, 2017, 17:20 ]
Post subject:  Re: I need EET candle values (HLOC) using Visual JForex

If i add:
private JFTimeZone myJFTimeZone = JFTimeZone.EET;
private Period myPeriod = Period.createCustomPeriod(Unit.Day,1,myJFTimeZone);

and
modify the references in gethistoricalcandles and indicators: from Period.DAILY to myPeriod

the strategy does not open any trade during backtests.
Help ! I need 5 daily candle during the week

Author:  frangonve [ Tue 31 Oct, 2017, 16:04 ]
Post subject:  Re: I need EET candle values (HLOC) using Visual JForex

Unfortunately after upgrading my main laptop from Windows 8.1 to Windows 10 home, the test program still has the same problem.

Author:  amine_chourou [ Tue 31 Oct, 2017, 17:23 ]
Post subject:  Re: I need EET candle values (HLOC) using Visual JForex

agodidom wrote:
If i add:
private JFTimeZone myJFTimeZone = JFTimeZone.EET;
private Period myPeriod = Period.createCustomPeriod(Unit.Day,1,myJFTimeZone);

and
modify the references in gethistoricalcandles and indicators: from Period.DAILY to myPeriod

the strategy does not open any trade during backtests.
Help ! I need 5 daily candle during the week



Please refer to automated trading section in this forum.

  Page 1 of 1