Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Submit JForex API function requests in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

Load/Save chart template programmatically and simplify in UI
 Post subject: Load/Save chart template programmatically and simplify in UI Post rating: 0   New post Posted: Thu 21 Sep, 2017, 21:20 

User rating: 18
Joined: Thu 20 Apr, 2017, 22:42
Posts: 165
Location: Russian Federation,
Hello,

I have recurrent and very annoying problem - opening new chart from template and saving template for a specific instrument into the individual file (since each instrument has it's own chart objects).

Currently JForex requires following:

to open (4 actions)
1. right click in Instruments list
2. select "open chart template"
3. in popup dialog - find the name of current instrument (select from list of 20+ items) or ensure that there is no template for that instrument yet
4. dbl-click it to open new chart

to save (4 actions)
1. click "chart templates" button
2. click "save template" menu item
3. find if existing file is available in the list of 20+ items - and overwrite it
4. alternatively, enter new file name and click 'Save'

Instead of this i'd like to have following 1-click behavior
1. OPEN - (instead of opening an instrument pane, the current behavior) on Dbl-click in Instruments pane i would like to open existing Chart for that instrument or, if none available, open new chart from a predefined template - if template with name of the instrument is available in standard templates folder, then use it, otherwise use template named 'default.tmpl', if non present - open template with some build-in configuration

2. SAVE - Additionally to existing "Save Template" menu item (BTW according to at least Windows standard it should be followed by '...' as a hint that more actions will be required - see "Using ellipses" here https://msdn.microsoft.com/en-us/library/windows/desktop/dn742392(v=vs.85).aspx), add a menu item "Save Template to EURUSD.tmpl" (where 'EURUSD' is name of current chart indicator)

On top of that, it would be nice to have API for saving/loading templates into Chart from custom plugins. I've looked through existing API and did not notice way to do this. Missing methods are

IContext.openChart(Instrument instrument, String templateFileName)
IChart.loadFromTemplate(String templateFileName)
IChart.saveToTemplate(String templateFileName)

I feel this should be rather easy to implement since all core functionality is already implemented.

Regarding newly recommended 'open' behavior - since it differs from the current one, I guess an option needed somewhere in preferences which selects what has to be done on dbl-click in Instruments. And ... to seamlessly integrate new action with existing dbl-click behavior, most probably new context menu "Open Chart from EURUSD.tmpl" is needed in Instruments list.


 

Jump to:  

  © 1998-2024 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