|
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.
| About onTick method |
|
goodsss241
|
| Post subject: About onTick method |
Post rating: 0
|
Posted: Fri 11 Oct, 2013, 13:27
|
|
User rating: 0
Joined: Thu 10 Oct, 2013, 16:24 Posts: 10 Location: China, Hebi
|
|
I downloaded the project "singlejartest" from your website "www.dukascopy.com",I I run it in Ecplise, then I found that the onTick method(in the strategies MA_PLAY) run normally when execute the "TestMain", but It does not normally that I execute Main. Later, i login jnlp, run the strategies MA_PLAY in real-time, then the same problem occurred.Why? It's a bug?
|
|
|
|
|
 |
|
API Support
|
| Post subject: Re: About onTick method |
Post rating: 0
|
Posted: Fri 11 Oct, 2013, 13:33
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
goodsss241 wrote: but It does not normally that I execute Main Please elaborate.
|
|
|
|
|
 |
|
goodsss241
|
| Post subject: Re: About onTick method |
Post rating: 0
|
Posted: Fri 11 Oct, 2013, 14:54
|
|
User rating: 0
Joined: Thu 10 Oct, 2013, 16:24 Posts: 10 Location: China, Hebi
|
|
I execute the Main.java, but the onTick method in MA_PLAY.java is not called. The same problem is that I launch the jforex.jnlp, and login the jforex platform, then run the MA_PLAY strategies on my computer(Local Run), the onTick method in MA_PLAY is not called.
|
|
|
|
|
 |
|
API Support
|
| Post subject: Re: About onTick method |
Post rating: 0
|
Posted: Fri 11 Oct, 2013, 15:04
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
|
|
|
|
 |
|
goodsss241
|
| Post subject: Re: About onTick method |
Post rating: 0
|
Posted: Fri 11 Oct, 2013, 15:27
|
|
User rating: 0
Joined: Thu 10 Oct, 2013, 16:24 Posts: 10 Location: China, Hebi
|
|
Yes, I use the way "Print last ask price", no information always. in addition, i use the way "Print last ask price" in onBar method, there will be information, so MA_PLAY strategies is running
|
|
|
|
|
 |
|
API Support
|
| Post subject: Re: About onTick method |
Post rating: 0
|
Posted: Fri 11 Oct, 2013, 15:33
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
Please provide: - The program which runs the strategy
- The strategy
- JForex-SDK and JForex-API versions that you use.
|
|
|
|
|
 |
|
goodsss241
|
| Post subject: Re: About onTick method |
Post rating: 0
|
Posted: Fri 11 Oct, 2013, 15:58
|
|
User rating: 0
Joined: Thu 10 Oct, 2013, 16:24 Posts: 10 Location: China, Hebi
|
|
The project "singlejartest" that downloaded from your website, execute Main.java and TestMain.java, call the MA_PLAY.java strategy.The JForex-SDK and JForex-API is the newest version --- JForex-SDK-2.27.2.1.jar and JForex-API-2.9.3.1.jar
|
|
|
|
|
 |
|
API Support
|
| Post subject: Re: About onTick method |
Post rating: 0
|
Posted: Fri 11 Oct, 2013, 16:05
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
goodsss241 wrote: call the MA_PLAY.java strategy It does not contain any logging in the onTick method. How do you know that it is not getting executed? goodsss241 wrote: I use the way "Print last ask price", no information always. in addition, i use the way "Print last ask price" in onBar method, there will be information, so MA_PLAY strategies is running Please provide a strategy and a program that you run and which replicates the case.
|
|
|
|
|
 |
|
goodsss241
|
| Post subject: Re: About onTick method |
Post rating: 0
|
Posted: Fri 11 Oct, 2013, 16:27
|
|
User rating: 0
Joined: Thu 10 Oct, 2013, 16:24 Posts: 10 Location: China, Hebi
|
|
I add the codes of "Print last ask price" into the onTick method in the MA_PLAY.java. At the same time, I add the codes of "Print last ask price" into the onBar method in the MA_PLAY.java. The onBar method can output information, but the onTick method can not. Not only that, you may login jforex platform from jnlp, then run MA_PLAY.java real-time, the same problem also appears.
|
|
|
|
|
 |
