Australian (ASX) Stock Market Forum

Please help me define Amibroker formulas!

Trash I just go through fases of anxiety and to be honest the last week has been abit of an anxious week so I havent really been sitting behind a computer much. Just been doing physical stuff, trying to keep focused.

Even though my improvement as a trader is my biggest priority some times I have to give it a weeks rest. Your advice is absorbed. I have to sit behind the program for a few hrs to mess about and figure out how to plot it etc so thats why I didnt do it staight away and even half the advice which is given my brain cant interpret it yet.

Anyway thanks
 
Not everyone is in to graphics. Personally I find it incredibly helpful to visual data or what a formula is doing. You can intuitively tell very quickly how workable something is.

The reality is that much of what you backtest and develop looks promising, but a lot of life is like that with the benefit of 20/20 hindsight. It really takes a lot of playing to start to get anything useful.

Fantastic software and so many possibilities. Hope you do get the time to get right into it. Like most powerful software these days there's always a danger we only ever figure out how to use a tiny part of it.
 
Thanks newt. Like anything in life the beginning is hard and boring but once you pick it up it gets fasinating and addictive. Just got to push through.

My ego wont ever let me give up. It will bug me till I figure it out. I wish there were meetings where this stuff could be discussed.

Anyway thanks newt. Amazon said my book was suppose to arrive yesterday, still aint here. So much for express shipping haha
 
So im currently a third way through the book. I tried to implement a filter which the book used as an example. My question is can you implement filters such as minimum/max liquidity and price range in the actual backtest or only apply it after the test has been done?

I had some issues with the implementation of the filter. I put the comand in but not sure how to add colums of interest so it excludes stocks which do not meet criteria.
 
Do you mean backtest or exploration?

If backtest then include in buy rule

Code:
SymbolFilter = Volume > 100000 AND Close > 5 /*... or something ...*/;
Buy = /*your other rules ...*/ AND SymbolFilter;
 
Greetings --

Did the Howard Bandy book help? (Which book? There are four available now, the fifth will be available through Amazon in two weeks or so.)

If you have not already, download the free "Introduction to AmiBroker" and work through the Ten Exercises. Post back with problems you are running into.
http://www.introductiontoamibroker.com/

Best,
Howard
 
Hey Howard ive got Quantitative Trading Systems 2nd edition. Im only 1/3 way through but its definitely givin me alot of insight on developing a system and using amibroker etc.

I was just trying to implement an example you used but the last bit was abit confusing but this forum is really usefull in aiding. Im just re doing your examples to get me familiarized with the platform.

And yes ive downloaded and went through the free pdf file which was also very helpfull. Great job

Kind regards

Patrick
 
ami.png

Hey trash, wasn't sure how to implement your advice. How do you add 'AND' to your buy rules and for how do I implement the symbolfilter. Is the way ive gone about it completely wrong?

For some reason I'm getting a syntax error for '>' but it was working before.


Also
 
20141225_145053.jpg

The example that Howard gave in his book from where I took a photo is for filtering out stocks of interest and not relevant to the backtesting process. If so im not sure how to implement the process from which I took a photo of above.
 
View attachment 60883

The example that Howard gave in his book from where I took a photo is for filtering out stocks of interest and not relevant to the backtesting process. If so im not sure how to implement the process from which I took a photo of above.


I was asking you whether you are talking about backtest or exploration. Now it turns out that the code in the book is an exploration code. So in the end you didn't know the difference as it seems. That happens if people don't listen when they got recommendation to not start building a house from roof to ground but vice versa. Learn the basics first!

As to your "problem". Simply adapt to the example I was given above. What do you not understand?
 
View attachment 60882

Hey trash, wasn't sure how to implement your advice. How do you add 'AND' to your buy rules and for how do I implement the symbolfilter. Is the way ive gone about it completely wrong?

For some reason I'm getting a syntax error for '>' but it was working before.


Also

Yes, it is completely wrong. Multiple misplacements and missing components.
 
Yes, it is completely wrong. Multiple misplacements and missing components.

Look, if you wanna modify Howard's code example then you would just need to add the Filter variable into your buy rule (for example).

Code:
MA1 = MA( C, 5 );
MA2 = MA( C, 25 );

PriceYearsAgo = Ref( C, -2520 );
HistoryExists = PriceYearsAgo != 0;

LowestClose = LLV( C, 2520 );
PriceReasonable = LowestClose > 2.00;

Liquidity = MA( C * V, 252 );
LiquidityOK = Liquidity > 1000000;

Filter = HistoryExists AND PriceReasonable AND LiquidityOK;

Buy = Cross( MA1, MA2 ) AND Filter;
Sell = Cross( MA2, MA1 );

// Exploration output section
if( Status( "action" ) == actionExplore )
{
	// Add columns to report the items of interest.
	AddColumn( C, "Close", 4.2 );
	AddColumn( PriceYearsAgo, "PriceYearsAgo", 4.2 );
	AddColumn( LowestClose, "LowestClose", 4.2 );
	AddColumn( Liquidity, "Liquidity", 4.0 );
}
 
Now as for your wrong code of your picture.

For example,
Code:
MA1 = MA( C, 5 );
MA2 = MA( C, 25 ); 

LowestClose = LLV( C, 252 );

Liquidity = MA( Close * Volume, 252 );

SymbolFilter = Liquidity > 100000 AND LowestClose > 5;

Buy = Cross( MA1, MA2) AND SymbolFilter;
Sell = Cross( MA2, MA1 );
 
Hey Trash, regarding the last part of Howard Bandy's explanation, if you wanted to add more filters then you'd have to add on to that with the appropriate formula?
 
More filters mean more code to be added, sure. The program does not know what you wanna do so you have to tell it to it.
 
Thanks trash. I just added a highestclose filter <45 ($) into the filter to test it out and it worked so im happy with that. Atleast its becoming abit clearer now. Thanks mate.
 
Top