RandomTrader backtest tool/free code

Discussion in 'Strategy Building' started by RandomZen, May 20, 2009.

  1. This a free tool, which runs on NinjaTrader (also free).

    Test as many combinations as you can before putting your hard-earned dollars at stake.

    I have posted the ninjascript code in both text format and as a zip file.

    Ninja users know it is more convenient to just upload the strategy in the zip format and use it. The zip file is 100% safe.

    INSTRUCTIONS:

    1. Get a feel for optimal trade parameters by randomizing some or all of the trade settings.

    2. Time of entry: this should be any number from 1 through 380, the minutes of the trading session (minus 10 minutes).

    3. To enter a fixed (non-random) value, put in the same number in ‘min’ and ‘max’.

    For example, you want the trade to be taken at minute # 200 of the trading session. Each of ‘Time of Daily Entry Max’ and ‘Time of Daily Entry Min’ should be set to 200.

    4. To enter a randomized value, type in the range from which you want the random value to be selected.

    For example, you want the trade to be taken randomly within the first half hour of the session, type in ‘Time of Daily Entry Max’ = 30, and ‘Time of Daily Entry Min’ = 1.

    5. Random long/short trigger. To randomize the long/short decision, select ‘true’ for each of the ‘TradeLong’ and ‘TradeShort’.

    6. Note the parameters remain the same throughout one run (i.e., for each push of the ‘backtest’ button), they are not re-generated for each individual trade.

    7. ‘One trade in X bars’. Use this only if you want to take a trade less frequently than once per day. Otherwise this should be kept at 0.