|
goodsss241
|
| Post subject: Re: About onTick method |
Post rating: 0
|
Posted: Sat 12 Oct, 2013, 03:47
|
|
User rating: 0
Joined: Thu 10 Oct, 2013, 16:24 Posts: 10 Location: China, Hebi
|
|
|
|
|
 |
|
tcsabina
|
| Post subject: Re: About onTick method |
Post rating: 0
|
Posted: Sat 12 Oct, 2013, 18:01
|
|
User rating: 164
Joined: Mon 08 Oct, 2012, 10:35 Posts: 676 Location: NetherlandsNetherlands
|
|
I've replied on your other topic before I saw that there are some more about the subject...
Anyway, keep in mind that it is now weekend, which means that there is no price feed working (for the Demo accounts for sure). So testing now the onTick() method is useless... What you can try is to test a strategy with the TesterMain, as it is working fine in the weekend as well (because it is not using live data feeds).
I am still not sure what is you exact situation. Are you just trying to get familiar with the JForex SDK and doing you first test on the onTick() method?
|
|
|
|
|
 |
|
goodsss241
|
| Post subject: Re: About onTick method |
Post rating: 0
|
Posted: Mon 14 Oct, 2013, 04:17
|
|
User rating: 0
Joined: Thu 10 Oct, 2013, 16:24 Posts: 10 Location: China, Hebi
|
  Hello, I pasted the Figures. 3 Figures above display the MA_PLAY.java run on jforex platform, next I pasted the Figures which display the MA_PLAY.java run in Eclipse, can you see that the onTick method is not called?
| Attachments: |
Eclipse.jpg [234.84 KiB]
Downloaded 430 times
|
info.jpg [152.76 KiB]
Downloaded 448 times
|
onBar.jpg [18.85 KiB]
Downloaded 297 times
|
onTick.jpg [81.97 KiB]
Downloaded 378 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.
|
|
|
|
|
|
 |
|
API Support
|
| Post subject: Re: About onTick method |
Post rating: 0
|
Posted: Mon 14 Oct, 2013, 08:08
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
|
|
|
|
 |
|
goodsss241
|
| Post subject: Re: About onTick method |
Post rating: 0
|
Posted: Mon 14 Oct, 2013, 08:30
|
|
User rating: 0
Joined: Thu 10 Oct, 2013, 16:24 Posts: 10 Location: China, Hebi
|
Now, I add the code in the onStart method. print("AccountState="+context.getAccount().getAccountState());The info is 07:24:36 AccountState=BLOCKED Then, how can I do?
|
|
|
|
|
 |
|
API Support
|
| Post subject: Re: About onTick method |
Post rating: 0
|
Posted: Mon 14 Oct, 2013, 08:39
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
API Support wrote: Please register a new demo account and retry running the program.
|
|
|
|
|
 |
|
goodsss241
|
| Post subject: Re: About onTick method |
Post rating: 0
|
Posted: Mon 14 Oct, 2013, 08:55
|
|
User rating: 0
Joined: Thu 10 Oct, 2013, 16:24 Posts: 10 Location: China, Hebi
|
I use Chinese login jforex platform previously, however, the warning message does not display properly, as shown below: now, I use English Login, then, I saw the warning message, as shown below: Dear support, Why my account is not activated? Can you tell me? Thanks!!!
| Attachments: |
Chinese_Account_BLOCKED.jpg [14.77 KiB]
Downloaded 406 times
|
Account_BLOCKED.jpg [15.46 KiB]
Downloaded 389 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.
|
|
|
|
|
|
 |
|
API Support
|
| Post subject: Re: About onTick method |
Post rating: 0
|
Posted: Mon 14 Oct, 2013, 08:59
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
|
Normally the DEMO accounts are active for 14 days, hence once they expire you need to open a new one. For more on this please post your inquiries in the Trading Platforms/FAQ section.
Submit programming questions in this forum only.
|
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|