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

[amibroker] Re: Help with AFL for simple system/test



PureBytes Links

Trading Reference Links

Can you please tell me where can I get the code for Stochastic
Momentum Index Trade by Bill Blau?

Alan

--- In amibroker@xxxxxxxxxxxxxxx, "Creztor Tessel" <creztor@xxx> wrote:
>
> Hi Howard many thanks for the reply.  Basically if the SMI crosses 0
and is 
> positive and rising it will buy and as soon as it stops rising and
goes flat 
> or starts dropping (while still above 0 line) it will just close any
open 
> positions and not trade until it starts rising again and is above the 0 
> line.  If it goes below 0 line and is dropping down it will go short
and 
> stay short until it either goes flat or starts rising and will close
any 
> open short positions and will not go short again it starts dropping
again.  
> Its actually a William Blau indicator based on the SMI and code is
below.  
> Im just trying to get it to optimize the 3 values of the SMI to find an 
> optimal range and two ema smoothing period over the data its being
optimized 
> on.  Ive included a picture of an indicator that plots what I am
trying to 
> do but it is not for AB and it doesnt have the optimize/back testing
feature 
> like AB does.  Hopefully that picture will make it clear.  Many
thanks for 
> the reply and if its unclear or you cant do it thats fine, still
appreciate 
> the help.
> 
> Jolon
> 
> SMI_Trade
> ////////////
> (User Function: SMI_Trade = Stochastic Momentum Index Trade by Bill
Blau)
> Inputs: q(NumericSimple), r(NumericSimple), s(NumericSimple);
> Value1 = SMI(q, r, s);
> If Value1 - Value1[1] > 0 AND Value1 > 0 then Value2 = Value1
> Else Value2 = 0; (Value2 is that portion of the SMI which is
positive and 
> rising)
> If Value1 - Value1[1] < 0 AND Value1 , 0 then Value 3 = Value1
> Else Value3 = 0; (Value3 is that portion of the SMI which is
negative and 
> falling)
> SMI_Trade = Value2 + Value3;
> 
> 
> 
> >From: "Howard B" <howardbandy@xxx>
> >Reply-To: amibroker@xxxxxxxxxxxxxxx
> >To: amibroker@xxxxxxxxxxxxxxx
> >Subject: Re: [amibroker] Help with AFL for simple system/test
> >Date: Thu, 10 May 2007 18:33:20 -0700
> >
> >Hi Crez ---
> >
> >The vertical axis is dollars.  The horizontal axis is time.  The
concept of
> >45 degrees is not well defined.  If the stock splits, the angle
changes.  
> >Do
> >you have a more precise definition?
> >
> >Thanks,
> >Howard
> >
> >On 5/10/07, creztor123 <creztor@xxx> wrote:
> >>
> >>   Ok need some help here if possible please. I am trying to make a
> >>simple setup using the Stochastic Momentum Indicator. I am new to
> >>amibroker and dont have the knowledge on how to code this. If no-one
> >>can help but knows where I can find what I need to learn then that
> >>would be good enough :) Appreciate any info. Would like to optimize
> >>it based on the following rules:
> >>
> >>if the SMI is above 0 and its angle/direction is up (im guessing > 45
> >>degrees) then it will buy
> >>if the SMI is below 0 and the angle is down (again guessing < 45
> >>degrees) then it will sell
> >>if SMI is above 0 and its flat or going down then it will not trade or
> >>should close any trade it has open
> >>if SMI is below 0 and flat or going up then it will not trade or
> >>should close any trade open
> >>
> >>
> >>
> 
> _________________________________________________________________
> Advertisement: Win a trip to the exquisite Daintree Ecolodge & Spa in 
> Cairns, QLD! 
>
http://ninemsn.com.au/share/redir/adTrack.asp?mode=click&clientID=781&referral=hotmailtaglineMay&URL=http://music.ninemsn.com.au/compIntro.aspx?compId=2386
>




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/