| |
|
| Note: Pre-open files Trading System ver3.3.4.xlsb, Trading System ver3.3.4_02.xlsb … Trading System ver3.3.4_20.xlsb |
| Flow version: TS_portfolio v1.1 |
|
|
|
| |
|
|
|
|
| Main Flow |
|
|
|
|
Step
|
Action |
Capture |
Variable |
Parameters / Value Settings |
| 1 |
Set variable |
|
total_TS |
Name = total_TS; Value = 20 |
| 2 |
Show list selection dialog |
|
Sel_row;
ButtonPressed2 |
Title = Portfolio Trading Strategy; Message = Select item row; List = 30, 31; Keep = Off; Limit = On; Blank = Off; Multiple = Off |
| 3 |
IF |
|
|
First = %ButtonPressed2%; Operator = Equals (=); Second = Cancel |
| 4 |
Show message |
|
|
Title = Abortive Backtest; Message = Cancel backtest.; Icon = Warning; Buttons = OK; Default = First; Keep = Off; Close = On; Timeout = 1 |
| 5 |
Stop flow |
|
|
— |
| 6 |
End |
|
|
— |
| 7 |
Show message |
|
ButtonPressed |
Title = Close System; Message = Auto close system or not after backtest?; Icon = Question; Buttons = Yes/No; Default = Second; Keep = Off; Close = Off |
| 8 |
Focus window |
|
|
Mode = By title/class; Title = Trading System ver3.3.4.xlsb - Excel; Class = XLMAIN |
| 9 |
Send keys |
|
|
Keys = {Apps}{Enter}; Target = Foreground window; Delay = 20; Hardware = Off |
| 10 |
Run subflow |
|
|
Execute = Options; Input = Off |
| 11 |
Run subflow |
|
|
Execute = Data; Input = Off |
| 12 |
Run subflow |
|
|
Execute = Strategy; Input = Off |
| 13 |
Run subflow |
|
|
Execute = Capital; Input = Off |
| 14 |
Region |
|
|
Name = setting |
| 15 |
Loop |
|
sel_no |
Variable = sel_no; Start = 2; End = %total_TS%; Increment = 1 |
| 16 |
Pad text |
|
TS_no |
Variable = TS_no; Source = sel_no; Pad = Left; PadChar = 0; Length = 2 |
| 17 |
Focus window |
|
|
Title = Trading System ver3.3.4_%TS_no%.xlsb - Excel; Class = XLMAIN |
| 18 |
Send keys |
|
|
Keys = {Apps}{Enter}; Target = Foreground window; Delay = 20; Hardware = Off |
| 19 |
Run subflow |
|
|
Execute = Options; Input = Off |
| 20 |
Run subflow |
|
|
Execute = Data; Input = Off |
| 21 |
Run subflow |
|
|
Execute = Strategy; Input = Off |
| 22 |
Run subflow |
|
|
Execute = Capital; Input = Off |
| 23 |
End loop |
|
|
— |
| 24 |
End region |
|
|
— |
| 25 |
Region |
|
|
Name = backtest |
| 26 |
Focus window |
|
|
Title = Trading System ver3.3.4.xlsb - Excel; Class = XLMAIN |
| 27 |
Move mouse to image |
Button |
Result |
Target = Result; Move = Immediate; Click = Left; Appear = On; Timeout = 5; Algorithm = Basic; Position = Center; Allow = 10; Search = Entire screen; Mode = Entire/Foreground |
| 28 |
Loop |
|
sel_no |
Variable = sel_no; Start = 2; End = %total_TS%; Increment = 1 |
| 29 |
Pad text |
|
TS_no |
Variable = TS_no; Source = sel_no; Pad = Left; PadChar = 0; Length = 2 |
| 30 |
Focus window |
|
|
Title = Trading System ver3.3.4_%TS_no%.xlsb - Excel; Class = XLMAIN |
| 31 |
Mouse click |
|
|
Event = Left button; Wait = 0; Move = Off |
| 32 |
End loop |
|
|
— |
| 33 |
End region |
|
|
— |
| 34 |
Show message |
|
ButtonPressed3 |
Title = Portfolio Backtest; Message = %TS_no% of portfolio backtest to result.; Icon = Info; Buttons = OK; Default = First; Keep = Off; Close = Off |
| |
|
|
|
|
| Data Subflow |
|
|
|
|
Step
|
Action |
Capture |
Variable |
Parameters / Value Settings |
| 1 |
Send keys |
|
|
Keys = {Enter}; Target = Foreground window; Delay = 20; Hardware = Off |
| 2 |
Wait |
|
|
Duration = 1 |
| 3 |
Wait for window |
|
|
Title = Select data file; Class = XLMAIN; Wait = Open; Focus = Off; Fail = Off |
| 4 |
IF |
|
|
First = %sel_no%; Operator = Equals (=); Second = 0 |
| 5 |
Set clipboard text |
|
|
Text = C:\Users\WKLI\Documents\data100\d001.xlsm |
| 6 |
Send keys |
|
|
Keys = {Ctrl+V}{Enter}; Target = Foreground window; Delay = 20; Hardware = Off |
| 7 |
Wait |
|
|
Duration = 2 |
| 8 |
Focus window |
|
|
Title = Trading System ver3.3.4.xlsb - Excel; Class = XLMAIN |
| 9 |
ELSE |
|
|
— |
| 10 |
Set clipboard text |
|
|
Text = C:\Users\WKLI\Documents\data100\d0%TS_no%.xlsm |
| 11 |
Send keys |
|
|
Keys = {Ctrl+V}{Enter}; Target = Foreground window; Delay = 20; Hardware = Off |
| 12 |
Wait |
|
|
Duration = 2 |
| 13 |
Focus window |
|
|
Title = Trading System ver3.3.4_%TS_no%.xlsb - Excel; Class = XLMAIN |
| 14 |
End IF |
|
|
— |
| 15 |
Move mouse to image |
Check box |
Markets list |
Target = Markets list; Click = Left; Timeout = 5; Search = Entire screen |
| 16 |
Move mouse to image |
Button |
Add |
Target = Add; Click = Left; Timeout = 5; Search = Entire screen |
| |
|
|
|
|
| Strategy Subflow |
|
|
|
|
Step
|
Action |
Capture |
Variable |
Parameters / Value Settings |
| 1 |
Move mouse to image |
Button |
Strategy |
Target = Strategy; Click = Left; Timeout = 5; Search = Entire screen |
| 2 |
Send keys |
|
|
Keys = {Next:5}; Target = Foreground window; Delay = 20; Hardware = Off |
| 3 |
Move mouse to image |
Tile |
Strategy item |
Target = Strategy item; Click = Left; Timeout = 5; Search = Entire screen |
| 4 |
IF |
|
|
First = %Sel_row%; Operator = Equals (=); Second = 30 |
| 5 |
Send keys |
|
|
Keys = {Down}; Target = Foreground window; Delay = 20; Hardware = Off |
| 6 |
ELSE |
|
|
— |
| 7 |
Send keys |
|
|
Keys = {Down:2}; Target = Foreground window; Delay = 20; Hardware = Off |
| 8 |
End IF |
|
|
— |
| 9 |
IF |
|
|
First = %ButtonPressed%; Operator = Equals (=); Second = Yes |
| 10 |
Move mouse to image |
Check box |
Auto close |
Target = Auto close; Click = Left; Timeout = 5; Search = Entire screen |
| 11 |
End IF |
|
|
— |
| 12 |
Move mouse to image |
Button |
Setting OK |
Target = Setting OK; Click = Left; Timeout = 5; Search = Entire screen |
| 13 |
Send keys |
|
|
Keys = {Enter}; Target = Foreground window; Delay = 20; Hardware = Off |
| |
|
|
|
|
| Capital Subflow |
|
|
|
|
Step
|
Action |
Capture |
Variable |
Parameters / Value Settings |
| 1 |
Move mouse to image |
Button |
Capital |
Target = Capital; Click = Left; Timeout = 5; Search = Entire screen |
| 2 |
Move mouse to image |
List box |
Market |
Target = Market; Click = Left; Timeout = 5; Search = Entire screen |
| 3 |
Send keys |
|
|
Keys = {Down}100; Target = Foreground window; Delay = 20; Hardware = Off |
| 4 |
Move mouse to image |
Input box |
HKD |
Target = HKD; Click = Left; Timeout = 5; Search = Entire screen |
| 5 |
Send keys |
|
|
Keys = 200000{Enter}; Target = Foreground window; Delay = 20; Hardware = Off |
| 6 |
Move mouse to image |
Button |
Equalistation |
Target = Equalisation; Click = Left; Timeout = 5; Search = Entire screen |
| 7 |
Send keys |
|
|
Keys = {Left}; Target = Foreground window; Delay = 20; Hardware = Off |
| 8 |
Move mouse to image |
Button |
Capital OK |
Target = Capital OK; Click = Left; Timeout = 5; Search = Entire screen |
| 9 |
Send keys |
|
|
Keys = {Enter}; Target = Foreground window; Delay = 20; Hardware = Off |
| |
|
|
|
|
| Options Subflow |
|
|
|
|
Step
|
Action |
Capture |
Variable |
Parameters / Value Settings |
| 1 |
Move mouse to image |
Button |
Options |
Target = Options; Click = Left; Timeout = 5; Search = Entire screen |
| 2 |
Send keys |
|
|
Keys = {Enter}; Target = Foreground window; Delay = 20; Hardware = Off |
| 3 |
Move mouse to image |
Tile |
Portfolio |
Target = Options; Click = Left; Timeout = 5; Search = Entire screen |
| 4 |
Send keys |
|
|
Keys = {Enter}; Target = Foreground window; Delay = 20; Hardware = Off |