Skip to content

Commit

Permalink
策略2.0---DMARB,STRB,VRB
Browse files Browse the repository at this point in the history
  • Loading branch information
rjj510 committed Dec 5, 2018
1 parent f936e0c commit 49bce2b
Show file tree
Hide file tree
Showing 3 changed files with 147 additions and 46 deletions.
2 changes: 0 additions & 2 deletions uiCustomMenu.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,6 @@ def initMenu(self):
#self.contextMenu.exec_(QCursor.pos()) # 在鼠标位置显示
#添加二级菜单



def showContextMenu(self, pos):
'''''
右键点击时调用的函数
Expand Down
2 changes: 1 addition & 1 deletion uiKLine.py
Original file line number Diff line number Diff line change
Expand Up @@ -1289,7 +1289,7 @@ def initIndicator(self,data):

self.clearSigData()
self.loadData_listsig(pd.DataFrame.from_csv('data\dailyresult\RB9999.csv'))
self.BP_signal='close'
self.BP_signal='close'
self.plotMark()
self.plot_after_runStrategy()
self.MA_SHORTOI.hide()
Expand Down
189 changes: 146 additions & 43 deletions uiKLine.wpu
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
'list-files-first': False,
'tree-states': {'deep': {'expanded-nodes': [(0,),
(20,)],
'selected-nodes': [(18,)],
'selected-nodes': [(17,)],
'top-node': (0,)}},
'tree-style': 'deep'}}),
('versioncontrol.git',
Expand All @@ -70,9 +70,16 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
('browser',
'tall',
0,
{'all_tree_states': {loc('file:C:/Users/adminsrr/Anaconda2/Lib/collections.py'): {'e'\
{'all_tree_states': {loc('json/uiKLine_button.json'): {'e'\
'xpanded-nodes': [],
'selected-nodes': [],
'top-node': None},
u'By Module': {'expanded-nodes': [],
'selected-nodes': [None],
'top-node': None},
loc('file:C:/Users/adminsrr/Anaconda2/Lib/collections.py'): {'expand'\
'ed-nodes': [],
'selected-nodes': [],
'top-node': [('class def',
loc('file:C:/Users/adminsrr/Anaconda2/Lib/collections.py'),
'Counter')]},
Expand Down Expand Up @@ -153,9 +160,6 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
'top-node': [('generic attribute',
loc('../QH/LWZS.py'),
'ALL_DQGDD')]},
loc('json/uiKLine_button.json'): {'expanded-nodes': [],
'selected-nodes': [],
'top-node': None},
loc('json/uiKLine_input.json'): {'expanded-nodes': [],
'selected-nodes': [],
'top-node': None},
Expand All @@ -179,14 +183,6 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
'top-node': [('generic attribute',
loc('uiKLine.py'),
'app')]},
loc('../vnpy-1.9.0/vnpy/trader/vtObject.py'): {'expanded-nodes': [],
'selected-nodes': [],
'top-node': [('class def',
loc('../vnpy-1.9.0/vnpy/trader/vtObject.py'),
'VtAccountData')]},
u'By Module': {'expanded-nodes': [],
'selected-nodes': [None],
'top-node': None},
loc('../vnpy-1.9.0/examples/CtaBacktesting/runBacktesting_WH.py'): {'e'\
'xpanded-nodes': [],
'selected-nodes': [],
Expand All @@ -210,7 +206,12 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
'selected-nodes': [],
'top-node': [('class def',
loc('../vnpy-1.9.0/vnpy/trader/app/ctaStrategy/ctaBacktesting.py'),
'BacktestingEngine')]}},
'BacktestingEngine')]},
loc('../vnpy-1.9.0/vnpy/trader/vtObject.py'): {'expanded-nodes': [],
'selected-nodes': [],
'top-node': [('class def',
loc('../vnpy-1.9.0/vnpy/trader/vtObject.py'),
'VtAccountData')]}},
'browse_mode': u'Current Module',
'follow-selection': False,
'sort_mode': 'Alphabetically',
Expand Down Expand Up @@ -356,28 +357,17 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
'selection_end': 163L,
'selection_start': 163L,
'zoom': 0L})],
'primary_view_state': {'editor_states': ({'bookmarks': ([[loc('../vnpy-1.9.0/examples/CtaBacktesting/runBacktesting_Volatility_RB.py'),
{'attrib-starts': [('calculateDailyResult_init',
13)],
'first-line': 27L,
'primary_view_state': {'editor_states': ({'bookmarks': ([[loc('file:C:/Users/adminsrr/Anaconda2/Lib/site-packages/vnpy/trader/app/ctaStrategy/strategy/strategy_Volatility_RB.py'),
{'attrib-starts': [('strategy_Volatility_RB',
16)],
'first-line': 40L,
'folded-linenos': [],
'sel-line': 32L,
'sel-line-start': 976L,
'selection_end': 996L,
'selection_start': 996L,
'sel-line': 53L,
'sel-line-start': 2241L,
'selection_end': 2241L,
'selection_start': 2241L,
'zoom': 0L},
1543329249.23],
[loc('file:C:/Users/adminsrr/Anaconda2/Lib/site-packages/vnpy/trader/app/ctaStrategy/strategy/strategy_Volatility_RB.py'),
{'attrib-starts': [('strategy_Volatility_RB',
16)],
'first-line': 40L,
'folded-linenos': [],
'sel-line': 53L,
'sel-line-start': 2241L,
'selection_end': 2241L,
'selection_start': 2241L,
'zoom': 0L},
1543329293.052],
1543329293.052],
[loc('../vnpy-1.9.0/examples/CtaBacktesting/runBacktesting_Volatility_RB.py'),
{'attrib-starts': [('calculateDailyResult_init',
13)],
Expand Down Expand Up @@ -931,10 +921,121 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
'selection_end': 14078L,
'selection_start': 14078L,
'zoom': 0L},
1544018795.927]],
1544018795.927],
[loc('uiKLine.py'),
{'attrib-starts': [('KLineWidget',
330),
('KLineWidget.initIndicator',
1012)],
'first-line': 1163L,
'folded-linenos': [0L,
42L,
44L,
45L,
51L,
55L,
61L,
62L,
64L,
66L,
68L,
70L,
72L,
77L,
78L,
80L,
85L,
86L,
88L,
94L,
95L,
97L,
105L,
110L,
115L,
120L,
125L,
130L,
135L,
140L,
145L,
150L,
155L,
160L,
167L,
169L,
176L,
177L,
189L,
201L,
215L,
223L,
228L,
255L,
258L,
260L,
269L,
270L,
274L,
279L,
281L,
283L,
285L,
292L,
293L,
298L,
301L,
305L,
310L,
319L,
323L,
622L,
714L,
726L,
792L,
805L,
836L,
847L,
863L,
1013L,
1023L,
1033L,
1046L,
1061L,
1076L,
1085L,
1094L,
1127L,
1143L,
1163L,
1183L,
1209L,
1234L,
1259L,
1303L,
1310L],
'sel-line': 1291L,
'sel-line-start': 59813L,
'selection_end': 59847L,
'selection_start': 59847L,
'zoom': 0L},
1544052735.124]],
20),
'current-loc': loc('uiKLine.py'),
'editor-state-list': [(loc('uiKLine.py'),
'current-loc': loc('uiCustomMenu.py'),
'editor-state-list': [(loc('uiCustomMenu.py'),
{'attrib-starts': [('CustomMenu',
10),
('CustomMenu.initMenu',
22)],
'first-line': 105L,
'folded-linenos': [14L,
23L],
'sel-line': 127L,
'sel-line-start': 6882L,
'selection_end': 6882L,
'selection_start': 6882L,
'zoom': 0L}),
(loc('uiKLine.py'),
{'attrib-starts': [('KLineWidget',
330),
('KLineWidget.initIndicator',
Expand Down Expand Up @@ -1028,13 +1129,15 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
1310L],
'sel-line': 1291L,
'sel-line-start': 59813L,
'selection_end': 59846L,
'selection_start': 59846L,
'selection_end': 59847L,
'selection_start': 59847L,
'zoom': 0L})],
'has-focus': True,
'locked': False},
[loc('uiKLine.py')]),
'open_files': [u'uiKLine.py']},
[loc('uiCustomMenu.py'),
loc('uiKLine.py')]),
'open_files': [u'uiKLine.py',
u'uiCustomMenu.py']},
'saved_notebook_display': None,
'split_percents': {0: 0.2996389891696751},
'splits': 2,
Expand All @@ -1049,8 +1152,8 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
129,
988,
509)}]}
guimgr.recent-documents = [loc('uiKLine.py'),
loc('../vnpy-1.9.0/examples/CtaBacktesting/runBacktesting_Volatility_RB.py')]
guimgr.recent-documents = [loc('uiCustomMenu.py'),
loc('uiKLine.py')]
guimgr.visual-state = {loc('file:C:/Program Files (x86)/Wing IDE 6.1/resources/builtin-pi-files/2.7/__builtin__.pi'): {'a'\
'ttrib-starts': [('reload',
1748)],
Expand Down

0 comments on commit 49bce2b

Please sign in to comment.