Hello,
I am having trouble understanding the same issue. If anyone here has a solution
I'd like to read up on it as well. Angelo, I have read literally every
discussion in this forum regarding this topic and I understand why your
reffering to TJ, and please: Yes, I did read the user manual and yes, I did
read custom backtester procedure. I believe that I am not the only one who's
facing this. Help appreciated. I'd like to post 3 sample strategies for better
understanding (which won't work, btw).
BASE-TIME: 5min; [ONLY 3 Strategies]
Setpositionsize(number, spsshares) // number varies depending on which strategy
gets the signal
Setoption("maxopenpositions",3) //i.e. every strategy can open 1 position at a
time which is not reflected in this command
///////////////// MA-Crossover //////////////////
Ema1=ema(c,10);
Ema2=ema(c,20);
Buy1=cross(ema1,ema2);
Sell1=cross(ema2,ema1);
Short1=sell1;
Cover1=buy1;
/////////////// Countertrend /////////////////////////
BBupperiod1= 20;
BBlowperiod1= 20;
BBupSTD1= 2;
BBlowSTD1= 2;
BBtop1= BBandTop(C,BBupperiod1,BBupSTD1);
BBbot1= BBandBot(C,BBlowperiod1,BBlowSTD1);
MA1= ma(C,20);
Buy2= C<bbandbot1;
Sell2= c>ma1;
Short2= C>bbandtop1;
Cover2= C<ma1;
Buy2= exrem(Buy2,sell2);
Sell2= exrem(sell2, buy2);
Short2= exrem(short2,cover2);
Cover2= exrem(cover2,short2);
/////////////////////// HH LL //////////////////
TimeFrameSet(inhourly);
period1high=20;
period1low=20;
nhigh=HHV(H,period1high);
nlow=LLV(L,period1low);
TimeFrameRestore();
Buy3= timeframeexpand(ndayhigh,inhourly) > timeframeexpand(ref(ndayhigh,-1),
inhourly);
Sell3= timeframeexpand(ndaylow,inhourly) < timeframeexpand(ref(ndaylow,-1),
inhourly);
Short3=sell3;
Cover3=buy3;
REALIME TRADING:
What do I need to do is to put these 3 into one AFL for real-time trading -
that's what people were saying. How do I arrange the code?
I do not trade a lot of underlyings, but say, this one needs to be run on the
FDAX(German bluechip future) and on the FDAX only, allowing shorts and longs at
the same time.
I have read up on the
if ( name=="") idea.
but I want to realtime trade this on ONE underlying only (Trying to express: I
cannot change the name of the underlying in realtime trading, so that amibroker
would think it's 3 differnt tickers, even though it's only one)
Another suggestion was something with static variables, but I didn't grasp the
concept.
Another suggestion was from Keith Mccombs, suggestion one "MASTER-AFL", to
control the other afl's.
#include <afl1>
#include <afl2>
===> how do I match buy1 and sell2?
BACKTESTING
I believe that the issue above differs from the actual backtest-logic and has
been vastly mixed causing a lot of confusion. The way I currently see it is, in
order to get a proper backtest of multiple systems, one would either need
custom backtest proc or --- in this (my case above) case with only one
underlying traded --- name the same underlying differently e.g. FDAX1 for
system #1 FDAX2 for system #2. Not so elegant, but if it works I'm fine with it.
MONEY MANAGEMENT AND PORTFOLIO COMPOSITION
Obviously, if you have figured out what and how much to trade, this one is
already resolved. But maybe sometimes one would like to try different things or
at least check different inputs. Such as:
One Equity Pool
Several equity pools,
manipulate position size if one system is performing poorly,
have a system ranking funtion ("which system to trade now - based on equity
curve, e.g.)
do some sort of modern portfolio theory.
I don't want to go in the details on "MONEY MANAGEMENT AND PORTFOLIO
COMPOSITION" and for now I'd be delighted if someone could show me how to match
my buy/sell signals for realtime trading. One software which I know of and is
capable of adressing all these problems "easier" is rina portfolio maestro.
http://www.portfoliomaestro.com/
I haven't tried it and I'm also not planning on doing so (10k$ per year), but I
wanted to understand what's possible.
Greetings,
M
--- In [email protected], "Jeff" <jeffro...@...> wrote:
>
> In any case you'll have to decide on the logic to decide on allocation. After
> you do that, You could make the meta system a linear combination of the
> two. Create multiple randoms runs of each and assign a static variable, to
> the random equity curves. That way you could do a Monte Carlo analysis with
> both sets together and different allocations. But then again I would I
> strongly suggest researxhing and understanding the characters of the
> tendencies you are exploiting instead of smashing them together blindly.
>
> --- In [email protected], "Gonzaga" <gonzagags@> wrote:
> >
> > Hi.
> > I am lately trying to mix several systems in on meta-system, and I am
> > observing that is not difficult to obtain good CAR's with low Draw Downs.
> > For example, system 1 trade against 100 tickers of the NAsdaq-100 and
> > system 2, against the same 100 tickers. Both systems 'compete' for the
> > money.
> > This is a 'Meta-system', multi-system and multi-stock.
> >
> > Well, I see it's not very difficult to obtain profitable systems..
> > I see also that a good filter to improve results is to filter every system
> > with a volatility value of the index you are using, for example ATR of NQ,
> > or ATR of SPX. So you trade any system in the best moment for the system.
> > You have to filter all your systems, and then, mix them in one meta-system.
> > I thing it's not very hard to obtain annualized CARs 30% and DD less than
> > 20%.
> > BUT, it's hard to programme and backtest.
> > Amibroker backtests very easily many stocks, but to mix several systems is
> > a mess.. difficult and easy to fail..
> > Does anybody know a trading platform that creates this kind of meta-system
> > easily? (perhaps trade station?)
> > Or a way to mix and backtest 2 or 3 systems easily in Ami?
> >
> > Thanks
> >
>