Share and Money Management 0.18devel
|
Panel to show all open positions. More...
Public Member Functions | |
def | __init__ (self, *args, **kwargs) |
Initialise the open position frame. More... | |
def | createListOpenPosition (self) |
Create a header only list for all open positions. More... | |
def | populateOpenPosition (self) |
Creates a list with all open positions. More... | |
def | showDetails (self) |
Shows the details of a selected share. More... | |
def | OnItemSelected (self, event) |
Event handler to update the transaction list on selecting an open position. More... | |
def | psUpdateContent (self) |
Update the panel if new quotes are available. More... | |
def | OnCancel (self, event) |
Revert changes. More... | |
def | OnSave (self, event) |
Write changes back to the share. More... | |
def | OnTrade (self, event) |
Show a dialog to trade with the selected share. More... | |
def | __init__ (self, *args, **kwds) |
Public Member Functions inherited from gui.controls.GeneralPanelConfig | |
def | OnClose (self, event) |
Save the current configuration before the panel is closed. More... | |
def | restoreConfig (self) |
Restore saved settings. More... | |
def | saveConfig (self) |
Save current settings. More... | |
def | restoreListCtrl (self, ctrl, section, prefix) |
Restore saved settings. More... | |
def | saveListCtrl (self, ctrl, section, prefix) |
Save current settings. More... | |
Public Attributes | |
green_arrow_idx | |
Position of the green arrow image inside the ListCtrl image list. More... | |
yellow_arrow_idx | |
Position of the yellow arrow image inside the ListCtrl image list. More... | |
red_arrow_idx | |
Position of the red arrow image inside the ListCtrl image list. More... | |
lc_OpenPosition | |
List of all open positions. More... | |
position | |
Position whose details are shown. More... | |
sw_OpenPosition | |
Splitter window used as main widget in this panel. More... | |
transaction_list | |
Instance to simplify controlling of the list of transactions related to the current selected share. More... | |
Public Attributes inherited from gui.UIBasePanelOpenPositionDetails.UIBasePanelOpenPositionDetails | |
sw_OpenPosition | |
pn_ShareList | |
lc_OpenPosition | |
pn_Details | |
bn_save | |
bn_cancel | |
bn_trade | |
pn_PositionDetails | |
tc_Buy | |
tc_Quote | |
tc_Count | |
tc_Date | |
tc_Volume | |
tc_ProfitAbsolute | |
tc_ProfitRelative | |
bm_Trend | |
tc_ProfitRelative_6M | |
tc_ProfitRelative_1Y | |
tc_ProfitRelative_3Y | |
tc_ProfitRelative_5Y | |
lc_Transaction | |
Static Public Attributes | |
string | config_section = "panel_positiondetails" |
Section in the configuration that contains the current look. More... | |
dictionary | config_items |
Static Public Attributes inherited from gui.controls.GeneralPanelConfig | |
config_section = None | |
Section in the configuration that contains the current look. More... | |
dictionary | config_items |
Dictionary with all elements to save/restore. More... | |
Private Member Functions | |
def | _addPosition (self, pos) |
Add a new single smm.objects.OpenPosition object to the list. More... | |
Panel to show all open positions.
def gui.panel.PanelOpenPositionDetails.__init__ | ( | self, | |
* | args, | ||
** | kwargs | ||
) |
Initialise the open position frame.
Reimplemented from gui.UIBasePanelOpenPositionDetails.UIBasePanelOpenPositionDetails.
|
private |
Add a new single smm.objects.OpenPosition object to the list.
self | The object instance itself |
pos | The smm.objects.Position object |
References gui.panel.PanelOpenPositionList.green_arrow_idx, gui.panel.PanelOpenPositionDetails.green_arrow_idx, gui.panel.PanelOpenPositionList.lc_OpenPosition, gui.panel.PanelOpenPositionDetails.lc_OpenPosition, gui.UIBasePanelOpenPositionDetails.UIBasePanelOpenPositionDetails.lc_OpenPosition, gui.UIBasePanelOpenPositionList.UIBasePanelOpenPositionList.lc_OpenPosition, gui.panel.PanelOpenPositionList.red_arrow_idx, gui.panel.PanelOpenPositionDetails.red_arrow_idx, gui.panel.PanelOpenPositionList.yellow_arrow_idx, and gui.panel.PanelOpenPositionDetails.yellow_arrow_idx.
Referenced by gui.panel.PanelOpenPositionList.populateOpenPosition(), gui.panel.PanelOpenPositionDetails.populateOpenPosition(), and gui.panel.PanelWatchList.populateWatchList().
def gui.panel.PanelOpenPositionDetails.createListOpenPosition | ( | self | ) |
Create a header only list for all open positions.
References gui.panel.PanelOpenPositionList.lc_OpenPosition, gui.panel.PanelOpenPositionDetails.lc_OpenPosition, gui.UIBasePanelOpenPositionDetails.UIBasePanelOpenPositionDetails.lc_OpenPosition, and gui.UIBasePanelOpenPositionList.UIBasePanelOpenPositionList.lc_OpenPosition.
def gui.panel.PanelOpenPositionDetails.OnCancel | ( | self, | |
event | |||
) |
Revert changes.
References gui.panel.PanelOpenPositionDetails.showDetails(), and gui.panel.PanelWatchList.showDetails().
def gui.panel.PanelOpenPositionDetails.OnItemSelected | ( | self, | |
event | |||
) |
Event handler to update the transaction list on selecting an open position.
References gui.panel.PanelOpenPositionList.lc_OpenPosition, gui.panel.PanelOpenPositionDetails.lc_OpenPosition, gui.UIBasePanelOpenPositionDetails.UIBasePanelOpenPositionDetails.lc_OpenPosition, gui.UIBasePanelOpenPositionList.UIBasePanelOpenPositionList.lc_OpenPosition, gui.dialogs.DlgTrade.position, gui.panel.PanelOpenPositionDetails.position, smm.objects.Transaction.position, gui.panel.PanelOpenPositionDetails.showDetails(), and gui.panel.PanelWatchList.showDetails().
def gui.panel.PanelOpenPositionDetails.OnSave | ( | self, | |
event | |||
) |
Write changes back to the share.
References gui.panel.PanelOpenPositionList.lc_OpenPosition, gui.panel.PanelOpenPositionDetails.lc_OpenPosition, gui.UIBasePanelOpenPositionDetails.UIBasePanelOpenPositionDetails.lc_OpenPosition, gui.UIBasePanelOpenPositionList.UIBasePanelOpenPositionList.lc_OpenPosition, gui.UIBasePanelOpenPositionDetails.UIBasePanelOpenPositionDetails.pn_PositionDetails, gui.dialogs.DlgTrade.position, gui.panel.PanelOpenPositionDetails.position, and smm.objects.Transaction.position.
def gui.panel.PanelOpenPositionDetails.OnTrade | ( | self, | |
event | |||
) |
Show a dialog to trade with the selected share.
References gui.dialogs.DlgTrade.position, gui.panel.PanelOpenPositionDetails.position, and smm.objects.Transaction.position.
Referenced by gui.panel.PanelShare._fill_popup_menu(), and gui.panel.PanelOpenPositionList._fill_popup_menu().
def gui.panel.PanelOpenPositionDetails.populateOpenPosition | ( | self | ) |
Creates a list with all open positions.
References gui.panel.PanelOpenPositionList._addPosition(), gui.panel.PanelOpenPositionDetails._addPosition(), gui.panel.PanelWatchList._addPosition(), gui.panel.PanelOpenPositionList.lc_OpenPosition, gui.panel.PanelOpenPositionDetails.lc_OpenPosition, gui.UIBasePanelOpenPositionDetails.UIBasePanelOpenPositionDetails.lc_OpenPosition, and gui.UIBasePanelOpenPositionList.UIBasePanelOpenPositionList.lc_OpenPosition.
Referenced by gui.panel.PanelOpenPositionList.psUpdateContent(), and gui.panel.PanelOpenPositionDetails.psUpdateContent().
def gui.panel.PanelOpenPositionDetails.psUpdateContent | ( | self | ) |
Update the panel if new quotes are available.
References gui.panel.PanelOpenPositionList.lc_OpenPosition, gui.panel.PanelOpenPositionDetails.lc_OpenPosition, gui.UIBasePanelOpenPositionDetails.UIBasePanelOpenPositionDetails.lc_OpenPosition, gui.UIBasePanelOpenPositionList.UIBasePanelOpenPositionList.lc_OpenPosition, gui.panel.PanelOpenPositionList.populateOpenPosition(), gui.panel.PanelOpenPositionDetails.populateOpenPosition(), gui.dialogs.DlgTrade.position, gui.panel.PanelOpenPositionDetails.position, smm.objects.Transaction.position, gui.panel.PanelOpenPositionDetails.showDetails(), and gui.panel.PanelWatchList.showDetails().
Referenced by gui.panel.PanelSummary.__init__().
def gui.panel.PanelOpenPositionDetails.showDetails | ( | self | ) |
Shows the details of a selected share.
currency
variable References gui.UIBasePanelOpenPositionDetails.UIBasePanelOpenPositionDetails.bm_Trend, gui.UIBasePanelOpenPositionDetails.UIBasePanelOpenPositionDetails.bn_cancel, gui.UIBasePanelWatchList.UIBasePanelWatchList.bn_cancel, gui.UIBasePanelOpenPositionDetails.UIBasePanelOpenPositionDetails.bn_save, gui.UIBasePanelWatchList.UIBasePanelWatchList.bn_save, gui.UIBasePanelOpenPositionDetails.UIBasePanelOpenPositionDetails.bn_trade, gui.UIBasePanelWatchList.UIBasePanelWatchList.bn_trade, gui.panel.PanelOpenPositionList.green_arrow_idx, gui.panel.PanelOpenPositionDetails.green_arrow_idx, gui.panel.PanelOpenPositionList.lc_OpenPosition, gui.panel.PanelOpenPositionDetails.lc_OpenPosition, gui.UIBasePanelOpenPositionDetails.UIBasePanelOpenPositionDetails.lc_OpenPosition, gui.UIBasePanelOpenPositionList.UIBasePanelOpenPositionList.lc_OpenPosition, gui.UIBasePanelOpenPositionDetails.UIBasePanelOpenPositionDetails.pn_PositionDetails, gui.dialogs.DlgTrade.position, gui.panel.PanelOpenPositionDetails.position, smm.objects.Transaction.position, gui.panel.PanelOpenPositionList.red_arrow_idx, gui.panel.PanelOpenPositionDetails.red_arrow_idx, gui.UIBasePanelOpenPositionDetails.UIBasePanelOpenPositionDetails.tc_Buy, gui.UIBasePanelOpenPositionDetails.UIBasePanelOpenPositionDetails.tc_Count, gui.UIBasePanelOpenPositionDetails.UIBasePanelOpenPositionDetails.tc_Date, gui.UIBasePanelOpenPositionDetails.UIBasePanelOpenPositionDetails.tc_ProfitAbsolute, gui.UIBasePanelOpenPositionDetails.UIBasePanelOpenPositionDetails.tc_ProfitRelative, gui.UIBasePanelOpenPositionDetails.UIBasePanelOpenPositionDetails.tc_Quote, gui.UIBasePanelOpenPositionDetails.UIBasePanelOpenPositionDetails.tc_Volume, gui.panel.PanelOpenPositionList.transaction_list, gui.panel.PanelOpenPositionDetails.transaction_list, gui.panel.PanelOpenPositionList.yellow_arrow_idx, and gui.panel.PanelOpenPositionDetails.yellow_arrow_idx.
Referenced by gui.panel.PanelOpenPositionDetails.OnCancel(), gui.panel.PanelWatchList.OnCancel(), gui.panel.PanelOpenPositionDetails.OnItemSelected(), gui.panel.PanelWatchList.OnItemSelected(), gui.panel.PanelWatchList.psUpdateAllContent(), and gui.panel.PanelOpenPositionDetails.psUpdateContent().
|
static |
Referenced by gui.controls.GeneralPanelConfig.restoreConfig(), and gui.controls.GeneralPanelConfig.saveConfig().
|
static |
Section in the configuration that contains the current look.
Referenced by gui.controls.GeneralPanelConfig.restoreConfig(), and gui.controls.GeneralPanelConfig.saveConfig().
gui.panel.PanelOpenPositionDetails.green_arrow_idx |
Position of the green arrow image inside the ListCtrl image list.
Referenced by gui.panel.PanelOpenPositionList._addPosition(), gui.panel.PanelOpenPositionDetails._addPosition(), and gui.panel.PanelOpenPositionDetails.showDetails().
gui.panel.PanelOpenPositionDetails.lc_OpenPosition |
List of all open positions.
Referenced by gui.panel.PanelOpenPositionList._adapt_popup(), gui.panel.PanelOpenPositionList._addPosition(), gui.panel.PanelOpenPositionDetails._addPosition(), gui.panel.PanelOpenPositionList.createListOpenPosition(), gui.panel.PanelOpenPositionDetails.createListOpenPosition(), gui.panel.PanelOpenPositionList.OnClosePosition(), gui.panel.PanelOpenPositionList.OnItemSelected(), gui.panel.PanelOpenPositionDetails.OnItemSelected(), gui.panel.PanelOpenPositionDetails.OnSave(), gui.panel.PanelOpenPositionList.OnTrade(), gui.panel.PanelOpenPositionList.populateOpenPosition(), gui.panel.PanelOpenPositionDetails.populateOpenPosition(), gui.panel.PanelOpenPositionList.psUpdateContent(), gui.panel.PanelOpenPositionDetails.psUpdateContent(), and gui.panel.PanelOpenPositionDetails.showDetails().
gui.panel.PanelOpenPositionDetails.position |
Position whose details are shown.
Referenced by smm.objects.Transaction.__init__(), smm.objects.Transaction.__str__(), gui.dialogs.DlgTrade._prepareBuy(), gui.dialogs.DlgTrade._processInput(), gui.dialogs.DlgTrade._updateDateRangePosition(), gui.dialogs.DlgTrade._validateInput(), gui.panel.PanelOpenPositionDetails.OnItemSelected(), gui.panel.PanelOpenPositionDetails.OnSave(), gui.panel.PanelOpenPositionDetails.OnTrade(), gui.dialogs.DlgTrade.OnUpdateExistingPosition(), gui.dialogs.DlgTrade.OnUpdateNewPosition(), gui.panel.PanelOpenPositionDetails.psUpdateContent(), smm.objects.Transaction.remove(), and gui.panel.PanelOpenPositionDetails.showDetails().
gui.panel.PanelOpenPositionDetails.red_arrow_idx |
Position of the red arrow image inside the ListCtrl image list.
Referenced by gui.panel.PanelOpenPositionList._addPosition(), gui.panel.PanelOpenPositionDetails._addPosition(), and gui.panel.PanelOpenPositionDetails.showDetails().
gui.panel.PanelOpenPositionDetails.sw_OpenPosition |
Splitter window used as main widget in this panel.
gui.panel.PanelOpenPositionDetails.transaction_list |
Instance to simplify controlling of the list of transactions related to the current selected share.
Referenced by gui.panel.PanelOpenPositionList.OnItemSelected(), gui.panel.PanelOpenPositionList.psUpdateContent(), and gui.panel.PanelOpenPositionDetails.showDetails().
gui.panel.PanelOpenPositionDetails.yellow_arrow_idx |
Position of the yellow arrow image inside the ListCtrl image list.
Referenced by gui.panel.PanelOpenPositionList._addPosition(), gui.panel.PanelOpenPositionDetails._addPosition(), and gui.panel.PanelOpenPositionDetails.showDetails().