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

TradeStation does have 6 months worth of tick data. However it will not currently look inside multi-tick bars (at each tick) during strategy testing.
 
I just realized I made a goof in the stop and profit target code. The two lines should have been this:

Code:
if target_in_ticks > 0 then SetProfitTarget(target_in_ticks * MinMove);
if stop_in_ticks > 0 then SetStopLoss(stop_in_ticks * MinMove);

The results aren't quite as bleak when commissions are added in. Still not really tradeable with this exact code though.
 
Quote from phoenix_rising:

I just realized I made a goof in the stop and profit target code. The two lines should have been this:

Code:
if target_in_ticks > 0 then SetProfitTarget(target_in_ticks * MinMove);
if stop_in_ticks > 0 then SetStopLoss(stop_in_ticks * MinMove);

The results aren't quite as bleak when commissions are added in. Still not really tradeable with this exact code though.


Phoenix, thanks so much for the sample code. I tried it out and it doesn't seem to pick up all the signals. Also, the entries aren't shorting the next bar at the market. I PM'd you.
 
Quote from BillySimas:

How many cliches are you going to write?


As many as it takes, quit acting like a know it all hot shot, respect is earned! Do you know what a cliche' really is? If you really thought you had a good idea for scalping you wouldn't come on here and put it out there for 50k traders to look at and play with tomorrow morning. There is nothing cliche about that, or you wouldn't share it. As an example, take opg orders, use to be a great game, in fact, you use to be able to just make a living trading the open. Today it's just a game. You make money on many days, but the losing day wipes out a months of gains, if not more in a single session. The reason for its demise, mass marketing by Don Bright, do you really think your scalping strategy can hold up with this many eyes watching it?

Good luck with this, I hope it turns out to be a winning strategy...but backtests only go so far. The instinct a good scalper can take something like this and make it profitable in any number of ways. I'm sure our scalpers here can offer some insight, scalpers?
 
Quote from mschey:

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.

I have many failing strategies that use setups that "look" profitable on the charts. But when you tabulate all the wins and losses, the strat is still a loser. Sometimes a devastating loser at that.

I would be very careful when listening to this kind of reasoning.

RoughTrader
 
Here it is for 2 min candlesticks, unconsecutive 9 upticks, based on the previous low. I don't know exactly if it was what you were looking for:

inputs : Level( 9 ), StopAmount( 50 ), ProfitAmount( 35 );
variables : BaseLow( 0 );

BaseLow = Low;

Sell short next bar at BaseLow + Level limit;

SetstopLoss( StopAmount );
SetProfitTarget( ProfitAmount );
 
Back
Top