Dukascopy
 
 
Wiki JStore Search Login

Can`t Search History candle
 Post subject: Can`t Search History candle Post rating: 0   Post Posted: Sun 30 Nov, 2014, 02:45 

User rating: 0
Joined: Sat 08 Dec, 2012, 12:32
Posts: 6
Location: United KingdomUnited Kingdom
HI
My strategy work by taking the first price from the ( week open price candle) and according to that the signals appear
the problem is I have to keep it on the chart from the start of the week and if I close it and put it again any time within the week, then the signals appear with wrong value since I can`t read the candle history
---------------------------------------------------
Is there a way to read all the ticks from the start of the week then see the current price tick by tick ?


 
 Post subject: Re: Can`t Search History candle Post rating: 1   Post Posted: Mon 01 Dec, 2014, 10:51 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Hi,

The description provided is too short but we'll try to help you but with the use of visual Jforex platform (as this is a VJF forum):
You can start your strategy in the middle of the week and you 'grab' the candle of X period that is related to the market opening (Sunday night). You need to use a block called 'Get Historical Candle' and specify the shift value so that you retrieve the right candle depending on the default trading period to be used.

If you look for the method to be used in Jforex (Java coded strategy) please re-post your question under 'Automated trading' forum.
FYI: A strategy could be programmed to start/Stop automatically for a specific time (Market opening/closing for instance)

Hope this helps...


 
 Post subject: Re: Can`t Search History candle Post rating: 0   Post Posted: Mon 01 Dec, 2014, 16:54 

User rating: 0
Joined: Sat 08 Dec, 2012, 12:32
Posts: 6
Location: United KingdomUnited Kingdom
thanks for your help
of course my strategy with Visual JForex
I tried to do as U said , but I still can`t specify the last candles in order
I tried this :
1- make a variable with the name of PrevPrice
2- name the first candle ( weekly open price )
3- see that candle time and look if it`s equal the current time or not
4- IF not ,, then PrevPrice = Next tick price after the week open ( Which I can`t specify )
how can I do it with visual Jforex ?


 
 Post subject: Re: Can`t Search History candle Post rating: 1   Post Posted: Tue 02 Dec, 2014, 14:00 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Hi there,

I did not followed your description in doing the attached example but I think that my method is quite simple: It consists of applying a filter to get the value of the first candle of Sunday @22GMT and save its open price. Another options could be figured out depending on your needs.

Thanks


Attachments:
Market_Opening.vfs [20.84 KiB]
Downloaded 162 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.
 
 Post subject: Re: Can`t Search History candle Post rating: 0   Post Posted: Tue 02 Dec, 2014, 14:26 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Hi,

If you're looking for a function that retrieves the market open price at any time, then you might be interested in the attached sample.

Thanks


Attachments:
MOpening_Advanced.vfs [28.68 KiB]
Downloaded 151 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.
 
 Post subject: Re: Can`t Search History candle Post rating: 0   Post Posted: Tue 02 Dec, 2014, 23:44 

User rating: 0
Joined: Sat 08 Dec, 2012, 12:32
Posts: 6
Location: United KingdomUnited Kingdom
Hi Mr.amine
Thanks For your help I really appreciate it
your files helped me to get the first ( 10 sec candle ) after the market open
but now I`m stuck with infinite loop
by this loop I can read all 10 sec candles from the market open time until the current one
but Visual jforex reject it ,, is there a way to get over it ?


Attachments:
FirstCandelTime.vfs [35 KiB]
Downloaded 172 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.
 
 Post subject: Re: Can`t Search History candle Post rating: 1   Post Posted: Wed 03 Dec, 2014, 10:48 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Hi there,

Well, it good that the sample that I sent you was useful but I have couple of questions / remarks in order to understand your strategy:
- Why you need to get all 10 sec candle times since market opening ??
- If you're trying to get candle data (prices) based on 10 sec period this would represent a huge amount of data unless you have an additional condition that will filter out the useless checks.
- You need to keep an eye on the strategy performance as it may consume considerable CPU resources and can be stopped unexpectedly. To do so, you have to optimize the strategy code in order to avoid useless conditions / loops.
- Endless loops can't be considered in programming, I need a thorough description of the functions that you need to achieve to be able to help you.
- Any custom variable created should have a start value (to be set in the contextual right click menu of the variable)
- Your "shiftNumber" variable doesn't have a start / end values and the shift is always used with positive numbers.

thanks


 

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