Dukascopy
 
 
Wiki JStore Search Login

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.

What's a Plugin ?
 Post subject: What's a Plugin ? Post rating: 1   New post Posted: Sat 05 Oct, 2013, 04:20 
User avatar

User rating: 98
Joined: Mon 23 Jul, 2012, 02:02
Posts: 656
Location: United States, Durham, NC
I give up. I searched the forum and so would somebody
please explain what we can do with Plugins support recently
introduced into the API.

What's an example of a creative use of Plugins which you
developers have created?

In particular, when would a Plugin be used to execute
trades, as opposed to using a regular Strategy module ?

Thanks,
HyperScalper


 
 Post subject: Re: What's a Plugin ? Post rating: 0   New post Posted: Sat 05 Oct, 2013, 04:28 
User avatar

User rating: 98
Joined: Mon 23 Jul, 2012, 02:02
Posts: 656
Location: United States, Durham, NC
I found this in the Wiki.

But it doesn't say what a Plugin could be used to do.

https://www.dukascopy.com/wiki/#Plugins


 
 Post subject: Re: What's a Plugin ? Post rating: 1   New post Posted: Sat 05 Oct, 2013, 09:46 
User avatar

User rating: 94
Joined: Mon 06 Feb, 2012, 12:22
Posts: 357
Location: Portugal, Castelo Branco
Hi...

As far i can see, you can with plugins do whatever you do with strategies...
Also you can define the startup mode, that means you can define the plugin to start when JForex starts.
I'm thinking to try to change some of my strategies to plugins when i have time.

Until all versions of jforex include this feature we need to include the api jar (i think)

Trade well

JL


 
 Post subject: Re: What's a Plugin ? Post rating: 0   New post Posted: Mon 07 Oct, 2013, 08:59 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Plugin would normally be a GUI module in the platform with the same capabilities that strategies have, with the following features:
  • Auto-start on platform launch which is configurable through the parameters' dialog.
  • Trade disabling.
  • Extended access to platform GUI - with JForex-API 2.9.4 (i.e. with the next platform release) one will be able to create menu items by using the Plugin API.
  • Packaging in jar, meaning that one is not forced to keep all the logic in the same file or manage the libraries through @Library annotation. The latest JForex-SDK.zip version contains examples how one can use Maven assembly plugin to package plugins with their dependencies (if there are any).
Hence, when we think of currently implemented strategies that involve manual user action for doing trading operations, do some analysis/overviews/reports - those would be the candidates to be converted to plugins.
As you see there are no onTick, onBar, onMessage and onAccount callbacks for the Plugin class, which means that plugins only work with feeds/messaging that they subscribe to. Hence they don't get fed with ticks/bars from all subscribed instruments which has been a concern for some.


 
 Post subject: Re: What's a Plugin ? Post rating: 0   New post Posted: Mon 07 Oct, 2013, 10:26 
User avatar

User rating: 164
Joined: Mon 08 Oct, 2012, 10:35
Posts: 676
Location: NetherlandsNetherlands
Interesting!

Quote:
Hence, when we think of currently implemented strategies that involve manual user action for doing trading operations, do some analysis/overviews/reports - those would be the candidates to be converted to plugins.

Would this be the new 'home' of processing strategy parameter on the fly through plugins, while the strategy is running?


 
 Post subject: Re: What's a Plugin ? Post rating: 0   New post Posted: Mon 07 Oct, 2013, 10:50 
User avatar

User rating: 94
Joined: Mon 06 Feb, 2012, 12:22
Posts: 357
Location: Portugal, Castelo Branco
Hi tcsabina:

You can change strategy parameters on the fly has always... just create a key/mouse/right menu listener to call a windows where you change the parameters. On my article about twitter you have a example of a key listener to call a window to fill a text box (in this case to send a tweet). You can use this way to change strategy parameters on the fly. of course, you need to build this window.

Trade well

JL


 
 Post subject: Re: What's a Plugin ? Post rating: 0   New post Posted: Mon 07 Oct, 2013, 13:04 
User avatar

User rating: 70
Joined: Sat 22 Sep, 2012, 17:43
Posts: 118
Location: Brazil, Fortaleza, Ceará
Well done to the API team - this is a good development.


 
 Post subject: Re: What's a Plugin ? Post rating: 0   New post Posted: Mon 07 Oct, 2013, 17:46 
