apologies - reference message #127592 if you are interested (it will take a bit to get your head around because you will have to follow the references to my comments in other threads where we have discussed the same topic).
brian_z --- In [email protected], "brian_z111" <[EMAIL PROTECTED]> wrote: > > ozzyapeman, > > > It was easy. > > As Mike says, there might be some alligators in that swamp and it might > not turn out to be so easy or straightforward afterall. > > There is another possibility that I have discussed before but I only > have it at the theoretical stage. > > In the topic "Inline Backtester" I posted some code that plots the > trade series (as GrowthFactor) and the equity curve for a single stock. > > Note - it only allows one trade to be entered at a time and it is > independent of Money Management (it compounds equity starting with the > intial equity). IMO this is the preferable 'settings' for what you want > to do but that comes down to individual choice. > > It is also independent from the equity() function so it isn't necessary > to stick to the backtester reserved variables e.g. you could test more > than one system at a time using several buy/sell rules. > > I am not certain about it but I think you could: > > step1 - use buy1, sell 1 and produce the long trade series/equity curve > for symbol "A' > step 2 - use Foreign with sell2,buy2 and produce the short trade > series/equity curve for symbol 'B' > step 3 - multiply arrayA trade series * arrayB trade series to get the > combined (portfolio) trade series/equity curve > > Then you could plot the three curves as an indicator. > > (symbol A and symbol B could be a non-correlated pair). > > You could also calculate other metrics (equity curve or others) from > those arrays. > > brian_z > > > > --- In [email protected], "ozzyapeman" <zoopfree@> wrote: > > > > Hey Mike, thanks again. Your link pointed me to the right direction. > > It was easy. If anyone is as crazy as me to bother with hedges, just > > use this: > > > > // signal-based backtest, redundant (raw) signals are NOT removed, > > // MULTIPLE positions per symbol will be open if BUY/SHORT signal is > > //"true" for more than one bar and there are free funds > > // Sell/Cover exit all open positions on given symbol, Scale- In/Out > > work on all open positions of given symbol at once. > > > > SetBacktestMode( backtestRegularRawMulti ); > > >
