Dukascopy
 
 
Wiki JStore Search Login

onTick
 Post subject: onTick Post rating: 0   Post Posted: Wed 14 Sep, 2016, 19:00 
User avatar

User rating: 0
Joined: Fri 26 Aug, 2016, 00:12
Posts: 3
Location: Canada,
I simply add a counter to onTick and it is going up way faster than the ticks on tick chart? Is a tick not the same as the ticks on the tick chart?

Attached is an example script with the onTick counter added in. I assumed onTick would be called every time a new tick is there, but it is called at an insanely fast speed?


Attachments:
SMACrossExample1.java [4.42 KiB]
Downloaded 141 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: onTick Post rating: 1   Post Posted: Thu 15 Sep, 2016, 08:49 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Hi,
The OnTick method is indeed called by tick prices and your assumption is correct.
As you posted under Visual Jforex forum, I've made a quick example in vfs format. I've added a print function to the java code as well.
You can import the vjs file from Visual JForex https://www.dukascopy.com/vjforex/ File > import

I suggest to test using an instrument that is not quoting frequently such as some indices or stocks.
If you need help for your code, please post your questions under automated trading section

Cheers


Attachments:
untitledStrategy1.vfs [20 KiB]
Downloaded 144 times
UntitledStrategy.java [11.08 KiB]
Downloaded 164 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.
 

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