Luxor system - Jaekle and Tomasini

Posted By: hyperfish

Luxor system - Jaekle and Tomasini - 04/25/13 20:12

Hello everyone,

and thanks jcl and all involved for your very interesting system.

To find out a bit more about the programming side of things, I have tried to replicate the Luxor system described in the book by Jaekle and Tomasini and mentioned in the literature list on this forum. It seems very simple and yet I am unable to replicate equity curves that look even remotely as good as the book's basic case without exit, time filter or transaction costs. Here is my script:

Code:
function run()
{
	StartDate = 20021021;
	EndDate = 20080704;
	set(LOGFILE|PLOTNOW); // log all trades
	//Try and replicate best given graph
	Slippage = 0;
	Spread = 0;
	BarPeriod = 30;
	
	var longPeriod = 30;
	var shortPeriod = 10;	
	vars Price = series(priceClose());
	vars slowMA = series(SMA(Price, longPeriod));
	vars fastMA = series(SMA(Price, shortPeriod));	
	var buyStopLevel = 0;
	var sellStopLevel = 0;	
	bool goLong = false;
	bool goShort = false;	
	
	if (fastMA[0] > slowMA[0])
	{
		goLong = true;
	}
	if (fastMA[0] < slowMA[0])
	{	
		goShort = true;
	}

	if(crossOver(fastMA, slowMA) == true) 
	{
		//Just reset stop level of trade suggested by MA distance sign
		buyStopLevel = priceHigh(0) + PIP;		
	} 
	else if(crossUnder(fastMA, slowMA) == true) 
	{
		sellStopLevel = priceLow(0) - PIP;		
	}

	if ((goLong == true) && (NumOpenLong == 0))
	{
		enterLong(0, buyStopLevel);		
	}
	else if ((goShort == true) && (NumOpenShort == 0))
	{
		enterShort(0, sellStopLevel);		
	}
	
	plot("FastMA",fastMA[0],0,RED);
	plot("SlowMA",slowMA[0],0,GREEN);
	PlotWidth = 800;
	PlotHeight1 = 320;
}



So this is a basic MA crossover system except that entries use a stop order for filtering. The book's results are given in the curve on page 44 and the table on page 45. The results I have obtained are miles away! This seems odd for such a simple strategy and so I wonder a) whether there is some stupid coding error in the above or b) if not, whether differences of the order of magnitude seen (e.g. their # of trades - 1913, mine - 2675) are to be expected between different data feeds at this TF.

I am aware the book also prints '3' for the short MA period but I believe that is a typo - when I use 3 I get better performance but, plausibly, a lot more trades still (3691).

Thanks for any input!
Posted By: jcl

Re: Luxor system - Jaekle and Tomasini - 04/26/13 11:21

I have the same book laugh and tried the Luxor system some time ago (maybe I can find the old script somewhere). I could well reproduce the results from Jaekle and Tomasini - but the system is not profitable, as you see from the equity curve:



This is a typical curve of a system that was fitted to a certain time period, up to 2010. It is not profitable outside of that period.

You can produce lots of such systems, and they look good in books, but better don't trade them. This does not reduce the quality of the book, which explains automated trading very well.

Interestingly, the equity curve was from a WFO test if I remember right - so the market changed in a way after 2010 that even WFO could not save that system.
Posted By: hyperfish

Re: Luxor system - Jaekle and Tomasini - 04/26/13 12:18

Hi jcl, and thanks for replying.

I am skeptical about the money-making prowess of Luxor as well. Please note that I am trying to replicate the results pre any optimisation stage. I undertook this purely as a programming exercise - the idea being that, if I cannot manage a system as simple as this one, there is probably no point in continuing. blush You got similar results to the book so it would be fantastic if you did manage to find your original script if that is not too much bother.

Also, I agree on the quality of the Jaekle and Tomasini book; would you know about any other comparable books at a similar or higher technical level?

Many thanks.
Posted By: SFF

Re: Luxor system - Jaekle and Tomasini - 04/27/13 05:13

Hi,

This new book would be good.
http://as.wiley.com/WileyCDA/WileyTitle/productCd-1118528743.html
Posted By: hyperfish

