A Mechanical Swing Trading System

Discussion in 'Journals' started by tradermaji, Sep 7, 2009.

  1. Nodoji,

    You are absolutely correct about the buy levels being a little far away. It is something that backtesting has shown to be areas where you can expect a bounce... remember, this system buys dips... but not all dips. Just looking for overreactions in the market. I am not looking for all orders to get filled every day, sometimes there will be days without orders being filled. This is a swing trading system and hence the frequency of trades are less. With more capital or more appetite for risk, one can add more stocks to the watchlist to trade more often. I actually tested this system for all the stocks of NDX100, but I don't think I can handle that many trades or the drawdowns.

    Thanks for your comments and questions. Helps me to keep things clean. :)
     
    #11     Sep 9, 2009
  2. No trades were hit today. All orders canceled and the new orders to be placed as follows:

    Symbol Date ChartScript Order Shares Type Price Signal Name
    AAPL 9/9/2009 %H&L-Aggressive Buy 200 Limit 163.28 Limit Entry
    ALTR 9/9/2009 %H&L-Aggressive Buy 1700 Limit 17.93 Limit Entry
    AMAT 9/9/2009 %H&L-Aggressive Buy 2400 Limit 12.66 Limit Entry
    ATVI 9/9/2009 %H&L-Aggressive Buy 2700 Limit 11.19 Limit Entry
    BRCM 9/9/2009 %H&L-Aggressive Buy 1100 Limit 27.22 Limit Entry
    CA 9/9/2009 %H&L-Aggressive Buy 1500 Limit 19.79 Limit Entry
    CMCSA 9/9/2009 %H&L-Aggressive Buy 2000 Limit 14.82 Limit Entry
    CSCO 9/9/2009 %H&L-Aggressive Buy 1400 Limit 20.95 Limit Entry
    DELL 9/9/2009 %H&L-Aggressive Buy 2100 Limit 14.20 Limit Entry
    DISH 9/9/2009 %H&L-Aggressive Buy 1900 Limit 15.51 Limit Entry
    EBAY 9/9/2009 %H&L-Aggressive Buy 1400 Limit 21.00 Limit Entry
    FLEX 9/9/2009 %H&L-Aggressive Buy 5400 Limit 5.52 Limit Entry
    INTC 9/9/2009 %H&L-Aggressive Buy 1600 Limit 19.01 Limit Entry
    MRVL 9/9/2009 %H&L-Aggressive Buy 2200 Limit 13.81 Limit Entry
    MSFT 9/9/2009 %H&L-Aggressive Buy 1300 Limit 23.62 Limit Entry
    NTAP 9/9/2009 %H&L-Aggressive Buy 1400 Limit 21.65 Limit Entry
    NVDA 9/9/2009 %H&L-Aggressive Buy 2200 Limit 13.39 Limit Entry
    NWSA 9/9/2009 %H&L-Aggressive Buy 3000 Limit 10.15 Limit Entry
    ORCL 9/9/2009 %H&L-Aggressive Buy 1400 Limit 21.11 Limit Entry
    QCOM 9/9/2009 %H&L-Aggressive Buy 700 Limit 43.80 Limit Entry
    RIMM 9/9/2009 %H&L-Aggressive Buy 400 Limit 71.40 Limit Entry
    SBUX 9/9/2009 %H&L-Aggressive Buy 1700 Limit 18.05 Limit Entry
    SPLS 9/9/2009 %H&L-Aggressive Buy 1400 Limit 20.89 Limit Entry
    STLD 9/9/2009 %H&L-Aggressive Buy 1900 Limit 15.56 Limit Entry
    SYMC 9/9/2009 %H&L-Aggressive Buy 2000 Limit 14.73 Limit Entry
    XLNX 9/9/2009 %H&L-Aggressive Buy 1500 Limit 20.60 Limit Entry
    YHOO 9/9/2009 %H&L-Aggressive Buy 2200 Limit 13.88 Limit Entry
     
    #12     Sep 9, 2009
  3. Just for kicks... this is the backtest result for the ultra-aggressive version of the system using the same stocks for the last four years (same period of simulation as the system being followed).

    You can see the higher profits but with more heartburn.

    Long + Short Buy & Hold
    Starting Capital $1,000,000.00 $1,000,000.00
    Ending Capital $1,791,017.94 $1,102,197.13
    Net Profit $791,017.94 $102,197.13
    Net Profit % 79.10% 10.22%
    Annualized Gain % 15.71% 2.47%
    Exposure 37.50% 99.81%

    Number of Trades 3,426 28
    Avg Profit/Loss $230.89 $3,649.90
    Avg Profit/Loss % 0.36% 10.31%
    Avg Bars Held 2.24 1,005.00

    Winning Trades 2,424 12
    Winning % 70.75% 42.86%
    Gross Profit $3,538,258.51 $267,298.95
    Avg Profit $1,459.68 $22,274.91
    Avg Profit % 2.38% 62.61%
    Avg Bars Held 1.61 1,005.00
    Max Consecutive 49 N/A

    Losing Trades 1,002 16
    Losing % 29.25% 57.14%
    Gross Loss ($2,747,240.57) ($165,101.81)
    Avg Loss ($2,741.76) ($10,318.86)
    Avg Loss % -4.51% -28.92%
    Avg Bars Held 3.77 1,005.00
    Max Consecutive 15 N/A

    Max Drawdown ($261,256.63) ($1,014,317.31)
    Max Drawdown % -19.13% -62.97%
    Max Drawdown Date 11/20/2008 11/20/2008

    Wealth-Lab Score 33.88 0.91
    Profit Factor 1.29 1.62
    Recovery Factor 3.03 0.1
    Payoff Ratio 0.53 2.16
    Sharpe Ratio 1.12 0.18
    Ulcer Index 4.65 25.53
    Luck Coefficient 9.19 3.76
    Pessimistic Rate of Return 1.21 0.92
    Equity Drop Ratio 0.28 2.17
     
    #13     Sep 10, 2009
  4. No trades were hit today. The signals for tomorrow are:

    Symbol Date ChartScript Order Shares Type Price Signal Name
    AAPL 9/10/2009 %H&L-Aggressive Buy 200 Limit 163.28 Limit Entry
    ALTR 9/10/2009 %H&L-Aggressive Buy 1700 Limit 17.91 Limit Entry
    AMAT 9/10/2009 %H&L-Aggressive Buy 2400 Limit 12.65 Limit Entry
    ATVI 9/10/2009 %H&L-Aggressive Buy 2700 Limit 11.19 Limit Entry
    BRCM 9/10/2009 %H&L-Aggressive Buy 1100 Limit 27.13 Limit Entry
    CA 9/10/2009 %H&L-Aggressive Buy 1500 Limit 19.79 Limit Entry
    CMCSA 9/10/2009 %H&L-Aggressive Buy 2000 Limit 14.80 Limit Entry
    CSCO 9/10/2009 %H&L-Aggressive Buy 1400 Limit 20.91 Limit Entry
    DELL 9/10/2009 %H&L-Aggressive Buy 2100 Limit 14.20 Limit Entry
    DISH 9/10/2009 %H&L-Aggressive Buy 1900 Limit 15.51 Limit Entry
    EBAY 9/10/2009 %H&L-Aggressive Buy 1400 Limit 20.96 Limit Entry
    FLEX 9/10/2009 %H&L-Aggressive Buy 5500 Limit 5.49 Limit Entry
    INTC 9/10/2009 %H&L-Aggressive Buy 1600 Limit 19.04 Limit Entry
    MRVL 9/10/2009 %H&L-Aggressive Buy 2200 Limit 13.79 Limit Entry
    MSFT 9/10/2009 %H&L-Aggressive Buy 1300 Limit 23.62 Limit Entry
    NTAP 9/10/2009 %H&L-Aggressive Buy 1400 Limit 21.80 Limit Entry
    NVDA 9/10/2009 %H&L-Aggressive Buy 2200 Limit 13.51 Limit Entry
    NWSA 9/10/2009 %H&L-Aggressive Buy 3000 Limit 10.13 Limit Entry
    ORCL 9/10/2009 %H&L-Aggressive Buy 1400 Limit 21.09 Limit Entry
    QCOM 9/10/2009 %H&L-Aggressive Buy 700 Limit 43.80 Limit Entry
    RIMM 9/10/2009 %H&L-Aggressive Buy 400 Limit 71.40 Limit Entry
    SBUX 9/10/2009 %H&L-Aggressive Buy 1700 Limit 18.05 Limit Entry
    SPLS 9/10/2009 %H&L-Aggressive Buy 1400 Limit 20.88 Limit Entry
    STLD 9/10/2009 %H&L-Aggressive Buy 1900 Limit 15.54 Limit Entry
    SYMC 9/10/2009 %H&L-Aggressive Buy 2000 Limit 14.72 Limit Entry
    XLNX 9/10/2009 %H&L-Aggressive Buy 1500 Limit 20.58 Limit Entry
    YHOO 9/10/2009 %H&L-Aggressive Buy 2200 Limit 13.84 Limit Entry
     
    #14     Sep 10, 2009
  5. pneuma

    pneuma

    2 ideas that might improve performance:

    1. I think you are placing too many orders, you will probably get a better performance by limiting the number you place. To do this is suggest you rank your signal by a metric (i suggest volatility for swing systems) and then only place the top 5-10 alerts.

    With Wealth Lab use something like this:
    SetPositionPriority(LastPosition, ATRP(Bar, 10))

    2. Also limiting the number of trades that you have open to less than 10 should decrease drawdown.

    See what you think,
    pneuma
     
    #15     Sep 10, 2009
  6. Pneuma,

    Thank you for the suggestion.

    Using your suggestion, and the same watchlist, the aggressive system results are given below. The one above provides for a good comparison.

    Long + Short Buy & Hold
    Starting Capital $1,000,000.00 $1,000,000.00
    Ending Capital $1,806,776.10 $1,118,797.94
    Net Profit $806,776.10 $118,797.94
    Net Profit % 80.68% 11.88%
    Annualized Gain % 15.95% 2.85%
    Exposure 37.26% 99.81%

    Number of Trades 3,430 28
    Avg Profit/Loss $235.21 $4,242.78
    Avg Profit/Loss % 0.37% 11.97%
    Avg Bars Held 2.23 1,006.00

    Winning Trades 2,431 12
    Winning % 70.87% 42.86%
    Gross Profit $3,586,459.49 $277,898.07
    Avg Profit $1,475.30 $23,158.17
    Avg Profit % 2.40% 65.10%
    Avg Bars Held 1.6 1,006.00
    Max Consecutive 49 N/A

    Losing Trades 999 16
    Losing % 29.13% 57.14%
    Gross Loss ($2,779,683.39) ($159,100.12)
    Avg Loss ($2,782.47) ($9,943.76)
    Avg Loss % -4.58% -27.87%
    Avg Bars Held 3.75 1,006.00
    Max Consecutive 14 N/A

    Max Drawdown ($282,146.88) ($1,014,317.31)
    Max Drawdown % -20.59% -62.97%
    Max Drawdown Date 11/20/2008 11/20/2008

    Wealth-Lab Score 33.99 1.06
    Profit Factor 1.29 1.75
    Recovery Factor 2.86 0.12
    Payoff Ratio 0.52 2.34
    Sharpe Ratio 1.13 0.18
    Ulcer Index 4.84 25.53
    Luck Coefficient 14.96 3.66
    Pessimistic Rate of Return 1.21 1
    Equity Drop Ratio 0.28 1.88
     
    #16     Sep 11, 2009
  7. Same set of parameters, but the watchlist is now all the Nasdaq 100 stocks. The drawdown increases, but the profits are way up, along with Profit Factor and Sharpe Ratio.

    Long + Short Buy & Hold
    Starting Capital $1,000,000.00 $1,000,000.00
    Ending Capital $2,534,391.37 $1,307,434.30
    Net Profit $1,534,391.37 $307,434.30
    Net Profit % 153.44% 30.74%
    Annualized Gain % 26.19% 6.94%
    Exposure 56.33% 99.85%

    Number of Trades 5,280 84
    Avg Profit/Loss $290.60 $3,659.93
    Avg Profit/Loss % 0.38% 30.84%
    Avg Bars Held 2.19 1,006.00

    Winning Trades 3,738 52
    Winning % 70.80% 61.90%
    Gross Profit $6,620,371.55 $409,582.12
    Avg Profit $1,771.10 $7,876.58
    Avg Profit % 2.39% 66.34%
    Avg Bars Held 1.55 1,006.00
    Max Consecutive 61 N/A

    Losing Trades 1,542 32
    Losing % 29.20% 38.10%
    Gross Loss ($5,085,980.18) ($102,147.83)
    Avg Loss ($3,298.30) ($3,192.12)
    Avg Loss % -4.50% -26.85%
    Avg Bars Held 3.76 1,006.00
    Max Consecutive 15 N/A

    Max Drawdown ($405,967.75) ($821,207.94)
    Max Drawdown % -22.73% -50.05%
    Max Drawdown Date 11/20/2008 11/20/2008

    Wealth-Lab Score 35.93 3.47
    Profit Factor 1.3 4.01
    Recovery Factor 3.78 0.37
    Payoff Ratio 0.53 2.47
    Sharpe Ratio 1.44 0.34
    Ulcer Index 4.53 18.84
    Luck Coefficient 15.02 6.86
    Pessimistic Rate of Return 1.24 2.94
    Equity Drop Ratio 0.17 0.77


    Now I tried with the list of the S&P100 and NDX100 stocks, many of them are common, so the list is around 170 stocks. Profits are up, but drawdowns are now obnoxious.
    Long + Short Buy & Hold
    Starting Capital $1,000,000.00 $1,000,000.00
    Ending Capital $2,683,945.27 $1,130,270.93
    Net Profit $1,683,945.27 $130,270.93
    Net Profit % 168.39% 13.03%
    Annualized Gain % 28.02% 3.11%
    Exposure 64.01% 99.78%

    Number of Trades 6,085 168
    Avg Profit/Loss $276.74 $775.42
    Avg Profit/Loss % 0.37% 13.10%
    Avg Bars Held 2.16 1,006.00

    Winning Trades 4,276 90
    Winning % 70.27% 53.57%
    Gross Profit $9,242,249.04 $270,793.33
    Avg Profit $2,161.42 $3,008.81
    Avg Profit % 2.65% 50.78%
    Avg Bars Held 1.55 1,006.00
    Max Consecutive 42 N/A

    Losing Trades 1,809 78
    Losing % 29.73% 46.43%
    Gross Loss ($7,558,303.78) ($140,522.40)
    Avg Loss ($4,178.17) ($1,801.57)
    Avg Loss % -5.04% -30.39%
    Avg Bars Held 3.6 1,006.00
    Max Consecutive 15 N/A

    Max Drawdown ($662,563.63) ($768,342.38)
    Max Drawdown % -29.49% -51.06%
    Max Drawdown Date 3/6/2009 3/9/2009

    Wealth-Lab Score 30.86 1.53
    Profit Factor 1.22 1.93
    Recovery Factor 2.54 0.17
    Payoff Ratio 0.53 1.67
    Sharpe Ratio 1.22 0.19
    Ulcer Index 6.78 19.38
    Luck Coefficient 30.13 8.96
    Pessimistic Rate of Return 1.2 1.55
    Equity Drop Ratio 0.17 1.79
     
    #17     Sep 11, 2009
  8. Symbol Date ChartScript Order Shares Type Price Signal Name
    AAPL 9/11/2009 %H&L-Aggressive Buy 200 Limit 163.28 Limit Entry
    ALTR 9/11/2009 %H&L-Aggressive Buy 1700 Limit 17.91 Limit Entry
    AMAT 9/11/2009 %H&L-Aggressive Buy 2400 Limit 12.65 Limit Entry
    ATVI 9/11/2009 %H&L-Aggressive Buy 2700 Limit 11.19 Limit Entry
    BRCM 9/11/2009 %H&L-Aggressive Buy 1100 Limit 27.13 Limit Entry
    CA 9/11/2009 %H&L-Aggressive Buy 1500 Limit 19.79 Limit Entry
    CMCSA 9/11/2009 %H&L-Aggressive Buy 2000 Limit 14.87 Limit Entry
    CSCO 9/11/2009 %H&L-Aggressive Buy 1400 Limit 20.91 Limit Entry
    DELL 9/11/2009 %H&L-Aggressive Buy 2000 Limit 14.88 Limit Entry
    DISH 9/11/2009 %H&L-Aggressive Buy 1900 Limit 15.51 Limit Entry
    EBAY 9/11/2009 %H&L-Aggressive Buy 1400 Limit 20.94 Limit Entry
    FLEX 9/11/2009 %H&L-Aggressive Buy 5500 Limit 5.48 Limit Entry
    INTC 9/11/2009 %H&L-Aggressive Buy 1600 Limit 19.12 Limit Entry
    MRVL 9/11/2009 %H&L-Aggressive Buy 2000 Limit 14.68 Limit Entry
    MSFT 9/11/2009 %H&L-Aggressive Buy 1300 Limit 23.62 Limit Entry
    NTAP 9/11/2009 %H&L-Aggressive Buy 1400 Limit 21.80 Limit Entry
    NVDA 9/11/2009 %H&L-Aggressive Buy 2200 Limit 13.75 Limit Entry
    NWSA 9/11/2009 %H&L-Aggressive Buy 3000 Limit 10.12 Limit Entry
    ORCL 9/11/2009 %H&L-Aggressive Buy 1400 Limit 21.08 Limit Entry
    QCOM 9/11/2009 %H&L-Aggressive Buy 700 Limit 43.80 Limit Entry
    RIMM 9/11/2009 %H&L-Aggressive Buy 400 Limit 71.37 Limit Entry
    SBUX 9/11/2009 %H&L-Aggressive Buy 1700 Limit 18.05 Limit Entry
    SPLS 9/11/2009 %H&L-Aggressive Buy 1400 Limit 20.88 Limit Entry
    STLD 9/11/2009 %H&L-Aggressive Buy 1900 Limit 15.51 Limit Entry
    SYMC 9/11/2009 %H&L-Aggressive Buy 2000 Limit 14.71 Limit Entry
    XLNX 9/11/2009 %H&L-Aggressive Buy 1500 Limit 20.58 Limit Entry
    YHOO 9/11/2009 %H&L-Aggressive Buy 2200 Limit 13.83 Limit Entry
     
    #18     Sep 13, 2009
  9. Symbol Date ChartScript Order Shares Type Price Signal Name
    AAPL 9/14/2009 %H&L-Aggressive Buy 200 Limit 163.28 Limit Entry
    ALTR 9/14/2009 %H&L-Aggressive Buy 1700 Limit 17.91 Limit Entry
    AMAT 9/14/2009 %H&L-Aggressive Buy 2400 Limit 12.65 Limit Entry
    ATVI 9/14/2009 %H&L-Aggressive Buy 2700 Limit 11.19 Limit Entry
    BRCM 9/14/2009 %H&L-Aggressive Buy 1100 Limit 27.13 Limit Entry
    CA 9/14/2009 %H&L-Aggressive Buy 1500 Limit 19.82 Limit Entry
    CMCSA 9/14/2009 %H&L-Aggressive Buy 2000 Limit 14.86 Limit Entry
    CSCO 9/14/2009 %H&L-Aggressive Buy 1400 Limit 20.91 Limit Entry
    DELL 9/14/2009 %H&L-Aggressive Buy 2000 Limit 14.92 Limit Entry
    DISH 9/14/2009 %H&L-Aggressive Buy 1900 Limit 15.47 Limit Entry
    EBAY 9/14/2009 %H&L-Aggressive Buy 1400 Limit 20.94 Limit Entry
    FLEX 9/14/2009 %H&L-Aggressive Buy 5500 Limit 5.48 Limit Entry
    INTC 9/14/2009 %H&L-Aggressive Buy 1600 Limit 19.12 Limit Entry
    MRVL 9/14/2009 %H&L-Aggressive Buy 2000 Limit 14.68 Limit Entry
    MSFT 9/14/2009 %H&L-Aggressive Buy 1300 Limit 23.65 Limit Entry
    NTAP 9/14/2009 %H&L-Aggressive Buy 1400 Limit 21.80 Limit Entry
    NVDA 9/14/2009 %H&L-Aggressive Buy 2200 Limit 13.75 Limit Entry
    NWSA 9/14/2009 %H&L-Aggressive Buy 3000 Limit 10.12 Limit Entry
    ORCL 9/14/2009 %H&L-Aggressive Buy 1400 Limit 21.08 Limit Entry
    QCOM 9/14/2009 %H&L-Aggressive Buy 700 Limit 43.90 Limit Entry
    RIMM 9/14/2009 %H&L-Aggressive Buy 400 Limit 71.24 Limit Entry
    SBUX 9/14/2009 %H&L-Aggressive Buy 1700 Limit 18.05 Limit Entry
    SPLS 9/14/2009 %H&L-Aggressive Buy 1400 Limit 20.85 Limit Entry
    STLD 9/14/2009 %H&L-Aggressive Buy 1900 Limit 15.51 Limit Entry
    SYMC 9/14/2009 %H&L-Aggressive Buy 2000 Limit 14.71 Limit Entry
    XLNX 9/14/2009 %H&L-Aggressive Buy 1500 Limit 20.58 Limit Entry
    YHOO 9/14/2009 %H&L-Aggressive Buy 2200 Limit 13.83 Limit Entry
     
    #19     Sep 14, 2009
  10. Hi, TraderMaj. I can see you are using wealth lab pro. I think you might have far greater results with Superbands, with Linear Regression Analysis:

    All Trades Long Trades Short Trades Buy & Hold
    Starting Capital $1,000,000.00 $1,000,000.00 $1,000,000.00 $1,000,000.00
    Ending Capital $33,396,941.40 $33,396,941.40 $1,000,000.00 $35,011,756.09
    Net Profit $32,396,941.40 $32,396,941.40 $0.00 $34,011,756.09
    Net Profit % 3,239.69% 3,239.69% 0.00% 3,401.18%
    Annualized Gain % 21.81% 21.81% 0.00% 22.13%
    Exposure 6.87% 6.87% 0.00% 103.13%
    Total Commission ($415,936.00) ($415,936.00) $0.00 ($3,354.41)
    Return on Cash $0.00 $0.00 $0.00 $0.00
    Margin Interest Paid $0.00 $0.00 $0.00 $0.00
    Dividends Received $0.00 $0.00 $0.00 $0.00

    Number of Trades 25,996 25,996 0 100
    Average Profit $1,246.23 $1,246.23 $0.00 $340,117.56
    Average Profit % 1.39% 1.39% 0.00% 1,535.09%
    Average Bars Held 2.00 2.00 0.00 3,591.95

    Winning Trades 16,062 16,062 0 95
    Win Rate 61.79% 61.79% 0.00% 95.00%
    Gross Profit $62,742,509.83 $62,742,509.83 $0.00 $34,063,429.86
    Average Profit $3,906.27 $3,906.27 $0.00 $358,562.42
    Average Profit % 4.45% 4.45% 0.00% 1,618.62%
    Average Bars Held 2.00 2.00 0.00 3,673.80
    Max Consecutive Winners 159 159 0 76

    Losing Trades 9,934 9,934 0 5
    Loss Rate 38.21% 38.21% 0.00% 5.00%
    Gross Loss ($30,345,568.44) ($30,345,568.44) $0.00 ($51,673.77)
    Average Loss ($3,054.72) ($3,054.72) $0.00 ($10,334.75)
    Average Loss % -3.55% -3.55% 0.00% -51.99%
    Average Bars Held 2.00 2.00 0.00 2,036.80
    Max Consecutive Losses 108 108 0 1

    Maximum Drawdown ($3,671,744.41) ($3,671,744.41) $0.00 ($25,218,049.42)
    Maximum Drawdown Date 11/20/2008 11/20/2008 12/2/1991 10/7/2002
    Maximum Drawdown % -11.54% -11.54% 0.00% -65.56%
    Maximum Drawdown % Date 11/20/2008 11/20/2008 9/14/2009 10/7/2002

    Wealth-Lab Score 280.74 280.74 0.00 7.39
    Sharpe Ratio 1.40 1.40 0.00 0.84
    Profit Factor 2.07 2.07 0.00 659.20
    Recovery Factor 8.82 8.82 0.00 1.35
    Payoff Ratio 1.25 1.25 0.00 31.13


    And, here's the program in .NET code:

    using System;
    using System.Collections.Generic;
    using System.Text;
    using System.Drawing;
    using WealthLab;
    using WealthLab.Indicators;namespace WealthLab.Strategies
    {
    public class SuperBands : WealthScript
    {
    protected override void Execute()
    {
    // Define data series
    BBandLower bbL = BBandLower.Series( Low, 10, 1.5 );
    BBandUpper bbU = BBandUpper.Series( Close, 10, 1.5 );
    DataSeries UpperBand = BBandUpper.Series( High, 10, 1.5 ) * 1.3; // misc
    WealthLab.LineStyle solid = WealthLab.LineStyle.Solid;
    double f = 0.945; // Plot Indicators
    PlotSeries( PricePane, bbL, Color.Black, solid, 1 );
    PlotSeries( PricePane, bbU, Color.Black, solid, 1 );
    PlotSeries( PricePane, UpperBand, Color.Chocolate, solid, 1 ); for(int n = 10; n > 0; n--)
    {
    DataSeries LowerBand = BBandLower.Series( Close, 10, 1.5 ) * f;
    PlotSeries( PricePane, LowerBand, Color.Chocolate, solid, 1 );
    f -= 0.0025;
    }

    for(int bar = 20; bar < Bars.Count-1; bar++)
    {
    double l = LineExtendX( bar-10, LinearReg.Series( Close, 10 )[bar-10],
    bar-1, LinearReg.Series( Close, 10 )[bar-1], Close[bar] );

    if (IsLastPositionActive)
    {
    Position p = LastPosition;
    if (bar + 1 - p.EntryBar >= 1 )
    SellAtMarket( bar+1, Position.AllPositions, "Time-based");
    }
    else
    {
    if( Close[bar] > 5.0 ) // filter out low-priced stocks
    {
    f = 0.945;
    for(int n = 10; n > 0; n--)
    {
    if( l > ( BBandLower.Series( Low, 10, 1.5 )[bar] * f ) )
    {
    if( Open[bar+1] > ( bbL[bar] * f ) )
    {
    //if( BuyAtLimit( bar+1, bbL[bar] * f ) != null )
    if( BuyAtLimit( bar+1,
    ( BBandLower.Series( Low, 10, 1.5 )[bar] * f ) ) != null )
    LastPosition.Priority = n;
    f -= 0.0025;
    }
    }
    }
    }
    }
    }
    }
    }
    }


    The problem I see with your current version is a sparse amount of data. Not to mention we're only talking about a 10% annualized system, when I can assure you there's far greater systems out there, and you should know by now. At least you have a system to show, but you still have a lot to learn about Wealth Lab.

    This is on the NAZ100 with a $1,000,000 starting capital and 1% of equity position sizing with 2:1 leverage.
     
    #20     Sep 14, 2009