Australian (ASX) Stock Market Forum

Amibroker FAQ

Good afternoon, everyone.

I would greatly appreciate someone to help me.

My inglish is very bad and I'm using the google translator.

I have a problem in AmiBroker code. The backtest should buy when you stick the COND1. It does.

The problem is this. When you buy should take the RSIbuy and use it to sell.

If the RSI is less than 10% of RSIbuy or if the RSI is greater than 10% of RSIbuy must sell. Well not sell when that happens.

Someone could tell me what's wrong?.

Thank you.


Buy= Cond1;

RSIbuy=ValueWhen(Buy,RSI(14));

VentaB= 1,10*RSIbuy;
VentaP= 0,90*RSIbuy;


Sell= RSI(14)>VentaB OR RSI(14)<VentaP;

BuyPrice=SellPrice=Open;


Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);
 
Good afternoon, everyone.

I would greatly appreciate someone to help me.

My inglish is very bad and I'm using the google translator.

I have a problem in AmiBroker code. The backtest should buy when you stick the COND1. It does.

The problem is this. When you buy should take the RSIbuy and use it to sell.

If the RSI is less than 10% of RSIbuy or if the RSI is greater than 10% of RSIbuy must sell. Well not sell when that happens.

Someone could tell me what's wrong?.

Thank you.


Buy= Cond1;

RSIbuy=ValueWhen(Buy,RSI(14));

VentaB= 1,10*RSIbuy;
VentaP= 0,90*RSIbuy;


Sell= RSI(14)>VentaB OR RSI(14)<VentaP;

BuyPrice=SellPrice=Open;


Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);


I'm sorry.

Cond1 = EMA(C,19)> EMA(C,39);
 
VentaB= 1,10*RSIbuy;
VentaP= 0,90*RSIbuy;

Fixing this would be a start viz -

VentaB= 1.10*RSIbuy;
VentaP= 0.90*RSIbuy;

Then when it compiles take a look.

You would be better off posting this sort of stuff in the AB Yahoo group as documented on their web site.

That's where the AB propeller heads hang out.
 
Hi
A question plz....I do a walkforward run on a portfolio and generate a report. How then do I analyze the performance of the individual issues so I can eliminate the worst performers and rerun the test? As far as I can tell the standard backtest report generated doesnt show this info.

Excel maybe? its not my strong point.

Thanks in advance!
 
Hi
A question plz....I do a walkforward run on a portfolio and generate a report. How then do I analyze the performance of the individual issues so I can eliminate the worst performers and rerun the test? As far as I can tell the standard backtest report generated doesnt show this info.

Excel maybe? its not my strong point.

Thanks in advance!

Do an individual backtest (click AA -> backtest -> indiviudal backtest). Then click cumulative profit column to rank lowest first. This will show the poorest performers. I don't know why you'd want to remove the poorest performers though. Why do you?
 
Hi

I am having problems placing Volume on the main stock chart. When I do it replaces stock chart with the volume data only.

Any help appreciated

Shaker
 
On mine, i just drag the volume chart in the left hand panel and drop it in the main chart window and it adds volume to the chart. If you want volume seperate, right click and choose insert.
 
Hi

I am having problems placing Volume on the main stock chart. When I do it replaces stock chart with the volume data only.

Any help appreciated

Shaker

Once you've inserted it in the price chart, go to parameter window and make sure Volume has "own scale" checked. Price will not have been replaced, but just pushed off the visible part of the chart - downwards.
 
Do an individual backtest (click AA -> backtest -> indiviudal backtest). Then click cumulative profit column to rank lowest first. This will show the poorest performers. I don't know why you'd want to remove the poorest performers though. Why do you?


Thanks for the advice Gringott, hmmmm why do I?

Well to be perfectly honest, in R/L im a Quarry Manager not a Fund Manager and I'm enjoying the Amibroker journey, it comes natural to me to identify poor performers and if its uneconomical to make the poorest performers perform....then I remove them!

Educate me please, why would I retain them?

Thanks for your time.
 
Thanks for the advice Gringott, hmmmm why do I?

Well to be perfectly honest, in R/L im a Quarry Manager not a Fund Manager and I'm enjoying the Amibroker journey, it comes natural to me to identify poor performers and if its uneconomical to make the poorest performers perform....then I remove them!

Educate me please, why would I retain them?

Thanks for your time.

In real trading you won't know the poor performers until they have performed poorly. Removing them at that point won't help the bottom line. If it comes naturally to you to remove poor performers, you might like the idea of rotational trading. I started a thread recently, but there's a few caveats to beware of, the main one being that you must use survivorship-free data in your backtests, like this guy suggests... http://etfprophet.com/rotational/

"Individual backtest" will test each individual stock in the entire universe of stocks in one click. Normal backtest will be either a portfolio level backtest or an individual test depending on your settings.
 
In real trading you won't know the poor performers until they have performed poorly. Removing them at that point won't help the bottom line. .

Dont wanna sound ungrateful for the advice, but isnt this the point of backtesting/walkforward tests?

Precisely the reason I want to weed out the worst performers in a portfolio is that not all issues perform equally under any given trading system.

Maybe its my newbiness.
 
On mine, i just drag the volume chart in the left hand panel and drop it in the main chart window and it adds volume to the chart. If you want volume seperate, right click and choose insert.

OMG
I stare at these things some times and go WTF.

Thanks for solving the problem and thanks to the other replies

Shaker
 
Dont wanna sound ungrateful for the advice, but isnt this the point of backtesting/walkforward tests?

Precisely the reason I want to weed out the worst performers in a portfolio is that not all issues perform equally under any given trading system.

Maybe its my newbiness.

Yes but you have to weed them out by writing that into your code, so that the weeding out happens as it would in live trading.

If you want to see why the poorly performing stocks of a WF test perform badly, just run a normal portfolio level backtest using the optimized parameters from an earlier (or later) time period. Then alter the code to try to improve performance.

A couple of guys I know who are very good system traders are quite against the idea of optimizing, even with the extra confidence that a WF test gives you.
 
Cheers Gringott, very good points.
The QM in me still wants the lazy F$@#&*s out of the portfolio and back on the street, going back to their old job.....looking for a new one! Sorry I digress.

Thanks for the feedback.
 
Top