This makes pipeline values, orders and intraday leverage visible.
Addresses the previous max intraday leverage of 2 (from buying when sell was unfilled).
More output at the bottom in Source Code tab
You'll want to address the EEM Flyr NaN.
2004-01-02 05:45 before_trading_start:96 INFO .
F1yr F20d F3m F6m Rank Score
Equity(12915 [MDY]) 0.312246 0.001519 0.098958 0.183990 4.0 0.149178
Equity(21769 [IEV]) 0.324552 0.045654 0.159640 0.214569 2.0 0.186104
Equity(23118 [EPP]) 0.405521 0.034187 0.078139 0.206206 3.0 0.181013
Equity(23134 [ILF]) 0.573648 0.056455 0.156921 0.295129 1.0 0.270538
Equity(24705 [EEM]) NaN 0.059416 0.159293 0.318650 NaN NaN
2004-01-02 05:45 log_pipe:231 INFO len 5
min mean max
F1yr 0.312245808241 0.403991685886 0.573647562935 NaNs 1/5
F20d 0.00151889120942 0.0394460654015 0.0594161715319
F3m 0.0781389800179 0.130590178576 0.15963963964
F6m 0.183989809724 0.243708652001 0.318649517685
Rank 1.0 2.5 4.0 NaNs 1/5
Score 0.149178210627 0.1967082655 0.2705379173 NaNs 1/5
2004-01-02 05:45 log_pipe:245 INFO _ _ _ F1yr _ _ _
... F1yr highs
F1yr F20d F3m F6m Rank Score
Equity(23134 [ILF]) 0.573648 0.056455 0.156921 0.295129 1.0 0.270538
Equity(23118 [EPP]) 0.405521 0.034187 0.078139 0.206206 3.0 0.181013
Equity(21769 [IEV]) 0.324552 0.045654 0.159640 0.214569 2.0 0.186104
... F1yr lows
[snip]
There are some issues filling orders to be aware of.
2004-01-05 06:31 picks:131 INFO ETF
2004-01-06 06:31 buys:158 INFO
Buy: ILF
2004-01-06 06:31 _trac:280 INFO 1 Buy 159 ILF _ at 62.86 d2b9
2004-01-06 06:32 _trac:280 INFO 2 ILF 159 unfilled d2b9
2004-01-06 06:33 _trac:280 INFO 3 ILF 159 unfilled d2b9
2004-01-06 06:34 _trac:280 INFO 4 ILF 159 unfilled d2b9
2004-01-06 06:35 _trac:280 INFO 5 ILF 159 unfilled d2b9
2004-01-06 06:36 _trac:280 INFO 6 ILF 159 unfilled d2b9
2004-01-06 06:37 _trac:280 INFO 7 ILF 159 unfilled d2b9
2004-01-06 06:38 _trac:280 INFO 8 ILF 159 unfilled d2b9
2004-01-06 06:39 _trac:280 INFO 9 ILF 159 unfilled d2b9
2004-01-06 06:40 _trac:280 INFO 10 ILF 159 unfilled d2b9
2004-01-06 06:41 _trac:280 INFO 11 Bot 159 ILF (159) at 62.86 d2b9
2004-02-03 06:31 picks:131 INFO ETF
2004-02-04 06:31 buys:158 INFO
Buy: ILF
2004-03-02 06:31 picks:131 INFO ETF
2004-03-03 06:31 buys:158 INFO
Buy: ILF
2004-04-02 06:31 picks:131 INFO Safety
2004-04-02 06:31 sells:145 INFO
Sell: ILF
2004-04-02 06:31 _trac:280 INFO 1 Sell -159 ILF (159) at 63.50 c63a
2004-04-02 06:32 _trac:280 INFO 2 ILF -159 unfilled c63a
2004-04-02 06:33 _trac:280 INFO 3 ILF -159 unfilled c63a
2004-04-02 06:34 _trac:280 INFO 4 ILF -159 unfilled c63a
2004-04-02 06:35 _trac:280 INFO 5 ILF -159 unfilled c63a
2004-04-02 06:36 _trac:280 INFO 6 ILF -159 unfilled c63a
2004-04-02 06:37 _trac:280 INFO 7 ILF -159 unfilled c63a
2004-04-02 06:38 _trac:280 INFO 8 ILF -159 unfilled c63a
2004-04-02 06:39 _trac:280 INFO 9 ILF -159 unfilled c63a
2004-04-02 06:40 _trac:280 INFO 10 ILF -159 unfilled c63a
2004-04-02 06:41 _trac:280 INFO 11 ILF -159 unfilled c63a
2004-04-02 06:42 _trac:280 INFO 12 ILF -159 unfilled c63a
2004-04-02 06:43 _trac:280 INFO 13 ILF -159 unfilled c63a
2004-04-02 06:44 _trac:280 INFO 14 ILF -159 unfilled c63a
2004-04-02 06:45 _trac:280 INFO 15 ILF -159 unfilled c63a
2004-04-02 06:46 _trac:280 INFO 16 ILF -159 unfilled c63a
2004-04-02 06:47 _trac:280 INFO 17 Sold -159 ILF _ at 64.20 c63a
2004-04-05 06:31 buys:158 INFO
Buy: SHY
2004-04-05 06:31 _trac:280 INFO 1 Buy 123 SHY _ at 82.42 9f91
2004-04-05 06:32 _trac:280 INFO 2 Bot 123 SHY (123) at 82.42 9f91
2004-05-04 06:31 picks:131 INFO Safety
2004-05-05 06:31 buys:158 INFO
Buy: SHY
2004-06-02 06:31 picks:131 INFO Safety
2004-06-03 06:31 buys:158 INFO
Buy: SHY
2004-07-02 06:31 picks:131 INFO ETF
2004-07-02 06:31 sells:145 INFO
Sell: SHY
2004-07-02 06:31 _trac:280 INFO 1 Sell -123 SHY (123) at 81.78 46d6
2004-07-02 06:32 _trac:280 INFO 2 SHY -123 unfilled 46d6
2004-07-02 06:33 _trac:280 INFO 3 SHY -123 unfilled 46d6
2004-07-02 06:34 _trac:280 INFO 4 SHY -123 unfilled 46d6
2004-07-02 06:35 _trac:280 INFO 5 SHY -123 unfilled 46d6
2004-07-02 06:36 _trac:280 INFO 6 SHY -123 unfilled 46d6
2004-07-02 06:37 _trac:280 INFO 7 SHY -123 unfilled 46d6
2004-07-02 06:38 _trac:280 INFO 8 SHY -123 unfilled 46d6
2004-07-02 06:39 _trac:280 INFO 9 SHY -123 unfilled 46d6
2004-07-02 06:40 _trac:280 INFO 10 SHY -123 unfilled 46d6
2004-07-02 06:41 _trac:280 INFO 11 Sold -30/-123 SHY (93) at 81.79 (-20) 46d6
2004-07-02 06:44 _trac:280 INFO 14 Sold -90/-123 SHY (3) at 81.83 (-60) 46d6
2004-07-02 06:47 _trac:280 INFO 17 Sold -123 SHY _ at 81.83 46d6
2004-07-06 6:31 buys:159 INFO
Buy: MDY
2004-07-06 6:31 _trac:281 INFO 1 Buy 92 MDY _ at 109.32 d7d0
2004-07-06 6:32 _trac:281 INFO 2 Bot 92 MDY (92) at 109.27 d7d0
[snip]
Orders become more interesting if you want to turn on try_all_longs.
Then you could try replacing .Rank with .F3m or something (and each one) to see how those compare.
Or adding two or more while leaving one or more out or use a threshold or whatever else you can think of to try.
All a bit easier with this visibility and style of code.
2007-12-04 06:31 _trac:281 INFO 1 Sell -14 EEM (14) at 152.75 5f8a
2007-12-04 06:31 _trac:281 INFO 1 Sell -35 MDY (35) at 154.81 975e
2007-12-04 06:31 _trac:281 INFO 1 Sell -4 ILF (4) at 247.59 2973
2007-12-04 06:31 _trac:281 INFO 1 Sell -19 EPP (19) at 166.00 134a
2007-12-04 06:31 _trac:281 INFO 1 Sell -37 IEV (37) at 120.27 fb58
2007-12-04 06:32 _trac:281 INFO 2 Sold -19 EPP _ at 165.72 134a
2007-12-04 06:32 _trac:281 INFO 2 IEV -37 unfilled fb58
2007-12-04 06:32 _trac:281 INFO 2 ILF -4 unfilled 2973
2007-12-04 06:32 _trac:281 INFO 2 Sold -14 EEM _ at 152.84 5f8a
2007-12-04 06:32 _trac:281 INFO 2 Sold -35 MDY _ at 154.78 975e
2007-12-04 06:33 _trac:281 INFO 3 IEV -37 unfilled fb58
2007-12-04 06:33 _trac:281 INFO 3 ILF -4 unfilled 2973
2007-12-04 06:34 _trac:281 INFO 4 Sold -37 IEV _ at 119.24 fb58
2007-12-04 06:34 _trac:281 INFO 4 ILF -4 unfilled 2973
2007-12-04 06:35 _trac:281 INFO 5 Sold -4 ILF _ at 248.52 2973
(Just thought I'd try to help because someone kindly contacted me about this but otherwise my interest is only in dynamically selected 50+ stocks).