Re: Luxor system - Jaekle and Tomasini - 04/27/13 13:20

Thanks SFF,

that guy certainly seems to have good credentials. I will have a look out for this one.
The other books in this area that I am aware of are those by Robert Pardo. His earliest one is from 1992 (and it comes with very retro dot matrix printer performance tables) so he may well have been the pioneer! One impression I get from all these texts is that they all get a bit "rule of thumb" when it comes to the statistics. This may be a conscious choice re targeting of the text or it may mean that this is as precise as we can get in this area (statistical interpretation of results often ends up being somewhat subjective) - which of these is the case I do not know. A textbook answer would be superb but may not exist. Anyway.

The reason I am a bit hung up about my Luxor problem is this. Here is a simple system for which I have a reasonably detailed set of results (from the J and T book). It is natural to want to replicate them. I find the following results against the benchmark ones - I hope the copyright police won't execute me for the second picture.





I think we can agree that the difference between the two equity curves is non-negligible - the book curve suggests further evaluation while the curve generated by my script invites immediate binning. I see the following different possible reasons for this:
1) there is an error in my script: this would be my preferred reason. It should be easy to correct my script above if it does not, actually, describe an MA crossover strategy where we are always in the market (after the initial entry, which will indeed not be according to system) and where entries are made on a one pip break of the signal candle.
2) there is a bug in either TradeStation (which J&T use) or Zorro. This is a facile way out and, given both systems have no doubt been tested exhaustively with substantially more complex systems, it is extremely improbable.
3) this difference is caused by a difference between data feeds: this is the potential reason I am worried about. Clearly, data from different sources will never completely match meaning that every data point we collect for testing will in fact represent an instance of a random variable subject to sampling error. We would hope and assume that the error introduced is not systematic (that is, e.g. 'large' candles are on average two pips larger in one datafeed that in the other), but corresponds to a white noise (zero-mean, constant variance) term, such that any data induced performance divergences largely average themselves out over a test set of sufficient length. To be honest I have not made any particular effort to vet the Zorro data as I assume its quality has been deemed sufficient for any algo testing purposes. If this is the case then it suggests the dependence of system performance on input data is extreme, sufficient in fact to completely change our evaluation of a system (from interesting to pointless). If so, any effort to design a winning system seems meaningless to me unless we at the same time ensure it works across data feeds by, for instance, containing the testing logic within a further (resampling) loop.
4) the curve shown in the book was not actually generated by their printed code. Well.

So this is why I am hoping possible reason 1) is the answer. Indeed, there may also be further possible explanations I have not thought of! Maybe anyone has an idea?
Posted By: Petra

Re: Luxor system - Jaekle and Tomasini - 04/27/13 14:11

I do not know the system but at least this line looks wrong in your code. You set buyStopLevel to 0:

var buyStopLevel = 0;

and you don't set it afterwards except for the rare crossing points, so you enter most trades with entry stop 0. This seems wrong because then you would not need an entry stop at all.

If you want to keep the variable value even when the function is terminated, you need a static variable:

static var buyStopLevel = 0;
Posted By: hyperfish

Re: Luxor system - Jaekle and Tomasini - 04/27/13 15:24

Hi Petra,