User avatar

User rating: 98
Joined: Mon 23 Jul, 2012, 02:02
Posts: 656
Location: United States, Durham, NC
API Support wrote:
Plugin would normally be a GUI module in the platform with the same capabilities that strategies have, with the following features:
  • Auto-start on platform launch which is configurable through the parameters' dialog.
  • Trade disabling.
  • Extended access to platform GUI - with JForex-API 2.9.4 (i.e. with the next platform release) one will be able to create menu items by using the Plugin API.
  • Packaging in jar, meaning that one is not forced to keep all the logic in the same file or manage the libraries through @Library annotation. The latest JForex-SDK.zip version contains examples how one can use Maven assembly plugin to package plugins with their dependencies (if there are any).
Hence, when we think of currently implemented strategies that involve manual user action for doing trading operations, do some analysis/overviews/reports - those would be the candidates to be converted to plugins.


OK, thanks very much. I'm glad I asked this question, which has stimulated lots
of ideas, at least for me.

So here's what I'm thinking. I have a group of Remote Strategies
to manage. So I could implement my Swing-based MyStrategies Manager as a Plugin. This would be able to start/stop and generally manage my group of Remote Strategies, as an extension to the JForex platform (as a Plugin), with launch appearing as a menu item,
especially given the new API features to do Remote Strategy management coming from API 2.9.4. This MyStrategy Manager facility would be provided as a JAR, registered, and then would be
started from a menu on the JForex platform,
and would run for as long as the JForex platform was running, and be driven by its own
custom user interface and logic.

Originally I was thinking that I would have to write a standalone API process to do all of this
but now I am thinking that the Plugin might be an easier method to use, and better
"integrated" with the platform.

Would this be a proper usage of the Plugin implementation? Would it be able to manage
local and remote Strategy running, start/stop strategies both local and remote?

One issue I can think of is Strategy startup, and whether the manual Remote Strategy parameter
dialog could be automated, rather than requiring user intervention. In my specific case, I could
have Remote Strategy launch with NO Parameters, and then set parameters after they were
running. But that depends upon custom comms code I've written, so that would work for
me but not generally for others.

I haven't seen the Remote Launch API, so I don't know if manual configuration can be
skipped on API Remote Launch.

Thanks,
HyperScalper


 
 Post subject: Re: What's a Plugin ? Post rating: 0   New post Posted: Tue 08 Oct, 2013, 11:33 
User avatar

User rating: 70
Joined: Sat 22 Sep, 2012, 17:43
Posts: 118
Location: Brazil, Fortaleza, Ceará
Sounds like a good approach Hyperscalper. After looking at the IPluginContext (which extends IContext) and IPluginWidget (which provides JPanel access), provided that the Remote APIs are rich enough for your purposes you'll have a really neat way to integrate your strategy management codebase that you had destined for a separate standalone process.

Your only major consideration is whether anything going on in your strategy management should be able to survive the crashing of the platform process hosting the code in plugin form. All depends what you do within that code and how much responsiblity you give it and what you're doing with respect to the management (and perhaps persistence) of any temporary state.

good luck.


 
 Post subject: Re: What's a Plugin ? Post rating: 0   New post Posted: Wed 09 Oct, 2013, 09:02 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
hyperscalper wrote:
Would this be a proper usage of the Plugin implementation? Would it be able to manage
local and remote Strategy running, start/stop strategies both local and remote?
This would require the strategy management logic to get added to the Plugin API.


 
 Post subject: Re: What's a Plugin ? Post rating: 0   New post Posted: Sun 01 Dec, 2013, 15:27 
User avatar

User rating: 0
Joined: Wed 03 Apr, 2013, 13:03
Posts: 17
Location: United States, Jersey City
Great Question.
I am a c# .net programmer. I have been trying to write an app in eclipse that will allow me to run my strategy and send the trade signals to Zulutrade. I saw this about plugins and thought this might help. But, it seems it is very limited on top of the already limited nature of this platform. Don't get me wrong I love jforex. I am not trying to bash you guys' efforts (developers). But, before I go down the rabbit hole of trying to leverage plugins I want to know can't I write my app in .net and using REST send and receive messages into and out of this platform?

After all, json should be platform agnostic. Has anybody done this?

Again, Jforex is a billion times better than metatrader which I lost a lot of years developing on.
Mitch


 

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