Dukascopy Support Board
http://www.dukascopy.com/swiss/english/forex/jforex/forum/

Article series "Creating your first strategy" - Support and files thread
http://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=82&t=47482
Page 3 of 3

Author:  Horacio [ Sun 27 Jan, 2013, 19:17 ]
Post subject:  Re: Article series "Creating your first strategy" - Support and files thread

Hi Jose, thank you for your good work. I find it very useful, but I would need it to show US open - I presume it now shows Open as beginning of the day at 0:00 GMT. Do you think it would be possible to modify and/or release also source?

Author:  jlongo [ Sun 27 Jan, 2013, 21:50 ]
Post subject:  Re: Article series "Creating your first strategy" - Support and files thread

Hi Horacio:

You are right, the indicator use GMT time transition. Maybe i will release the source code soon.
If i have time, i will try to change the indicator with parameters to allow the change of starting time, but don't consider it a promess.

Trade well

JL

Author:  jlongo [ Mon 11 Feb, 2013, 20:11 ]
Post subject:  Re: Article series "Creating your first strategy" - Support and files thread

Hi Dukascopy Community:

Other article is submited, this time we talk about writing JForex values to a file in text or CSV format.

Below the complete strategy presented on the article you can read here.

Attachment:
MyExportData.java [16.69 KiB]
Downloaded 1868 times



Trade well

JL

Author:  jlongo [ Fri 22 Feb, 2013, 13:39 ]
Post subject:  Re: Article series "Creating your first strategy" - Support and files thread

Hi Dukascopy Community:

About strategy "MyExportData"

Some users who try this strategy are reporting problems with it (about the file creation with "Access denied" or similar). This errors can occur if you don't have created the directory of your choice or the default one "Temp". You must have this directory created at the root of your disk "C:" if you use the strategy with default parameters. The strategy create the file if not exists (or apend at the end of the existing one) but not create the directory or directories you specify, giving this type of errors (you need to create them). Also you must have write permissions to this directory. If you use other system than windows, you must adapt the "Path and file name" parameter to math your file system structure.
I hope this helps.

Trade well
JL

Author:  jlongo [ Mon 04 Mar, 2013, 15:02 ]
Post subject:  Re: Article series "Creating your first strategy" - Support and files thread

Hi Dukascopy Community:

Other article is done, and this time about sending emails inside JForex with any information we want.
You can read the article here -> https://www.dukascopy.com/fxcomm/fx-arti ... ad-article

Bellow i attach the example strategy used on this article.

download/file.php?mode=view&id=3365

Feel free to comment or suggest anything.

Trade well

JL

Attachments:
File comment: Example strategy on how to use sendmail
MyJFMail.java [7.4 KiB]
Downloaded 2939 times

Author:  jlongo [ Sun 10 Mar, 2013, 19:36 ]
Post subject:  Re: Article series "Creating your first strategy" - Support and files thread

Hi Dukascopy Community:

I made some minor adjustments to take in consideration smtp servers without security and now it sends a more explicit error message in case or error to the strategy message tab.

Trade well

JL

Attachments:
MyJFMail.java [7.63 KiB]
Downloaded 1772 times

Author:  jlongo [ Thu 25 Apr, 2013, 19:54 ]
Post subject:  Re: Article series "Creating your first strategy" - Support and files thread

Hi Dukascopy Community:

There are some persons interessed on integrate email in their strategies. With my strategy example is relatively easy to integrate email capabilities in your strategy. Just copy the blocks of code referenced in comments on strategy example code and you can have e-mail from your strategy. I annex a comented version to facilitate your work. Also inside this strategy there are some examples of utilization in comments.

Just a note: If your strategy will send too much emails please consider running the email part on separated thread to not overload/stop your strategy.

I hope that can be usefull.

Trade well

JL

Attachment:
MyJFMail.java [8.54 KiB]
Downloaded 1829 times

Author:  jlongo [ Mon 13 May, 2013, 23:24 ]
Post subject:  Re: Article series "Creating your first strategy" - Support and files thread

Hi Dukascopy Community:

I have posted a article at Article Contest about on how to make JForex interact with Twitter services. In this case, the objective is send "tweets" when some conditions or events on JForex occurs. This article is only a preparation for the next one article where we will have all the code, as i can't place everything in just one article. Maybe a superfluous reading, but some steps are essencial to know of for next article.

You can read it here -> https://www.dukascopy.com/fxcomm/fx-arti ... ad&id=1348

Feel free to comment or ask something you may consider.

Trade well

JL

Author:  jlongo [ Tue 04 Jun, 2013, 09:37 ]
Post subject:  Re: Article series "Creating your first strategy" - Support and files thread

Hi Dukascopy Community:

Finaly i posted the last part or the article "Create a strategy - JForex meets Twitter" you can read here.

Also is recomended that you read the first part of the article here to get the Twitter credentials to store them on the strategy i place here.

I hope you like it.

Trade well and happy fx "tweets"!

JL

Attachments:
myJFTweets.java [11.09 KiB]
Downloaded 1965 times

Author:  jlongo [ Fri 02 Aug, 2013, 17:33 ]
Post subject:  Re: Article series "Creating your first strategy" - Support and files thread

