Best Thread Algorithmic trading experiences

On the subject of stop loss & profit target - just be wary of one thing.

If your profit target is 3 ATRs and your stop loss is 2 ATRs, do not get excited when your win rate is 40%. Given a random entry, a 2 ATR stop loss & 3 ATR profit target, you will have 3 out of 5 losing trades and 2 out of 5 winning trades.

Your win rate needs to exceed the ratio of stop loss to profit target otherwise, you haven't got an edge.
 
If you average win is £69, average lose is £32ish then you do have a scalping system.

I think you need to look at a minimum of 2 timeframes, use the higher 1 for direction & the lower one to trade in.

When you consider trends - also consider the timeframe. The market may be trending in the 5 min time frame but be cyclic/choppy in the 60 min time frame. In fact, a cycle reversal in a higher time frame is going to be a trend in a lower timeframe.

Nuff said...

It trades in the 60min+ time frame but the trend establishment I mentioned is in the 1d timeframe. I get your point though. The ATR stop-loss thing is WallStreetTraders thing, not mine btw - I was merely commenting on it.
 
It trades in the 60min+ time frame but the trend establishment I mentioned is in the 1d timeframe. I get your point though. The ATR stop-loss thing is WallStreetTraders thing, not mine btw - I was merely commenting on it.

Nothing wrong with ATR based stop loss for your initial stop as it will give you something related to volatility.

I was just outlining how stop loss & profit target setting can skew your results.

For instance, set a 3 * ATR stop loss & a 2 * ATR profit target on a random entry strategy & you will have yourself a 60% win rate. No profit though.
 
For instance, set a 3 * ATR stop loss & a 2 * ATR profit target on a random entry strategy & you will have yourself a 60% win rate. No profit though.

I understand this only too well after getting excited about Win% being high in the past but essentially running at a loss. If my Kelly value < 0 then I know something isn't right :)
 
remember bookies and casino's only have a very small edge, but they make very good money. A edge is a edge, try to use postion sizing, money money mangement and compounding to make return great. A casino can suffer a streak of big hitters but because their model is postion sized correctly they will always come on top in the end. Positon sizing is key and should be to the volatility of the market.

The vwap128 code is a trend following code, it is not a scalper and needs alot of confirmation to give a signal. I do have a $vix scalping code also which is currently performing great over last 2 months.

The vwap128 made $39k net in forward testing last month based on iraj's postion sizing. My intail size will be starting at 10x lower than his, so my return would have been $3,800 net last month based on very small edge but correct postion sizing, but my average win will always be higher than the average loss and the idea of frequency is that if you have an edge is too trade that edge as much as you can regardless of executon costs as there costs are included within the edge.

so far my average win is $603
ave loss $416
win rate 47%
 
you must thing objectively of what you are trying to achieve before you start. People do say that trading is just assumptions, and i agree to a certain level as bookies and casino's have their edge made up within their probabilies where as our models can not rely on this due to random not guaranteed behaviour.

having said all that i strongly believe we can achieve a better than random entry and by using postion sizing and money management correctly we can achieve our goals
 
having said all that i strongly believe we can achieve a better than random entry and by using postion sizing and money management correctly we can achieve our goals

I agree with that. The money-mgmt/risk side of the code uses a combination of Kelly for positions sizing and applies the 50/50 rule from Shannon theory for portfolio rebalancing. It's active in the code but not being used as I'm trying to do the tuning for the entry/exit rules. Once I'm happy with this then I'll apply money-mgmt. I understand the importance of money mgmt.
 
Here's my list for the budding algo trader

1) Mastering The Trade - Carter - best newbie book - great place to get a foundation on market internals & the fact there is more to life than moving average crossovers.
2) Electronic & Algorithmic Trading Technology by Kendall Kim - to find out what the institutions are doing with program trading.
3) The Profit Magic of Stock Transaction Timing - J M Hurst - for info on cycle analysis theories
4) Value in Time - Willain - on using time & volume as well as price action. Worth the money for chapter 1 that gives details on how program trades manipulate price & how you can track that activity
5) Trade like a hedge fund by James Altucher - some interesting concepts discussed
6) High Probability Trading Strategies: Entry to Exit Tactics for the Forex, Futures, and Stock Markets - James C Miner - a book that discusses some solid multi time frame strategies that could be automated.

Anyone else ?
 
Building a neural network. Easy to build. Training it though is another matter altogether. A friend of mine is basing his system on a neural net.

Using FFT's. I've coded FFT in the past for digital signal processing. This is ok for simple datasets.

Both FFT and Neural Nets require a lot of computational horsepower if the dataset is large and relatively noisy as is the case with price data.

I'm going to stick with what I've started based upon TA and other more exotic things I'll try and derive.

I know nothing about statistical trading. WRT fundamental's, I've decided to go down the TA route rather than the fundamental route. I get a sense that market behaviour has little to do with the company and rather more about the faddy nature of human behaviour.

Hello everyone, I am new here :)
I am also interested in algorithmic trading - by profession I am a senior DSP researcher with PhD and extensive experience in automated signal interpretetion (in pro audio, medical applications, seismic signal, and industry).
Now I would like to play a bit with forex signals.

---
To clarify above:
:idea:Neural Network - training and verification is crucial. This is not a magical tool, but just a non-linear type of classifier. The more straightforward parameters describing the situation to be predicted, the prediction (with NN) will be more accurate. In other words, if you end up with a set of parameters allowing for very good prediction of the trend behaviour, the network will work very well.
But if you know these, you do not need the neural net...

