|
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.
Analogy for MT4 scripts in JForex? |
macronetics
|
Post subject: Analogy for MT4 scripts in JForex? |
Post rating: 0
|
Posted: Thu 02 Jun, 2011, 18:30
|
|
User rating: -
|
Is there a way to simulate an MT4 script in JForex? That is to stop a strategy automatically after the onStart method is done executing?
|
|
|
|
 |
macronetics
|
Post subject: Re: Analogy for MT4 scripts in JForex? |
Post rating: 0
|
Posted: Fri 03 Jun, 2011, 07:36
|
|
User rating: -
|
I found a hack: just throw a JFException at the end of the onStart method.
|
|
|
|
 |
API Support
|
Post subject: Re: Analogy for MT4 scripts in JForex? |
Post rating: 0
|
Posted: Fri 03 Jun, 2011, 11:08
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
You might as well consider calling IContext.stop() in onTick method, which effectively will close the strategy on its first tick.
|
|
|
|
 |
macronetics
|
Post subject: Re: Analogy for MT4 scripts in JForex? |
Post rating: 0
|
Posted: Fri 03 Jun, 2011, 15:08
|
|
User rating: -
|
Thanks. I tried calling IContext.stop() at the end of the onStart method and it also worked.
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|