Simple Trader plug-in for PTMC
With getting mature in manual trades, most traders are challenging themselves with coding to make their daily routine easier. PTMC is a suitable tool for this purposes thanks to its flexibility. Though there is plenty of features already available in the box, creating your own add-on grants you ability for unlimited extension of your client. A Simple Trader plug-in is here to show how to retrieve info from server by choosing instrument and perform trading operation by coding. Just note, PTMC's API which is used for this plug-in is identical to one in the indicator and trade system building (Pt# Class).
Highlighted steps:
- Once launched MS Visual Studio, add references in Solution Explorer (browse for additional PTLRuntime.dll and Commons.dll files),
- To develop this plug-in IExternalComponent interface is used and also its inheritors such as ILinkableComponent, ILocalizableComponent, ITradeComponent.
IExternalComponent is a base interface which contains information about plug-in
ComponentName - Property provides the name of your future component, which would be used in terminal's tools menu.
Content - Property sets control panel of the user interface, which would be displayed in the terminal.
IconImage - Property sets Image for plug-in apart of content.
PanelHeader - Property sets name of the plug-in in tabs of the terminal.
Populate() - Method notifies about finished server connection and ability to use data from cache
ILinkableComponent allows your plug-in to support a linking in the client.
AllowAccountLinking - Property allows linking to the account.
AllowSymbolLinking - Property allows to link to the symbol.
AccountLinking_In() - Method sets linking to account.
SymbolLinking_In() - Method sets linking to symbol.
event AccountLinkingOut - callback on linking out from the account.
event SymbolLinkingOut - callback on linking out from the symbol
ILocalizableComponent performs a language translate logic which would localize plug-in depending on chosen language in PTMC.
Localize() - Method implements controls' text translation according to client language
ITadeComponent extends your add-on by giving a control of the trading operation.
NETSDK PlatformEngine - Property grants a trading usability
Note: You must redefine all interfaces' properties.
Simple Trader in action. Worth to note that Plug-in's updates would take an effect once terminal starts.