:idea:FFT - works well for periodic signals (e.g. sinusoidal signal, square waveform, or other quasi-periodic waveforms). If there is periodicity in the trend, than FFT is useful for prediction (as well as linear prediction, and other periodicity DSP algorithms).

--
(y)Both are computationally inexpensive - considering available today's CPU power of a personal computers.

==
I have one question: Where can I obtain historical data for forex (with > 0.3 Hz sampling rate = updated at least every 3 seconds, or more frequently ;) ) -> for the last 10 years?
Is it possible to obtain it for free?
I am also interested in purchasing the data sets - please suggest where.

Thanx, 3d
 
Last edited:
Hi,

I'm new to these boards and also new to trading. I've found lots of the information posted on the stickies really useful to compliment what I've read on technical analysis. I'm genuinely pleased to have stumbled upon this place.

Basically I came to the conclusion some time ago that people's behaviour in making trading decisions is the often the root cause of them losing money. So I thought I would build some software that took 'me' out of the equation and code up algorithms based purely on technical analysis. The system is currently working on UK stocks. Over the next 12 months I'm going to trade on paper and refine the algorithms until I find some strategies that are generally consistent. Once I'm confident with it, then I'll put it to work for real. Kind of my pension really.

The current strategies are all based around trends that occur over 2-3 days periods. This is putting me on paper in and out of the market quite frequently. I don't mind this if the 'little and often' culminates in a positive return but I get a sense that more lucrative strategies are longer term and are in the order of months.

Is this why people tend to enter positions with a view to a longer timeframe rather than day trade? I'd be interested in the reasons why people day-trade vs taking longer positions. I don't currently understand why people would choose one over another I suppose.

Also I tried to search for anything on algo trading on these forums and nothing popped up. Is what I'm doing quite marginal or is it just down to the fact that most experienced traders aren't software developers?

cheers

robster

e2a - typo in thread title - good intro from me eh................

How is it going?
 
How is it going?

It's generally going well primarily because I followed quite a bit of good advice I was given on here. The potted summary of it all is that it took until March to refine a system that worked relatively well for both long and short signals that wasn't curve fitted. For the first 4 months it returned about 30% with a R:R of 1.97 and a win% of 47% using compounding. When it gets to 11th Dec I am going to run a full 12month backtest to see how it gets on for the year.

I also wrote a stock scanner for identifying swing trading opportunities in FTSE100 stocks which generated a profit, although not as good as I was hoping.

My focus since march though has been about learning to trade. I concluded that the only way I am going to be able to write a coherent system is by being able to trade myself and understand the environment. I have realised there are lot's of things I cannot teach a system but a system probably has better discipline than me. For the record it looks like I out-perform the automated system.

What I may do next year is run my system in parallel with me for 12months and see who does better. I trade breakout's and reversals when rangebound, the system trades based upon some signals, retracements and MA's. Be interesting to see which one of us does better. I think I already know the answer to that one.
 
It is a long hard road.It took me 3 years to get a first set of systems on live trading.I did it on metatrader and may have to rewrite to an API.

My automated trading is far superior to manual trading.Only problem is I could not get consistency in profits.So I had to devise advanced systems , which I am currently working on currently.

The third version is semi automated.I just pick the entries , everything else is done by EAS.

It is definitely worth it because it enables me to trade multiple strategies and instruments simultaneously.

Good luck

O D T
 
It is a long hard road.It took me 3 years to get a first set of systems on live trading.I did it on metatrader and may have to rewrite to an API.

My automated trading is far superior to manual trading.Only problem is I could not get consistency in profits.So I had to devise advanced systems , which I am currently working on currently.

The third version is semi automated.I just pick the entries , everything else is done by EAS.

It is definitely worth it because it enables me to trade multiple strategies and instruments simultaneously.

Good luck

O D T



Definitely worth it if you can stick with it. It is a long and hard task as you say.

It takes a while just to get your thinking in order so you can actually begin to program. I have developed several strategies that are trend base and work extremely well .

I am in the process of developing a semi automated one now which is a little more complex because it should (hopefully) track the live market and be able to identify the right trades and stay out of the noise. For testing this, i don't use any charts, just follow what the indicator is saying and make decisions accordingly.



Robster

Even if you can automate part of the decision making process that in itself can be of great benefit. Then add more criteria as you go on .

Good luck
 
I'd have a look at the tools/geek forum and see what turns up there. I think NinjaTrader is free. I might be wrong. It never even occurred to me to look for an off the shelf one seeing as I can hack code out.

Ninja is not really free , it costs money for live accounts usage.

http://www.ninjatrader.com/webnew/subscribe_trading_platform_own.htm

With tradestation one is tied to the forex bucketshops indirectly , and tradestation brokerage may only be a middleman's white label solution.

odt
 
Learn java - the world then becomes your oyster and you can write anything you like. :)

Thats a good idea, but no so good if you want to protect source code.

If I wanted to licence my API with automated systems included , how do I protect source code with Java ?.

With dot.net I am told it can be protected easily.

The Open forex platform allows to build strategies using any of the .NET languages (more than 30 total, C# and VB.NET are most popular). If you wish, you can build a strategy and place it in a separate managed DLL, and in order to protect it from decompilation, you can "obfuscate" it using some of the tools for this purpose. It is not hard to do at all, but you will technical knowledge on using Microsoft Visual Studio (and C#) to be able to work efficiently.


O D T
 
Top