[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[system-traders] Re: GT - implementing a working system



Emily Harris wrote:
Hi Perltrader,
Saw your post on the DEVEL list - just subscribed myself. I don't know what trading system you use and in what markets. I have a couple that work for me consistently- although I do have a gut feel for when the setup is right - so trying to explain it mathematically is a bit tricky... but I'm trying! I'm trying to produce a model that will work on FOREX or some international stocks too - I currently trade the FTSE 250 with it. One of my indicators that I use as part of my gut feel - is to see how well the stock matches (correlation indicator) the FTSE100 index. I like a low correlation - I am manually backchecking all my winning trades to see if I can give a definitive mathematical model of this.

Hi Emily, welcome! Although I'm a newcomer, too, subscribed just few days ago. :)

I'm very much interested in various market correlations, too. Lurking so far, I think that market indicators are not supported in GT, but for me good news is that it's perl, so I'll eventually find a way to work with such data. And one day, who knows, maybe we'll come up with some generic solution, and integrate it with the tree.

I have a couple of systems that I trade, the simplest of which I can't get anywhere near to understanding how to get into the system. Explaining it to someone on a graph is quite easy... but in print!?!... Would you have any idea how I would set up a filter to match stoch. oscillator %K (3 periods - 2 slowing periods)(ignoring %D) - to test if it is above 80 AND the close price was above a SMA (50)
OR
stoch. oscillator %K (3 periods - 2 slowing periods)(ignoring %D) - is BELOW 20 AND the close price was below SMA (50)

Being newbie myself, I can't just spit out the solution for you, Robert (ras) is usually doing a great job explaining things to newcomers. With current knowledge I'd say you need to read the manual of GT/Indicators/STO.pm (perldoc STO.pm working on Windows?) to see which parameters to pass to I:STO to get your desired behaviour (I don't understand your "2 slowing periods" part). And you'll need I:SMA 50 in your system. Something like:

S:G:Above {I:Prices} {I:SMA 50} (part of the buy clause)
S:G:Below {I:Prices} {I:SMA 50} (-||- sell -||-)

And logical AND (S:G:And) will be useful, of course.

S:G: is short for Signals::Generic

Look ahead 4 days from that point and see if the price achieved a HIGHER high or lower low (not counting inside days). If the price achieves the higher high or lower low then it's a buy (or sell) signal. my stop loss is set at a tiny bit over (or under for short) the last significant days open or close price.

Just like humans, programs too can't look in the future. ;) But I understand, all those events you mentioned in the last paragraph should actually be evaluated 4 days AGO. This is where I:G:PeriodAgo generic indicator comes in, and also check others in those subdirectory, because you might need them. But things are getting too complicated here, for my current knowledge, but don't give up too soon.

Closing is even more complex - so I'll leave that off for now... (and this is my simple system!!!)

Yeah, close strategies, money management and lots of other stuff that GT can do are still on my todo list, too. :)

Basically, if you (or any other of the cleverer programmers) out there can help me out, I'm quite happy to spend some time documenting the system I use for them. I'd rather not post the entire thing in public (there are a LOT of hours work in it) but my system works and constantly achieves good returns - but I'm in a narrow market and would love to backtest and tweak to work in larger international markets - possibly commodities too. If I can find someone to do the technical stuff, I can provide the trading system.

I'm pretty sure that the system you would like to code is relatively simple for a more experienced GTer. And if you learn from a few examples, you should be able to do it yourself and tweak and backtest it until it's perfect. Then we meet one day on Hawaii... with laptops, of course. :) :)

--
PerlTrader