aaaarghh! You got me there. Zorro makes things so simple that I ended up thinking it makes things even simpler than it actually does! You are right, both entry levels have to be static or they will reset to zero at the next bar. Sell and buy stops at zero are, I gather, interpreted as market entries so that explains why there were so many additional trades (They are now down to 1872 - in line with the book.). I did check a segment of the results curve but (Murphy's Law) got one where the stop entries were filled at signal-1, otherwise the problem would have been apparent.

Anyway, in case this helps anyone, here is the new version of the script with equity curve. Note the debug statement - this is pretty much indispensable to check for issues and I should have put it there from the start.

Code:
function run()
{
	StartDate = 20021021;
	EndDate = 20080704;
	set(LOGFILE|PLOTNOW); // log all trades
	//Try and replicate best given graph
	Slippage = 0;
	Spread = 0;
	BarPeriod = 30;
	
	var longPeriod = 30;//optimize(30, 10, 60, 5);
	var shortPeriod = 10;//optimize(10, 1, min(longPeriod, 20), 1);	
	vars Price = series(priceClose());
	vars slowMA = series(SMA(Price, longPeriod));
	vars fastMA = series(SMA(Price, shortPeriod));	
	static bool debug = true;	
	static double buyStopLevel = 0;
	static double sellStopLevel = 0;	
	bool goLong = false;
	bool goShort = false;
	LookBack = longPeriod;	
	
	if (fastMA[0] > slowMA[0])
	{
		goLong = true;
	}
	if (fastMA[0] < slowMA[0])
	{	
		goShort = true;
	}

	if(crossOver(fastMA, slowMA) == true) 
	{
		//Just reset stop level of trade suggested by MA distance sign
		buyStopLevel = priceHigh(0) + PIP;		
	} 
	else if(crossUnder(fastMA, slowMA) == true) 
	{
		sellStopLevel = priceLow(0) - PIP;		
	}

	if ((goLong == true) && (NumOpenLong == 0))
	{
		enterLong(0, buyStopLevel);		
	}
	else if ((goShort == true) && (NumOpenShort == 0))
	{
		enterShort(0, sellStopLevel);		
	}
	
	if( (debug) && (is(LOOKBACK) == false) )
	{
		debug = msg("Lookback = %i, Low = %.5f, High = %.5f, BuyStopLevel = %.5f, SellStopLevel = %.5f, FastMA = %.5f, SlowMA = %.5f, GoShort = %i, GoLong = %i, CrossOver = %i, CrossUnder = %i, LongPos = %i, ShortPos = %i ", 
			is(LOOKBACK), priceLow(0), priceHigh(0), buyStopLevel, sellStopLevel, fastMA[0],slowMA[0], goShort, goLong, crossOver(fastMA, slowMA), crossUnder(fastMA, slowMA), NumOpenLong, NumOpenShort);
	}	
}





What is interesting is that the equity curve now does resemble the book curve ("features" match) BUT looks like a detrended version - the book curve shows an attractive upward drift that is not present in mine. Does anyone have any idea where that might come from? I guess it might be the result of reinvestment but the book script simply uses (EasyLanguage) "Buy" and "Sell" without any position size indication so I assume it is constant...

Anyway, thank you very much for this suggestion Petra.
Posted By: SFF

Re: Luxor system - Jaekle and Tomasini - 04/29/13 07:01

Did anyone read his books?
http://www.blueowlpress.com/#books
Posted By: jcl

Re: Luxor system - Jaekle and Tomasini - 04/29/13 08:38

No, but they look interesting at a first glance. Problem is that when you read one system development book, such as the Jaekle & Tomasini, you probably won't learn much new from the other books unless they introduce some revolutionary new ideas.

Hyperfish: I believe your code is missing an additional entry condition from the original system, that's why you're getting worse results than in the book. This was my script which reproduces the book result:
Code:
function run()
{
	StartDate = 20021021;
	EndDate = 20080704;
	BarPeriod = 30;
	LookBack = 30;
	set(TICKS|PLOTNOW);
	PlotWidth = 800;

	asset("GBP/USD");

// no commissions...	
	Spread = 0;
	Slippage = 0;
	RollLong = RollShort = 0; 
	
	vars Price = series(priceClose()),
		Fast = series(SMA(Price,3)),
		Slow = series(SMA(Price,30));
	
	static var BuyLimit,SellLimit,BuyStop,SellStop;
	
	if(crossOver(Fast,Slow)) {
		BuyStop = priceHigh() + 1*PIP;
		BuyLimit = priceHigh() + 5*PIP;
	}
	if(crossUnder(Fast,Slow)) {
		SellStop = priceLow() - 1*PIP;
		SellLimit = priceLow() - 5*PIP;
	}
		
	if(!NumOpenLong && Fast[0] > Slow[0] && Price[0] < BuyLimit)
		enterLong(1,BuyStop);
	if(!NumOpenShort && Fast[0] < Slow[0] && Price[0] > SellLimit)
		enterShort(1,SellStop);
}



The result:



And you're also right with 3). Systems with time frames below one hour can become very feed dependent. Although the Luxor system result is reproducible, short timeframe results normally can't be reproduced well with price data from other sources. This does not mean that some feed has 'better quality' than the other, it's just the way how price data is sampled. Forex prices depend on the liquidity providers that are currently used by the broker. So a system that uses short timeframes becomes very fragile, and its results are normally not valid for different market situations or for different liquidity providers.
Posted By: hyperfish

Re: Luxor system - Jaekle and Tomasini - 04/29/13 16:05

Hello SFF, jcl,

and many thanks for the script jcl. You are right, I did not use the limit condition in the EasyLanguage listing as it is not discussed in the text as far as I could see, and as it actually worsens results for the specific GBP/USD data set. Modulo the setting of TICKS, which is probably a good default idea, and the nulling of swap costs, the scripts are then the same and results with the (supposedly applicable) 10 fast MA period are similar, resembling my second post picture and a lot worse than the curve presented in the book. This is an interesting exercise as I would not have expected 30 minute TF results, on a system based on averaged (thus smoothed) quantities, to oscillate this wildly (that it will happen with "scalping EAs" is probably common sense) and I guess it is a good idea to target the 240M or above TFs.

Re the book debate, thanks for this new author SFF, I like the sober and meticulous tone of his website as well as the free articles offered. He does suggest in one of them that he won't discuss applicable statistical tests as the generated confidence intervals are typically humungous and in particular extend to negative average returns so maybe the conclusion is that algorithm design is in the end an art more than a science. Forgive me if this question seems a bit naive to you jcl, but have you then found that the material in books like J+T, Robert Pardo etc. is all you ever need for evaluating your system ideas (which clearly need to come from elsewhere) and for deciding whether you are happy with moving from design to live trading? It may well be.

Anyway, thanks for helping me with this basic scripting exercise, which has already taught me something about timeframes that I cannot remember reading in any of the books mentioned - admittedly this may just be because of my poor memory!
Posted By: jcl

Re: Luxor system - Jaekle and Tomasini - 05/01/13 10:41

Yes, the material in the books gives you a good insight in what is required for developing an automated system. Problem is that you can't use the example systems from the books. They are normally not profitable, even though they appear so at a first glance.

System ideas come from thinking about which type of market inefficiency - cycles, season, gaps, trends etc. - could be exploited, and then using available tools for detecting this inefficiency in a price curve and generating trade signals. There are many different inefficiencies and any of them can be detected in many different ways, so there's an unlimited number of profitable strategies that could be developed.
Posted By: hyperfish

Re: Luxor system - Jaekle and Tomasini - 05/01/13 18:55

Hi jcl,

yes, I am coming round to it. I think my unease has been partly with some of the systems that I come across, rather than the procedure itself; these do not provide any "model" for the market, but put up degrees of freedom which end up somehow working with a backtest set. The absence of clear rationale makes this appear rather fickle and contingent (so I need a fast MA period of 9 for 2006 but 17 for 2007, yeah, that will do...). Obvious "quantitative" algorithms like cointegrated pairs trading or Markov switching time series models do attempt a direct representation of what is happening, which somehow makes me trust them more. This may be wrong in the first place as some of the classical models postulated in finance are really pretty rubbish (Markowitz: we consider normal returns and investor utilities only, we neglect estimation and model risk... -- Black-Scholes: normal increments, no transaction costs, static vols in time and across strikes, complete markets meaning the options being priced are effectively redundant) and a strong intuition that has held true in the past (as a "stylised fact") is likely worth at least as much as a starting point, objectively speaking.

In fact, thinking about Markowitz in particular, I don't really see in what ways the standard process is any more rigorous that that described in the various books we have mentioned. I do think that the boundary between working on a system / "optimising it" and "throwing a lot of mud at a wall in the hope that some of it will stick" is fluid, there will be no magic statistic telling us when we cross it, and I suspect that always remaining aware of this is the main skill to develop. I am writing this after rereading the section on Luxor MAE/MFE in J+T which I think is absolutely superb, but which could easy turn into one such overfitting exercise if tackled from the wrong angle or in the wrong way.

Anyway, I am sort of rambling now so I'll stop; thanks for the insights so far.
Posted By: SFF

Re: Luxor system - Jaekle and Tomasini - 05/09/13 10:31

Is the common MTF approach which is a lower TF entry trigger based on a longer TF
really right or profitable?

I am trying to make this type of a system.
Posted By: jcl

Re: Luxor system - Jaekle and Tomasini - 05/09/13 16:19

The study by Aronson found that those systems are unprofitable with all usual assets.

It might be different when complex additional filters are used or the time period is adapted to the price curve spectrum.
Posted By: SFF

Re: Luxor system - Jaekle and Tomasini - 05/10/13 06:35

Thanks, I will keep trying.

I also trying to catch major big move from a lower TF.
Usually if we want to make big pips we will go to higher.

However one of the famous fx bot, FGB can do that. It seems to use only 15min TF. Risk is smaller yet profit bigger.
http://www.myfxbook.com/members/fxgrowthbot/forex-growth-bot/71611

I don't know if it is right approach,
do you have any practical advice to catch big move from only lower like 15min?

Posted By: jcl

Re: Luxor system - Jaekle and Tomasini - 05/10/13 08:44

From what I see from the equity curve of that bot, it has very steep drawdowns. This does not look like a normal strategy. It more looks like a grid trading system.

There is also one hint in the fxBook stats that this bot might be scam and its profit might be fake. Can you find it? wink
Posted By: SFF

Re: Luxor system - Jaekle and Tomasini - 05/10/13 08:57

People really believe this bot and I don't know what is that hint.
Why do you think it has low profit? It is one of the top earners in myfxbook.
What bots do you think is great and real?

Posted By: jcl

Re: Luxor system - Jaekle and Tomasini - 05/10/13 09:57

The hint that I mean is the $250 initial capital in the account. If people want to sell scam robots, they open a large number of fxBook accounts, each one with a very small money amount. Then they let variants of their robot trade on every account. Most will wipe out the account sooner or later, but a few will survive. This has nothing to do with the quality of their robots, it's just statistics. The best account is then advertised as the live result from their robot. Because they opened the accounts with only $250, fxBook gives them a crazy gain rate such as 1700%.

The real annual gain, as you see from the equity curve, is in the 40% range. This is very low profit in relation to the drawdown risk. Anyone trading this robot since 2012 had lost his money. Even simple strategies from the Zorro tutorial can do better than that.

We have looked into a couple of bots, and although it is of course possible for a robots to produce good profit, we found none so far. This might be related to the robot buyer scene.
Posted By: SFF

Re: Luxor system - Jaekle and Tomasini - 05/10/13 15:57

>>the time period is adapted to the price curve spectrum.

How can I do this in Zorro?
Posted By: SFF

Re: Luxor system - Jaekle and Tomasini - 05/14/13 06:47

What do you think this new scalping robot?
It will be work or not scam on life trade?

http://www.powerful-scalping.tk/
Posted By: jcl

Re: Luxor system - Jaekle and Tomasini - 05/14/13 10:27

For adapting the time period, you can use the DominantPeriod function or - with the new Zorro - the Spectrum function. As to the questions whether you'll become a millionaire with this new scalping robot, just buy it and find out wink. Robot vendors are poor and need your financial support.
Posted By: Geek

Re: Luxor system - Jaekle and Tomasini - 05/14/13 10:47

I would never consider buying any of these scalping Robots. I just simply do not trust them, i can only trust my own strategies after vigorous back-testing and apart from that creating your own script in Zorro is so much more rewarding, especially when you start getting great results running it live in demo mode etc.

My own methods of tackling the markets using Zorro and understanding how it works is what I am dedicated to... I am still in training and learning mode but I have finally written a scalping short and long script after a month of finding Zorro and the results I am really pleased with..

Looking forward running them live in a few months after some fine tuning and more vigorous back/live testing whilst the other half moans that I am spending to much time playing with my BOT. wink
Posted By: SFF

Re: Luxor system - Jaekle and Tomasini - 05/14/13 11:19

Hi Geek,

What results did you get your own bot?
I am very interested.
Posted By: Anonymous

Re: Luxor system - Jaekle and Tomasini - 05/14/13 11:23

Originally Posted By: Geek
I would never consider buying any of these scalping Robots. I just simply do not trust them, i can only trust my own strategies after vigorous back-testing and apart from that creating your own script in Zorro is so much more rewarding, especially when you start getting great results running it live in demo mode etc.


Couldn't agree more!
Posted By: Geek

Re: Luxor system - Jaekle and Tomasini - 05/14/13 13:08

Originally Posted By: SFF
Hi Geek,

What results did you get your own bot?
I am very interested.


Well, currently I have been backtesting each year individually and doing some walk forward testing and oversampling etc. I am running it live on demo now to see how it performs in live trading scenario as the backtesting results are just way to good to be true... Last night i put the finishing touches to it which i am happy with, and it works great on most currency pairs 500%-3000%+ and even gold on the backtesting and out of sample / walk forward testing etc.

The aim was to write a script to return me $100 per day average with minimal draw down, minimal capital, decent winning trades, high profit, not so much risk etc.

This is the the performance report I have achieved from my just my shorting script alone, as you can see, the annual return, profit factor, draw-down etc is all pretty amazing, the log file data seems fine as does everything else.

This has not yet been optimized at all either: I am looking forward to seeing how the live demo works and if it does work as good as it has backested. I really hope so as currently I am a Zorro believer and optimistic in my own methods of tackling these markets. Let's see how it goes, but IF it does work as good as the backtest and these kind of returns are indeed possible for the average person with limited programming knowledge who is not a hedge fund or financial institution making billions then i will be a very happy man.

Quote:
Walk-Forward Test MYBOT11 AUD/USD - performance report

Simulation period 03.01.2007-31.12.2012
Test period 25.09.2008-31.12.2012
WFO test cycles 14 x 7543 bars (16 weeks)
Training cycles 15 x 42743 bars (92 weeks)
Lookback time 150 bars (37 hours)
Assumed spread 2.5 pips (roll 0.41/-0.86)
Assumed slippage 10.0 sec
Contracts per lot 800

Gross win/loss 171108$ / -61444$ (+1370796p)
Average profit 25702$/year, 2142$/month, 99$/day
Max drawdown -835$ 1% (MAE -827$ 1%)
Total down time 51% (TAE 11%)
Max down time 15 days from Apr 2011
Largest margin 400$
Trade volume 232972274$ (54601564$/year)
Transaction costs -60988$ spr, -407$ slp, -513$ rol
Capital required 1101$

Number of trades 7624 (1786/year)
Percent winning 71%
Max win/loss 513$ / -553$
Avg trade profit 14$ 179.8p (+32$ / -27$)
Avg trade bars 2 (+2 / -3)
Max trade bars 13 (3 hours)
Time in market 22%
Max open trades 2
Max loss streak 9 (uncorrelated 7)

Annual return 3669%
Profit factor 2.78 (PRR 2.69)
Sharpe ratio 11.19
Kelly criterion 5.43
OptimalF .007
Ulcer index 0%
Prediction error 17%
Cycle performance 2.88 2.76 2.82 2.67

Portfolio analysis OptF ProF Win/Loss Cycles

AUD/USD:L .000 ---- 0/0 ..............
AUD/USD:S .007 2.67 5239/2193 //////////////



Posted By: Anonymous

Re: Luxor system - Jaekle and Tomasini - 05/14/13 13:22

Your results definitely look too good to be true. Are you sure you haven't accidentaly leaked a bit of future knowledge in your algorithm? If your results are genuine, you are going to be infinitely rich in a very short time. cool

This reminds me of the times when I was more actively playing with renko bars. At one point I got so good strategy backtest results that I almost fell of the chair. grin Only a few hours later I noticed that I accidentaly introduced a very small lookahead window while _generating_ the bricks. The bricks itself contained a bit of knowledge of the future. No wonder almost any strategy I run on that data set was being insanely profitable. blush
Posted By: Geek

Re: Luxor system - Jaekle and Tomasini - 05/14/13 13:34

Thanks, I just took away the LookBack, and it returns the same, and can't see anything in the code to suggest it has the knowledge of the future.

I've been working solid on it so I hope this works in live demo testing.

A few weeks ago I had a 100,000% increase on a backtest and nearly did the same as you but then when running it live it didn't work and it was attributed to the future knowledge as you describe.
Posted By: jcl

Re: Luxor system - Jaekle and Tomasini - 05/14/13 13:37

I have to agree to acidburn, the result looks wrong. Even worse, it looks like a bug in Zorro, because accidental future peeking is normally prevented by the program structure unless you've set the PEEK flag or changed some parameters between training and testing.

Check the result in detail before trading it live. Examine some single trades from entry to exit. If you find something that is not right, let me know and I'll look into it.
Posted By: Geek

Re: Luxor system - Jaekle and Tomasini - 05/14/13 13:42

I hope not jcl, i will keep this running in demo and go look over everything in detail...

It seems to be working fine at the moment in live demo mode, but i see will how how it exits the trades etc.

Thanks.
Posted By: SFF

Re: Luxor system - Jaekle and Tomasini - 05/16/13 10:07

Hi Geek,

I would like to know how money management improves your bot.
I think that the result you posted above is without MM.
Posted By: Geek

Re: Luxor system - Jaekle and Tomasini - 05/16/13 11:15

Hi SFF,

I would say it's imperative to having a successful strategy..

The last thing you want is for a trade to become negative from the volatility of the forex markets so narrowing this down will go some way to helping your result. There are many mm methods are we know from the manual.

I guess the possibilities are endless, but having lost money from trading in the past due to emotions I find that having moving into algorithmic trading is maybe the answer to actually making money rather than loosing it..

That's why I have been observing the markets for the past 12 months without actually trading and looking into BOTS because I knew if i traded again my emotions would most likely end to losses in the end.

Now we have Zorro so the average man now take it upon himself to work on a strategy that will profit from the markets and there are no emotions involved.

Kind regards.
Posted By: SFF

Re: Luxor system - Jaekle and Tomasini - 05/29/13 16:27

Hi,

>>How to do that is explained in the Zorro tutorial.

I am looking for a tut for Spectrum.
Where can I find it?

Are spectral analysis effective for a lower TF like 1 min?
Posted By: jcl

Re: Luxor system - Jaekle and Tomasini - 05/30/13 10:17

There is no tutorial, only the function description under "Filters" and the example script spectrum.c.

With low time frames the spectrum becomes flat and loses its peaks. Spectral analysis works best with time frames in the hour or day range.
Posted By: SFF

Re: Luxor system - Jaekle and Tomasini - 05/30/13 13:06

You said "How to do that is explained in the Zorro tutorial." in this page.
http://zorro-trader.com/manual/en/strategy.htm
Posted By: jcl

Re: Luxor system - Jaekle and Tomasini - 05/30/13 15:00

That refers to workshop 5 that uses the dominant cycle for trading. The dominant cycle is the main peak of the spectrum.
Posted By: SFF

Re: Luxor system - Jaekle and Tomasini - 07/12/13 07:21

Hi,

I have been able to see some manual traders making over 10,000% in short priod but
not automated traders?

Why this happens? I am sure I can make such % with robots too.
Posted By: jcl

Re: Luxor system - Jaekle and Tomasini - 07/12/13 08:05

You need no robot for this. For making over 10,000%, just go to Las Vegas and bet twice on Roulette. For this you need not as much luck as that manual trader.
Posted By: Pork

Re: Luxor system - Jaekle and Tomasini - 07/22/13 18:42

I'm working my way thru the Jackal and Tomansini book and I understand that the strategy is not profitable.
After they present the strategy as you have written above, the next step in the book is to "optimize" the "profitabe" strategy by adding a timefilter.
in the book's example they study a 4 hour trading time window shifting the starting time 30 minutes thoughout the day.
I was going to try var starttime = optimize() but some of the values can't be zero. When you use var endtime = optimize() the clock isn't linear so that won't work.
I found the hour() time variable and can make that work for a specific time period, but I'm having trouble trying to shift the starting times as they do. in the book. The only idea I have is an array with each start time and end time defined and then go thru the array 1 time period at a time. Any other ideas?

Thanks

P
Posted By: jcl

Re: Luxor system - Jaekle and Tomasini - 07/23/13 06:35

Multiple time filtering with an array would likely lead to an overfitted and unusable strategy.

Optimizing a start time and a time window is better, but I would use time filters with extreme caution - they can let any losing system appear profitable in the backtest. Anyway, for optimizing something that can be 0 or negative, just subtract a constant value like this:

int start_hour = optimize(1,1,24,1)-1;
Posted By: RTG

Re: Luxor system - Jaekle and Tomasini - 04/06/14 10:49

Following on from the book, how does one then optimize the paramaters 'Fast' and 'Slow'?

My attempts fail big time. After setting the Paramaters flag, I attempted to insert the optimize function for the Fast moving average like so.

vars Price = series(priceClose());
vars Fast = ptimize((1,1,20,1)series(SMA(Price,3));
vars Slow = series(SMA(Price,30));

The error message is as follows.

Luxor compiling.............
Error in 'line 23: syntax error
< vars Fast = optimize((1,1,20,1)series(SMA(Price,3));
>.
Posted By: royal

Re: Luxor system - Jaekle and Tomasini - 04/06/14 11:52

Take a look at manual part Trading -> optimize
There you can see how the optimize function is used, for example like this one:

Code:
vars Price = series(price(0));
var TimeCycle = optimize(30,10,100,5,0);
vars MA1 = series(SMA(Price,TimeCycle));

Posted By: forexcoder

Re: Luxor system - Jaekle and Tomasini - 04/08/15 12:21

Originally Posted By: jcl

Code:
function run()
{
	StartDate = 20021021;
	EndDate = 20080704;
	BarPeriod = 30;
	LookBack = 30;
	set(TICKS|PLOTNOW);
	PlotWidth = 800;

	asset("GBP/USD");

// no commissions...	
	Spread = 0;
	Slippage = 0;
	RollLong = RollShort = 0; 
	
	vars Price = series(priceClose()),
		Fast = series(SMA(Price,3)),
		Slow = series(SMA(Price,30));
	
	static var BuyLimit,SellLimit,BuyStop,SellStop;
	
	if(crossOver(Fast,Slow)) {
		BuyStop = priceHigh() + 1*PIP;
		BuyLimit = priceHigh() + 5*PIP;
	}
	if(crossUnder(Fast,Slow)) {
		SellStop = priceLow() - 1*PIP;
		SellLimit = priceLow() - 5*PIP;
	}
		
	if(!NumOpenLong && Fast[0] > Slow[0] && Price[0] < BuyLimit)
		enterLong(1,BuyStop);
	if(!NumOpenShort && Fast[0] < Slow[0] && Price[0] > SellLimit)
		enterShort(1,SellStop);
}




Hi jcl. I have 2 questions for you. First question. The pending order 'enterLong(1,BuyStop)', is automatically cancelled after the end of the first bar if not entered. Is it correct?
Second question.
In the istruction 'if(!NumOpenLong && Fast[0] > Slow[0] && Price[0] < BuyLimit)' the part 'Fast[0] > Slow[0]' isn't redundant? (because the condition is already verified by the crossover function). And why did you use 'Price[0] < BuyLimit' if the BuyStop is smaller than BuyLimit?
Thanks a lot!
Posted By: jcl

Re: Luxor system - Jaekle and Tomasini - 04/08/15 14:05

Yes, the pending order is cancelled after 1 bar unless you set EntryTime to a different number. And Fast[0] > Slow[0] is not redundant because the trade is not necessarily entered at the crossover. The crossover is for determining the entry limits only, and could have happened some bars earlier.
Posted By: forexcoder

Re: Luxor system - Jaekle and Tomasini - 04/08/15 21:06

Jcl thanks for your reply. I know that the crossover function is:
"bool crossOver(var* data1,var* data2) { return (data1[0] > data2[0]) && (data1[1] < data2[1]); }"
so Fast[0] > Slow[0] is already present in the function, also do not understand why BuyLimit is greater than BuyStop, should not it be the other way?
If Price[0] is < BuyLimit and > BuyStop, than when Zorro run 'enterLong(1,BuyStop)', the trade become a buy limit and not a buy stop, because BuyStop is < Price[0]. Is not it?
Thanks again for helping me to understand!
© 2024 lite-C Forums