Greetings Dukascopy Community:

Another useful strategy (i think) was made and a article explaining how to use it was written.

You can read the article here !
You can get the strategy here.

With this strategy you can get all submited order information in a period of you choice.

You will get:

Order ID;
Order Status: CREATED, FILLED or CLOSED;
Order Instrument: the pair used on the order;
Order Direction : SHORT or LONG;
Order creation time: time when the order was accepted by the server;
Order fill time: time when the order was filled by market conditions;
Order amount: the amount value used to place the order, or the value filled depending on order status;
Order create/fill price: price value of the order when created or the price value when filled;
Order stop loss: stop loss price value of the order if used;
Order take profit: take profit price value of the order if used;
Order close price: the price value when the order was closed:
Order profit/loss in pips;
Order profit/loss in currency value of our account;
Order commision charged in currency value of our account;
Order close time: the time at the order was closed;
Order elapsed time: the duration of the trade between fill and close time expressed in days, hours, minutes and seconds.

You can use this data to make reports, chats or whatever you may want.

I hope you find it useful as i find. If you have any suggestions, comments or anything related i appreciate the feedback.

Trade well

JL

Author:  lucariccione [ Fri 16 Aug, 2013, 20:34 ]
Post subject:  Re: Article series "Creating your first strategy" - Support and files thread

JL hello, I am a novice trader, both in manual and nell'automatico, you would have to let me try a tranquil strategy?
quiet I mean, like, on the MM, when they cross paths, buys and sells, and it does stop 'the MM itself, or one that you want.
I tried it with VISUAL FOREX, but we do not understand anything.
thanks luca

Author:  jlongo [ Fri 16 Aug, 2013, 22:16 ]
Post subject:  Re: Article series "Creating your first strategy" - Support and files thread

Hi lucariccione:

I think we don't have to reinvent the wheel... on Strategy Contest you have so many strategies available that you can test and modify at your will. Also, with your requirements is hard to do anything. If learning java is a option for you, you can start reading some of my articles that offer a litle help as starting point. You can start here. It's not hard, just needs some time and pratice. If you have any doubts, feel free to ask.

Trade well

JL

Author:  jlongo [ Sun 18 Aug, 2013, 10:27 ]
Post subject:  Re: Article series "Creating your first strategy" - Support and files thread

Hi Dukascopy Community:

One community member asked for the possibility to have also the orders label on the generated exports.
I made a new version with this possibility as option. You can get the new strategy here

Image

I recommend to read my article about it here.

Any comments, suggestions and feedback are welcome.

Trade well

JL

Attachments:
2013-08-18_1019.png [42.97 KiB]
Downloaded 2922 times

Author:  jlongo [ Thu 22 Aug, 2013, 20:24 ]
Post subject:  Re: Article series "Creating your first strategy" - Support and files thread

Hi Dukascopy Community:

Other version released with minot bugs corrected and without the need to subscribe all instruments.

You can get it here

Trade well

JL

Author:  mmahdi [ Mon 13 Jan, 2014, 21:23 ]
Post subject:  Re: Article series "Creating your first strategy" - Support and files thread

Hello JL and everyone else!

This is my first post and I wanted to mention that I found this thread to be a goldmine of information. I am a regular contributor on another forum but I figure I should get acquainted with JForex and Java since I switched brokers to Duka.

I have a question about your SendMail strategy. I am attempting to modify code you've written so I can get an email alert when price crosses above or below value "X"; this is easily done.

However I am having trouble modifying code to create a "configurable instrument" & "configurable price" so I don't have to keep compiling the strategy every time for a new instrument & price. I would appreciate anyone's help on how to do this or if it has already been done, to point me to it. I searched but did not find anything on this matter.

Thank you,

MM

Author:  jlongo [ Fri 17 Jan, 2014, 20:49 ]
Post subject:  Re: Article series "Creating your first strategy" - Support and files thread

hi mmadhi:

Sorry for the late answer...

Simple way:

Create global public variable for instrument
Create global public variable for price
Create global public enum for <, = and >

place a filter for condition meet on onTick() method comparing with previous variables.
If condition is meet send email with the info of your choice (note: disable the condition after the email is sent for some time or whatever, if not you will receive emails on each tick when the condition is true).

If you need more help, just say .

Trade well

JL

Author:  Chrysos [ Sun 16 Oct, 2016, 13:54 ]
Post subject:  Re: Article series "Creating your first strategy" - Support and files thread

Hi JL,

I've recently started learning Java in an effort to code and test some strategies and I've found your articles and this thread very useful and I'd just like to say thanks for your great effort. I'm sure others are very grateful too!

I live in Australia so I typically miss the New York trading time and I'm hoping I can automate some strategies to be able to trade overnight in London and New York times.

Thanks,
Chrysos.

Author:  goldenbear [ Sat 15 Feb, 2020, 19:50 ]
Post subject:  Re: Article series "Creating your first strategy" - Support and files thread

hello JL ! the window does not open on the Mac OS ....
screen https://pastenow.ru/c451a90289c86dd61da211fb54389aa6

  Page 3 of 3