Need quick TS code, simple strategy, I will pay you!

Discussion in 'Strategy Building' started by BillySimas, Sep 6, 2006.

  1. You don't need to code this to test it...if you think it works, you've probably looked at a few charts. Well....take a look at the last weeks worth of data, and see if it looks promising. Then pick another week at random, and look at it again. Then watch it in real time for a few days, if it still looks good, then start with a single contract and see if your actual results mirror your test results. A normal skid factor is 20 to 30%. So your results might come in at 70% of what you were expecting. If all goes well, then you start to turn it up and earn an income.

    That's how you find edges in the market place. Nothing can replace the actual process of learning that one gets by working a strategy from start to finish. Reviewing the charts, trades, and learning from the experience.
     
    #11     Sep 6, 2006
  2. It's very tedious to backtest this by hand, but yes I have done it hundreds of times and have made money trading it in the past couple weeks. I've been trading for 5 years, I'm aware of what you're saying but I'm not a programmer. I'm done with this thread, all the replies are just people trying to tell me how to trade and nothing has been mentioned about code. I will just figure it out on my own.
     
    #12     Sep 6, 2006

  3. If you've made money then why would you want to backtest it....or worse yet...reveal to the masses something you're doing to make money. That type of strategy can be arbed very quickly as there are only x contracts that can be traded before liquidity becomes a problem. Then again, you probably knew that.
     
    #13     Sep 6, 2006
  4. How many cliches are you going to write?
     
    #14     Sep 6, 2006
  5. Intrabar testing with look-inside testing doesn't currently work with tick intervals in TradeStation (IIRC). If you test using ticks with intrabar order generation enabled, it simply tests each bar four times. Once at the open, then the high (or low), then the low (or high), then the close. This produces not so reliable results as it gives your system knowledge of the actual high and low of the bar even though at runtime you'd never know them. I've run into backtests where this made things look awesome, artificially.
     
    #15     Sep 6, 2006
  6. Thanks, that's probably why I've had such a tough time trying to get the code to work. Thank you for the RELEVANT information, much appreciated!!
     
    #16     Sep 6, 2006
  7. I tested the following strategy...

    Code:
    inputs:
    	required_price_move_in_ticks(10),
    	target_in_ticks(10),
    	stop_in_ticks(10);
    
    SetStopPosition;
    if target_in_ticks > 0 then SetProfitTarget(target_in_ticks * MinMove/PriceScale);
    if stop_in_ticks > 0 then SetStopLoss(stop_in_ticks * MinMove/PriceScale);
    
    if Time >= 930 and Time <= 1555 then begin
    	if Close >= Low + required_price_move_in_ticks * MinMove/PriceScale then begin
    		Sell Short next bar at Market;
    	end;
    end;
    
    Which (after an optimization) produced the following results... Truly awesome. Until you add in commissions. :) I've got a screen shot of that version too if anyone wants to see it.

    Not saying this is exactly what you are asking for, but I thought I'd play with it a little for fun.
     
    #17     Sep 6, 2006
  8. Don't forget something for slippage too...
     
    #18     Sep 6, 2006
  9. And pray that it is positive slippage. :)

    Here's commissions added to the above (zero slippage).

    Again, just to make it clear. I'm not trying to trash the original authors system. Just illustrating some of the difficulties of getting a proper backtest of the system due to platform limitations (specifically not being able to test on a tick by tick basis inside the bars). You could potentially, however, setup a system that runs on bars of size one tick and have the strategy track the time delta itself so it knows how much time has passed (to keep it in the 1-2 minute realm of a spike). However that brings up another TradeStation limitation of not providing the second in the time data to EasyLanguage functions. Therefore you'd have basically a one minute margin of error when tracking the elapsed time.
     
    #19     Sep 6, 2006
  10. If adding commissions kills it, it likely means the average amount per winning trade is so small that it can't account for covering commissions, let alone any negative slippage.

    I thought tradestation could resolve to tick level, but without as much history available as minute intervals....
     
    #20     Sep 6, 2006