Dukascopy
 
 
Wiki JStore Search Login

count up candles and down candles
 Post subject: count up candles and down candles Post rating: 0   Post Posted: Fri 17 Jun, 2016, 21:53 
User avatar

User rating: 1
Joined: Tue 24 Feb, 2015, 22:29
Posts: 15
Location: Egypt, Cairo
hi help :)
I tried to count up candles and down candles for the last 10 candles
the variables are on desktop to monitor them
but unfortunately the counters don't work
any suggestions
thank you


Attachments:
forum1.vfs [33.86 KiB]
Downloaded 143 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: count up candles and down candles Post rating: 0   Post Posted: Mon 20 Jun, 2016, 17:55 
Visual JForex expert at Dukascopy
User avatar

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

Please find attached an example:
You should implement a reset at the exit of every loop otherwise the counter will keep on summing.


Attachments:
forum1_V2.vfs [33.98 KiB]
Downloaded 174 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: count up candles and down candles Post rating: 0   Post Posted: Tue 05 Jul, 2016, 13:13 
User avatar

User rating: 1
Joined: Tue 24 Feb, 2015, 22:29
Posts: 15
Location: Egypt, Cairo
THANK YOU VERY MUCH
I noticed that same strategy sometimes run and sometimes not.Is there an end user strategy processor that can test strategies ? can I download the chart data and test my strategy offline? maybe it will be more stable.


 
 Post subject: Re: count up candles and down candles Post rating: 0   Post Posted: Wed 06 Jul, 2016, 17:21 
Visual JForex expert at Dukascopy
User avatar

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

Could you please describe more the way the strategy is launched ? in VJF ? how did you noticed that it is not working ?
I'm afraid offline testing is not possible with VJF as the platform is obviously web based but the historical data is actually downloaded locally in your computer. So it might work when launching the historical tester ..
For info, you can find the cache of the HT here:
C:\Users\YOUR_USER_NAME\AppData\Local\JForex\.cache


 
 Post subject: Re: count up candles and down candles Post rating: 0   Post Posted: Thu 07 Jul, 2016, 00:38 
User avatar

User rating: 1
Joined: Tue 24 Feb, 2015, 22:29
Posts: 15
Location: Egypt, Cairo
my code which I posted here asking "what is wrong with it?" actually works fine!
it has variables on desktop (the counters)
some times it works and the counters take their values
sometimes with same settings I run the strategy but it doesn't work and the variables keep 0 value
this strategy doesn't buy or sell I just wanted to make some kind of statistics
your valuable code also enable practical use
so my question was can I backtest my strategy offline even using some kind of software ?
thank you very much


 
 Post subject: Re: count up candles and down candles Post rating: 0   Post Posted: Thu 07 Jul, 2016, 12:10 
Visual JForex expert at Dukascopy
User avatar

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

Quote:
so my question was can I backtest my strategy offline even using some kind of software ?

There is no third party tool we provide offering offline testing.

Quote:
sometimes with same settings I run the strategy but it doesn't work and the variables keep 0 value

this is due to the fact that the loop cycle is so fast and the variables gets assigned back to 0 out of every cycle. This is normal behavior.
An easy workaround is as attached, simply create new variables that will save the previous values out of every loop and then you can see the result and use it in further conditions.


Attachments:
forum1_V3.vfs [36.21 KiB]
Downloaded 156 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: count up candles and down candles Post rating: 0   Post Posted: Fri 08 Jul, 2016, 01:28 
User avatar

User rating: 1
Joined: Tue 24 Feb, 2015, 22:29
Posts: 15
Location: Egypt, Cairo
your help is very useful and appreciated
thank you very much


 

Jump to:  

cron
  © 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