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

[amibroker] Re: Coding a pattern of variable length



PureBytes Links

Trading Reference Links

Hi Dennis,

Thanks for the prompt reply. Please accept my apologies but I'm a 
newbie to AB (and progamming) so would really welcome some further 
help if thats ok?

1. What is the benefit of creating 1 indicator from the 2 I already 
have? 

2. Could you expand of how I would achieve the looping process?

The basic logic which I currently have is:

1. If on bar, "Indicator A" is above "Indicator B" then
move to step 2 else move to step 5
2. If on the next bar "Indicator A" is below "Indicator B" then move 
to step 3 else move to step 5
3. If on the next bar "Indicator A" is below "Indicator B" then 
repeat step 3 else move to step 4
4. This completes the pattern - Count number of bars in pattern
5. No pattern found so Move to next bar and repeat step 1

How I would go about incorporating this into a loop is beyond me 
though... :-/   


--- In amibroker@xxxxxxxxxxxxxxx, Dennis Brown <see3d@xxx> wrote:
>
> The approach I would take is to create a single indicator from 
your  
> two, taking the difference.  Then I would loop through all the 
bars  
> looking for the start of the pattern, and process each bar inside 
the  
> pattern to the end and make your buy/sell decision, then on to the  
> start of the next pattern.
> 
> Best regards,
> Dennis
> 
> On Mar 1, 2008, at 10:42 PM, chorlton_c_hardy wrote:
> 
> > Hi again,
> >
> > In addition to my original question, I will need to add further
> > conditions which will allow me to assess each of the various bars 
of
> > the complete pattern
> >
> > eg. If the pattern consisted of 5 bars in total, then I need the
> > flexibility to assess each of the bars (bar1, bar2, etc) 
individually
> > & make comparisons between them. ie. Bar5's Close > Bar1's Close,
> > etc, etc.
> >
> > Would this be easy to do in relation to my original question??
> >
> > Thanks in advance,
> >
> > Chorlton
> >
> >
> >
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "chorlton_c_hardy" <chorlton-c-
> > hardy@> wrote:
> >>
> >> Hello All,
> >>
> >> Can anyone offer some help regarding a coding problem, which I'm
> > having?
> >>
> >> Basically I want to search for a "pattern" which consists of:
> >>
> >> 1. On the First & Last Bars of the pattern, "Indicator A" is
> >> ABOVE "Indicator B"
> >>
> >> 2. On ALL the bars in the middle of the pattern, "Indicator A" is
> >> BELOW "Indicator B"
> >>
> >> What makes this difficult (well for me anyway) is that the number
> > of
> >> bars in the middle can vary. If the pattern consisted of a 
specific
> >> number of bars, then it would be easy, but with this variation, 
I'm
> >> intially stumped.
> >>
> >> Consequently, is it possible for someone to point me in the right
> >> direction of how to begin coding this please?
> >>
> >> Many Thanks,
> >>
> >> Chorlton
> >>
> >
> >
> >
> >
> > Please note that this group is for discussion between users only.
> >
> > To get support from AmiBroker please send an e-mail directly to
> > SUPPORT {at} amibroker.com
> >
> > For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> > http://www.amibroker.com/devlog/
> >
> > For other support material please check also:
> > http://www.amibroker.com/support.html
> >
> > Yahoo! Groups Links
> >
> >
> >
>




Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/