[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [amibroker] mentor wanted



PureBytes Links

Trading Reference Links

Paul,
 
The failed to initialize a variable error.....In most cases it seems that
Amibroker requires that you give the moving averages a variable name or use
a logical iif statement to assign a value from a comparison.
 
Try this for the most straightforward way I can think of.
 
T=MA(C,20);
F=MA(C,40);
Filter=T>F;
 
This should do an exploration for that one factor on whatever list you have
selected or filtered on the left side of the automatic analysis window.
 
Filter statement must come after defining MA proper order.  Code isn't smart
enough to look forward to see that you will define MAproperOrder in a later
statement.
 
Filter= MAproperOrder >0;
MAproperOrder = iif(MA(C,20)>MA(C,40),1,0) ;     ...... this is the logical
iif statement to get MAproperOrder defined.
 
So you can try it this way.  You have to use an iif (2 i's in iif) statement
in order to combine the logic the way you wanted to and get your variable
defined with a value. You were writing a logical statement, so it requires
the iif statement, I believe.  The iif statements are the same as Excel
formula format.
 
MAproperOrder = iif(MA(C,20)>MA(C,40),1,0) ;
Filter= MAproperOrder >0;
 
Hope this helps - it's hard jump starting any new programming language, but
I can assure you that Amibroker is efficient with their code and it's
rational.  And it's compact compared to some of the other systems.  I'm
working to think like it thinks.... it's generally more logical than I am...
Hard on my brain some days.  I'm a rookie as well as you.  Takes a while and
what I think will work, won't necessarily.  And it seems that your code
should work, but this probably will.  The pro's here can make this stuff
work with a lot of combined expressions, but I stick with one step at a
time.
 
 
Mike
 
 
  _____  

From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf
Of paulradge
Sent: Sunday, October 15, 2006 1:28 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] mentor wanted
 
Hi Robert,
               thank you for your input and my apologies for my post being
so confusing,,
 
i'm not going to pursue assembling such a basic swing filter any longer but
my sincere thanks for your time,
 
all the best with your trading and interests
regards
Paul
 
 
It is hard for me to understand your question but if you want a signal that
the high 3 days ago was the highest in the last 20 days, you might think
about something like this:
 
RecentHi3IsHi20=ref(H,-3)==hhv(H,20);
 
Robert

paulradge <paulradge@xxxxxxxxx <mailto:paulradge@xxxxxxxxxxxxxxx> com.au>
wrote:
I've started reading the tutorials but i'm not finding what i want to see,,,

i'd like to put together a simple swing scan/explorer based on Oliver Velez 
swing trading tactics,,,

a 20ma above a 40ma ,,the high of 3-5 days ago the highest high in 20 days 
,,,the 3-5 days of down to have lower highs looking for a new higher high 
for the buy with the stop under the last isolation low /pivotpoint

with ezyanalyser i can have all but 1 of those indicators done in 
seconds,,,the 1 i can't have is the 20ma above the 40 ma,,for some reason 
ezyanalyser looks at the ma of 20 days ago,,,and hence why i wanted 
amibroker,,,with the bonus of everything else amibroker does,,,,not to 
mention the company of some mind boggling posts from this user group.

alas learning this language is more complex than studying Bradley Cowan's 
4th dimensional market geometry,,

hunting around through other filters in the library and reading the 
tutorials,,,which are great but i'm not interestedin buying a ma cross over 
or macd,,,nor in backtesting at this stage,,,but i do need your help or 
someone to mentor me through this swing scan/explorer

this is where i'm at ,,i've tried pinching this from a swing scan in the 
library but changed the ma values to what i want,,so i can atleast get part 
of this swing filter together,,

MAProperOrder = (MA(c,20) > MA(c,40));
post this i get a "variable" error ,,,after some reading and looking through

other files i now have
Filter = MAProperOrder before the other line,,,that error has now moved to 
error 29 ,,needs to be initialised,,,as i've mentioned in another post on 
Gartleys ,,i've looked up error 29 and read the example but fail to 
understand how that apply's to this situation also,,

next i need to be able to set the high of 3 days ago to be the highest in 20

days,,,anytips on where abouts in the tutorial i can read up on the language

used set this up please,,,,

regards
Paul
 

  _____  

All-new
<http://us.rd.yahoo.com/evt=43256/*http:/advision.webevents.yahoo.com/mailbe
ta>  Yahoo! Mail - Fire up a more powerful email and get things done faster.

 

Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.13.27/517 - Release Date: 11/3/2006