Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

amibroker-ts · AmiBroker Trading Systems

The Yahoo! Groups Product Blog

Check it out!

Group Information

  • Members: 2988
  • Category: Trade
  • Founded: Oct 3, 2001
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Messages

Advanced
Messages Help
Messages 461 - 500 of 3522   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#461 From: Joseph Jungbluth <joe_volleyguy@...>
Date: Mon Jun 2, 2003 1:26 pm
Subject: Re: Re: Indexing ATR
joe_volleyguy
Send Email Send Email
 
No, I didn't see it, thanks.  That might explain why
my exits were so inefficient.  I did find another
index somewhere that I changed, but I don't remember
what it was.  I need to figure out if there is any way
to optimize the AFL for speed.  It's using 740,000+
quotes in whatever timespan the CHECKER is using.  It
takes pretty long to run on my K6-2 450 :(  The best
solution would be to upgrade the machine!  Thanks for
all your help.

Joe

--- Franco Gornati <fgornati@...> wrote:
> Joe, one last thing (but I think you already saw
> it). I made a mistake here
>
> if (trade_ON)
> {
>       Sell[i] = C[i] < w_maL[i] OR C[i] < Long_low;
>       Cover[i] = C[i] > w_maL[i] OR C[i] >
> Short_high;
> }                      ----^
>
> It's obviously
>
> if (trade_ON)
> {
>       Sell[i] = C[i] < w_maL[i] OR C[i] < Long_low;
>       Cover[i] = C[i] > w_maH[i] OR C[i] >
> Short_high;
> }
>
> Maybe this is the cause of so few signals
>
> Enjoy a nice trade
>
> Franco
>
> joe_volleyguy wrote:
> > Thanks Steve and Franco,
> >
> > Below is the latest version.  I didn't initialize
> BarCount, since I
> > think it is automatically initialized by AB.  The
> indices Franco had
> > put on trade_ON variable in the exits section were
> a quick road to
> > ruin since they were seldom triggered :)  Clearly
> the trick was the
> > definition of w_maL and w_maH and using their
> indexed items in the
> > exit code.  I'm pretty sure I had tried that, but
> it didn't work so
> > I'm glad you suggested it.
> >
> > Thanks again,
> >
> > Joe
> > ///////////////
> > // Braided Moving Averages
> > // Rev 8
> > // Joe Jungbluth
> > ///////////////
> > //  Initialize variables
> > //
> > Lt_MA = 100; //Optimize("longterm MA",100, 100,
> 200, 10);
> > mt_MA = 20; //Optimize("medium term
> MA",21,13,34,2);
> > st_MA = 4; //Optimize("short term MA", 4, 3, 8,
> 1);
> > Lb_ATR = 11; //Optimize("ATR lookback",13, 4, 21,
> 1);
> > exit_MA = 6; //Optimize("exit MA", 5, 4, 11, 1);
> > MAB_ratio = .07; //Optimize("MAB ratio", .03, .01,
> .04, .01);
> > trade_ON = 0;
> > Long_low = 0;
> > Short_high = 9999999;
> > Buy = Sell = Short = Cover = 0;
> > //
> > SetTradeDelays(0,1,0,1);
> > //
> > //look for a braid
> > //if there's a braid, is the real body narrow
> > //
> > //take a long trade if next bar's price can take
> out yesterday's close
> > //
> > //take a short trade if next bar's price can take
> out yesterday's low
> > //
> > // Trade Execution
> > for( i = 2; i < BarCount; i++ )
> > {
> >   BuyPrice = Ref(H[i], -1);
> >   ShortPrice = Ref(L[i], -1);
> >   price_Range = ATR(Lb_ATR);
> >   LM_BRAID =
> abs(Ref(MA(C,Lt_MA),-2)/Ref(MA(C,mt_MA),-2) - 1);
> >   MS_BRAID =
> abs(Ref(MA(C,mt_MA),-2)/Ref(MA(C,st_MA),-2) - 1);
> >   LS_BRAID =
> abs(Ref(MA(C,Lt_MA),-2)/Ref(MA(C,st_MA),-2) - 1);
> >   if ( abs(C[i-2] - O[i-2]) < .2 * price_Range[i]
> AND LM_BRAID[i] <=
> > MAB_ratio AND MS_BRAID[i] <= MAB_ratio AND
> LS_BRAID[i] <= MAB_ratio
> > AND abs(C[i-1] - O[i-1]) > .8 * price_Range[i] )
> >   {
> >       Buy = C[i] > 1;
> >       Long_low = L[i] - .03;
> >       Short = C[i] > 7.5;
> >       Short_high = H[i] + .03;
> >       trade_ON = 1;
> >   }
> > //
> >
> >   w_maL = WMA(L,exit_MA);
> >   w_maH = WMA(H,exit_MA);
> >
> >   if (trade_ON)
> >   {
> >     Sell[i] = C[i] < w_maL[i] OR C[i] < Long_low;
> >     Cover[i] = C[i] > w_maL[i] OR C[i] >
> Short_high;
> >   }
> >
> >   if (Sell[i] OR Cover[i])
> >   {
> >     trade_ON = 0;
> >   }
> > }
> >
> >
> >
> >
> > To unsubscribe from this group, send an email to:
> > amibroker-ts-unsubscribe@yahoogroups.com
> >
> >
> >
> > Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
> >
> >
> >
>
>
> --
> Franco Gornati <fgornati@...>
>
>
> ------------------------ Yahoo! Groups Sponsor
>
> To unsubscribe from this group, send an email to:
> amibroker-ts-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>


__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

#463 From: "joe_volleyguy" <joe_volleyguy@...>
Date: Tue Jun 3, 2003 1:54 am
Subject: Re: Indexing ATR
joe_volleyguy
Send Email Send Email
 
OK, so I changed the variable name, but the exits still
don't work.  I've attached the entire system, but the
exits are snipped here:

   w_maL = WMA(L,exit_MA);
   w_maH = WMA(H,exit_MA);

   if (trade_ON)
   {
     Sell = C[i] < w_maL[i] OR C[i] < Long_low;
     Cover = C[i] > w_maH[i] OR C[i] > Short_high;
   }

Now, Long_low and Short_high are the Lows and Highs
of the day on which the trade is taken.  If the price
of the day goes below (Long trades) or above (Short
trades) the trade should exit.  It doesn't since if
I don't set the stops in Settings, there are trades
that go to ruin.  I don't get it.  Maybe you all can
explain it.

Thanks,

Joe

///////////////
// Braided Moving Averages
// Rev 9c
// Joe Jungbluth
///////////////
//  Initialize variables
//
Lt_MA = 100; //Optimize("longterm MA",100, 100, 200, 10);
mt_MA = 20; //Optimize("medium term MA",21,13,34,2);
st_MA = 4; //Optimize("short term MA", 4, 3, 8, 1);
Lb_ATR = 11; //Optimize("ATR lookback",13, 4, 21, 1);
exit_MA = 6; //Optimize("exit MA", 5, 4, 11, 1);
MAB_ratio = .07; //Optimize("MAB ratio", .03, .01, .04, .01);
trade_ON = 0;
Long_low = 0;
Short_high = 9999999;
Buy = Sell = Short = Cover = 0;
//
SetTradeDelays(0,0,0,0);
//
//look for a braid
//if there's a braid, is the real body narrow
//
//take a long trade if next bar's price can take out yesterday's close
//
//take a short trade if next bar's price can take out yesterday's low
//
// Trade Execution
for( i = 2; i < BarCount; i++ )
{
   BuyPrice = Ref(H[i], -1);
   ShortPrice = Ref(L[i], -1);
   price_Range = ATR(Lb_ATR);
   LM_BRAID = abs(Ref(MA(C,Lt_MA),-2)/Ref(MA(C,mt_MA),-2) - 1);
   MS_BRAID = abs(Ref(MA(C,mt_MA),-2)/Ref(MA(C,st_MA),-2) - 1);
   LS_BRAID = abs(Ref(MA(C,Lt_MA),-2)/Ref(MA(C,st_MA),-2) - 1);
   if ( abs(C[i-2] - O[i-2]) < .2 * price_Range[i] AND LM_BRAID[i] <=
MAB_ratio AND MS_BRAID[i] <= MAB_ratio AND LS_BRAID[i] <= MAB_ratio
AND abs(C[i-1] - O[i-1]) > .8 * price_Range[i] )
   {
       if ((C[i-1] - O[i-1]) > 0)
       {
         Buy = C[i] > 1;
       }
       else
       {
         Short = C[i] > 7.5;
       }
       if (Buy)
       {
         Long_low = L[i] - .03;
         trade_ON = 1;
       }
       if (Short)
       {
         Short_high = H[i] + .03;
         trade_ON = 1;
       }
   }
//

   w_maL = WMA(L,exit_MA);
   w_maH = WMA(H,exit_MA);

   if (trade_ON)
   {
     Sell = C[i] < w_maL[i] OR C[i] < Long_low;
     Cover = C[i] > w_maH[i] OR C[i] > Short_high;
   }

   if (Sell OR Cover)
   {
     trade_ON = 0;
   }
}
>
> --- Franco Gornati <fgornati@i...> wrote:
> > Joe, one last thing (but I think you already saw
> > it). I made a mistake here
> >
> > if (trade_ON)
> > {
> >       Sell[i] = C[i] < w_maL[i] OR C[i] < Long_low;
> >       Cover[i] = C[i] > w_maL[i] OR C[i] >
> > Short_high;
> > }                      ----^
> >
> > It's obviously
> >
> > if (trade_ON)
> > {
> >       Sell[i] = C[i] < w_maL[i] OR C[i] < Long_low;
> >       Cover[i] = C[i] > w_maH[i] OR C[i] >
> > Short_high;
> > }
> >
> > Maybe this is the cause of so few signals
> >
> > Enjoy a nice trade
> >
> > Franco
> >

#464 From: "RLU94305" <rlu94305@...>
Date: Tue Jun 3, 2003 5:22 pm
Subject: Coding Problem
robertlu007
Send Email Send Email
 
Hi,
 
I have a programing problem would like to seek for help.
 
I would like to define the bar color to blue when the close of the bar is equal to high.  And it will remain in blue until next signal when close is equal to low.  (In other words, the bar changes color only when close locates at either high or low of the bar.)
 
Here is my current program code:
Color = IIf(Close==High, colorBlue, IIf(Close==Low, colorRed, colorBlack));
Plot(Close, "Bar Chart", Color, styleBar);
However, I do not know how to make the color remain the same until next signal happens.
 
Thank you for your help.
 
Best regards, 
Robert Lu
____________________________________________________
  IncrediMail - Email has finally evolved - Click Here

#465 From: "Graham" <gkavanagh@...>
Date: Tue Jun 3, 2003 9:43 pm
Subject: RE: Coding Problem
kavemanperth
Send Email Send Email
 

Robert

Not sure if this will give you what you are looking for, but might give you an idea

Maybe try something like this

Blue = close==high;

Red = close==low;

Exrem(blue,red);

Color = IIf(blue, colorBlue, colorRed);

Plot(Close, "Bar Chart", Color, styleBar);

-----Original Message-----
From: RLU94305 [mailto:rlu94305@...]
Sent:
Wednesday, 4 June 2003 1:23 AM
To: amibroker-ts@yahoogroups.com
Subject: [amibroker-ts] Coding Problem

 

Hi,

 

I have a programing problem would like to seek for help.

 

I would like to define the bar color to blue when the close of the bar is equal to high.  And it will remain in blue until next signal when close is equal to low.  (In other words, the bar changes color only when close locates at either high or low of the bar.)

 

Here is my current program code:

Color = IIf(Close==High, colorBlue, IIf(Close==Low, colorRed, colorBlack));
Plot(Close, "Bar Chart", Color, styleBar);

However, I do not know how to make the color remain the same until next signal happens.

 

Thank you for your help.

 

Best regards, 

Robert Lu

 

 

 

____________________________________________________
  IncrediMail - Email has finally evolved - Click Here

To unsubscribe from this group, send an email to:
amibroker-ts-unsubscribe@yahoogroups.com



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



#466 From: "Anthony Faragasso" <ajf1111@...>
Date: Tue Jun 3, 2003 11:30 pm
Subject: Re: Coding Problem
ajf1111us2000
Send Email Send Email
 
Robert,
 
This will do it for you.
 

Codeblue=C==H ;

Codered=C==L ;

barcolor=Flip(Codeblue,Codered);

Plot(Close,"",IIf(barcolor,colorBlue,colorRed),styleCandle);

Anthony

----- Original Message -----
From: RLU94305
Sent: Tuesday, June 03, 2003 1:22 PM
Subject: [amibroker-ts] Coding Problem

Hi,
 
I have a programing problem would like to seek for help.
 
I would like to define the bar color to blue when the close of the bar is equal to high.  And it will remain in blue until next signal when close is equal to low.  (In other words, the bar changes color only when close locates at either high or low of the bar.)
 
Here is my current program code:
Color = IIf(Close==High, colorBlue, IIf(Close==Low, colorRed, colorBlack));
Plot(Close, "Bar Chart", Color, styleBar);
However, I do not know how to make the color remain the same until next signal happens.
 
Thank you for your help.
 
Best regards, 
Robert Lu
____________________________________________________
  IncrediMail - Email has finally evolved - Click Here


To unsubscribe from this group, send an email to:
amibroker-ts-unsubscribe@yahoogroups.com



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.486 / Virus Database: 284 - Release Date: 5/29/2003

#468 From: "RLU94305" <rlu94305@...>
Date: Wed Jun 4, 2003 1:17 am
Subject: Re: Coding Problem
robertlu007
Send Email Send Email
 
Hi Anthony,
 
Thank you very much.  It works fine now.
 
Best regards,
Robert 
 
-------Original Message-------
 
Date: Wednesday, June 04, 2003 07:33:19 AM
Subject: Re: [amibroker-ts] Coding Problem
 
Robert,
 
This will do it for you.
 

Codeblue=C==H ;

Codered=C==L ;

barcolor=Flip(Codeblue,Codered);

Plot(Close,"",IIf(barcolor,colorBlue,colorRed),styleCandle);

Anthony

----- Original Message -----
From: RLU94305
Sent: Tuesday, June 03, 2003 1:22 PM
Subject: [amibroker-ts] Coding Problem

Hi,
 
I have a programing problem would like to seek for help.
 
I would like to define the bar color to blue when the close of the bar is equal to high.  And it will remain in blue until next signal when close is equal to low.  (In other words, the bar changes color only when close locates at either high or low of the bar.)
 
Here is my current program code:
Color = IIf(Close==High, colorBlue, IIf(Close==Low, colorRed, colorBlack));
Plot(Close, "Bar Chart", Color, styleBar);
However, I do not know how to make the color remain the same until next signal happens.
 
Thank you for your help.
 
Best regards, 
Robert Lu


To unsubscribe from this group, send an email to:
amibroker-ts-unsubscribe@yahoogroups.com



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.486 / Virus Database: 284 - Release Date: 5/29/2003


To unsubscribe from this group, send an email to:
amibroker-ts-unsubscribe@yahoogroups.com



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
 
____________________________________________________
  IncrediMail - Email has finally evolved - Click Here

#469 From: "Tomasz Janeczko" <amibroker@...>
Date: Wed Jun 4, 2003 2:15 pm
Subject: Re: Re: Indexing ATR
amibroker
Send Email Send Email
 
Hello,

Some obvious logic errors:

       Buy = C[i] > 1;
<-- ERROR: BUY SHOULD BE  ARRAY, at this point it is just a scalar


       Long_low = L[i] - .03;
       Short = C[i] > 7.5;
<-- ERROR: the same as above

       Short_high = H[i] + .03;
       trade_ON = 1;
}
//
if (trade_ON)
{
     Sell = C[i] < WMA(L[i],exit_MA) OR C[i] < Long_low;
<-- ERROR:  here you calculate WMA from scalar (L[i] is a just single number)
instead of array

     Cover = C[i] > WMA(H[i],exit_MA) OR C[i] > Short_high;

<-- ERROR:  the same as above

}


General rule:
Put all functions requiring/producing ARRAYS **outside** of for-loop.
Put all array indexing [] **inside** for-loop.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: "joe_volleyguy" <joe_volleyguy@...>
To: <amibroker-ts@yahoogroups.com>
Sent: Sunday, June 01, 2003 3:13 PM
Subject: [amibroker-ts] Re: Indexing ATR


> Well, the subscript out-of-range is fixed, but I can't find the Array
> in the FOR or IF statements.  Can anyone else see it?
>
> Thanks,
>
> Joe
>
> ///////////////
> // Braided Moving Averages
> // Rev 8
> // Joe Jungbluth
> ///////////////
> //  Initialize variables
> //
> Lt_MA = 100; //Optimize("longterm MA",100, 100, 200, 10);
> mt_MA = 20; //Optimize("medium term MA",21,13,34,2);
> st_MA = 4; //Optimize("short term MA", 4, 3, 8, 1);
> Lb_ATR = 11; //Optimize("ATR lookback",13, 4, 21, 1);
> exit_MA = 6; //Optimize("exit MA", 5, 4, 11, 1);
> MAB_ratio = .07; //Optimize("MAB ratio", .03, .01, .04, .01);
> trade_ON = 0;
> Long_low = 0;
> Short_high = 9999999;
> Buy = Sell = Short = Cover = 0;
> //
> SetTradeDelays(0,1,0,1);
> //
> //look for a braid
> //if there's a braid, is the real body narrow
> //
> //take a long trade if next bar's price can take out yesterday's close
> //
> //take a short trade if next bar's price can take out yesterday's low
> //
> // Trade Execution
> for( i = 2; i < BarCount; i++ )
> {
> //((H[i-5]-L[i-5])+(H[i-4]-L[i-4])+(H[i-3]-L[i-3])+(H[i-2]-L[i-2])+(H
> [i-1]-L[i-1])+(H[i-0]-L[i-0]))/6
>   BuyPrice = Ref(H[i], -1);
>   ShortPrice = Ref(L[i], -1);
>   price_Range = ATR(Lb_ATR);
>   LM_BRAID = abs(Ref(MA(C,Lt_MA),-2)/Ref(MA(C,mt_MA),-2) - 1);
>   MS_BRAID = abs(Ref(MA(C,mt_MA),-2)/Ref(MA(C,st_MA),-2) - 1);
>   LS_BRAID = abs(Ref(MA(C,Lt_MA),-2)/Ref(MA(C,st_MA),-2) - 1);
>   if ( abs(C[i-2] - O[i-2]) < .2 * price_Range[i] AND LM_BRAID[i] <=
> MAB_ratio AND MS_BRAID[i] <= MAB_ratio AND LS_BRAID[i] <= MAB_ratio
> AND abs(C[i-1] - O[i-1]) > .8 * price_Range[i] )
>   {
>       Buy = C[i] > 1;
>       Long_low = L[i] - .03;
>       Short = C[i] > 7.5;
>       Short_high = H[i] + .03;
>       trade_ON = 1;
>   }
> //
>   if (trade_ON)
>   {
>     Sell = C[i] < WMA(L[i],exit_MA) OR C[i] < Long_low;
>     Cover = C[i] > WMA(H[i],exit_MA) OR C[i] > Short_high;
>   }
>   if (Sell OR Cover)
>   {
>     trade_ON = 0;
>   }
> }
>
> --- In amibroker-ts@yahoogroups.com, "joe_volleyguy"
> <joe_volleyguy@y...> wrote:
> > Duh, duh, duh...  Thanks Franco!  :)
> >
> > Joe
> >
> > --- In amibroker-ts@yahoogroups.com, Franco Gornati <fgornati@i...>
> > wrote:
> > > Joe,
> > >
> > > (at a glance, i didn't check) change
> > >
> > > for( i = 0; i < BarCount; i++ ) in
> > > for( i = 2; i < BarCount; i++ )
> > >
> > > Franco
> > >
> > > joe_volleyguy wrote:
> > > > I need some more advice.  The attached system has some errors.
> > It
> > > > gives 3 subscript out of range errors that I haven't been able
> to
> > > > figure out yet and complains about an array in a conditional
> > > > statement.  That is due to the ATR(lb_ATR) statements which I
> > > > understand are arrays.  I just don't see how to index them.
> > > >
> > > > Any insights would be appreciated.
> > > >
>
>
>
> To unsubscribe from this group, send an email to:
> amibroker-ts-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>

#473 From: "swissoaktree" <gregoakes@...>
Date: Thu Jun 19, 2003 3:49 pm
Subject: HELP TOMASZ or anyone else
swissoaktree
Send Email Send Email
 
Thomasz:  I sent an E-mail to tj@... so if that is you
please forgive the doubling up of messages.I am frustrated. This is
my problem. I am trading the E-mini S&P 500 futures using 4
different time frames:5-3-2-1.  When I open Amibroker and go to the
2 minute time frame I am getting times in even increments ( i.e.
7:02-7:04-7:06 etc..) Since the globex futures close at 4:15 EST and
reopen at 4:45 EST I need the 2 minute chart time frames to read on
odd numbers ( i.e. 7:45-7:47-7:49 etc..) . I have gone to Tools-
Preferences-Intraday and have checked and unchecked  "Align custom
minute bars to regular market hours", but that seems to do nothing.
I have to admit that there are times when I start your program in
the morning and the time frames on the 2 minute chart are as I
desire with odd numbers, but there are times when I start your
program and the time frames are not as I desire.  It is crucial with
my system that I get the 2 minute chart to line up with odd minute
times.

#474 From: "Tomasz Janeczko" <amibroker@...>
Date: Thu Jun 19, 2003 4:35 pm
Subject: Re: HELP TOMASZ or anyone else
amibroker
Send Email Send Email
 
Hello,

Go to File->Database Settings
then click on "INtraday settings" then
set trading hours START and END time
to match session start:
4:45 for start feld

Only then "Align custom minute bars to regular market hours"
will be able to align to odd numbers.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: "swissoaktree" <gregoakes@...>
To: <amibroker-ts@yahoogroups.com>
Sent: Thursday, June 19, 2003 5:49 PM
Subject: [amibroker-ts] HELP TOMASZ or anyone else


> Thomasz:  I sent an E-mail to tj@... so if that is you
> please forgive the doubling up of messages.I am frustrated. This is
> my problem. I am trading the E-mini S&P 500 futures using 4
> different time frames:5-3-2-1.  When I open Amibroker and go to the
> 2 minute time frame I am getting times in even increments ( i.e.
> 7:02-7:04-7:06 etc..) Since the globex futures close at 4:15 EST and
> reopen at 4:45 EST I need the 2 minute chart time frames to read on
> odd numbers ( i.e. 7:45-7:47-7:49 etc..) . I have gone to Tools-
> Preferences-Intraday and have checked and unchecked  "Align custom
> minute bars to regular market hours", but that seems to do nothing.
> I have to admit that there are times when I start your program in
> the morning and the time frames on the 2 minute chart are as I
> desire with odd numbers, but there are times when I start your
> program and the time frames are not as I desire.  It is crucial with
> my system that I get the 2 minute chart to line up with odd minute
> times.
>
>
>
>
>
> To unsubscribe from this group, send an email to:
> amibroker-ts-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>

#475 From: uenal.mutlu@...
Date: Thu Jun 26, 2003 11:50 am
Subject: xxTrader Trade Simulation Results (Score&Rank Backtesting)
anty3de
Send Email Send Email
 
Here are some xxTrader results using its integrated
default trading system.

A watchlist containing the 100 Nasdaq100 stocks was used.
The index ^NDX was used.
MAperiods is the default periods used in all MA calculations.
Profit% is the profit in percent excluding  the initial capital (which was 100k)
MaxRisk% means the max draw down of the initial capital at any time.

Period: 1/1/2000 - 6/24/2003
Positions per bar: 1 (either Long or Short)
   Profit%  MAperiods    MaxRisk%
  --------  ---------  ----------
  15891.80      9       -1.60659
  28725.70     10       -1.60659
   6686.35     11        0
  42347.70     12       -0.135188
  31706.90     13       -0.135188

Period: 1/1/2000 - 6/24/2003
Positions per bar: 2 (either Long or Short)
   Profit%  MAperiods    MaxRisk%
  --------  ---------  ----------
   3745.71      9        0
   8550.22     10        0
   5826.41     11        0
   5292.76     12        0
   8955.30     13        0

Period: 1/1/2000 - 6/24/2003
Positions per bar: 3 (either Long or Short)
   Profit%  MAperiods    MaxRisk%
  --------  ---------  ----------
   1719.42      9        0
   2363.53     10        0
   3550.86     11        0
   4604.86     12        0
   5956.10     13        0

Period: 1/1/2000 - 6/24/2003
Positions per bar: 4 (either Long or Short)
   Profit%  MAperiods    MaxRisk%
  --------  ---------  ----------
   1503.47      9        0
   1591.82     10        0
   2666.47     11        0
   2923.04     12        0
   3509.43     13        0

Any start date (1990..2003) till today gives good results.
You can verify these results by your own test runs of xxTrader.
The file Summary.csv contains a summary of all results.

One interessting conclusion is that the integrated
system in xxTrader gives best results if MAperiods is
between 9..13. Sometimes also 9..16 are very good too.
Shorter or longer MAperiods is not recommended.

And having more than 3 positions open at a time is
also not recommended as the results make this clear.
Best results can be get with as less positions as possible
ie. 1 (this also saves trading costs), but this is a
psychologic issue and seem more riskier, therefore
IMHO 2 positions is the ideal.

--
Uenal Mutlu (UM)
http://groups.yahoo.com/group/abtool

#476 From: uenal.mutlu@...
Date: Thu Jun 26, 2003 11:59 am
Subject: Re: [abtool] xxTrader Trade Simulation Results (Score&Rank Backtesting)
anty3de
Send Email Send Email
 
BTW: the entry price was the "Close" price, and
also the exit price was the "Close" price.
UM


----- Original Message -----
From: <uenal.mutlu@...>
To: <abtool@yahoogroups.com>
Cc: <amibroker-ts@yahoogroups.com>
Sent: Thursday, June 26, 2003 1:50 PM
Subject: [abtool] xxTrader Trade Simulation Results (Score&Rank Backtesting)


> Here are some xxTrader results using its integrated
> default trading system.
>
> A watchlist containing the 100 Nasdaq100 stocks was used.
> The index ^NDX was used.
> MAperiods is the default periods used in all MA calculations.
> Profit% is the profit in percent excluding  the initial capital (which was
100k)
> MaxRisk% means the max draw down of the initial capital at any time.
>
> Period: 1/1/2000 - 6/24/2003
> Positions per bar: 1 (either Long or Short)
>   Profit%  MAperiods    MaxRisk%
>  --------  ---------  ----------
>  15891.80      9       -1.60659
>  28725.70     10       -1.60659
>   6686.35     11        0
>  42347.70     12       -0.135188
>  31706.90     13       -0.135188
>
> Period: 1/1/2000 - 6/24/2003
> Positions per bar: 2 (either Long or Short)
>   Profit%  MAperiods    MaxRisk%
>  --------  ---------  ----------
>   3745.71      9        0
>   8550.22     10        0
>   5826.41     11        0
>   5292.76     12        0
>   8955.30     13        0
>
> Period: 1/1/2000 - 6/24/2003
> Positions per bar: 3 (either Long or Short)
>   Profit%  MAperiods    MaxRisk%
>  --------  ---------  ----------
>   1719.42      9        0
>   2363.53     10        0
>   3550.86     11        0
>   4604.86     12        0
>   5956.10     13        0
>
> Period: 1/1/2000 - 6/24/2003
> Positions per bar: 4 (either Long or Short)
>   Profit%  MAperiods    MaxRisk%
>  --------  ---------  ----------
>   1503.47      9        0
>   1591.82     10        0
>   2666.47     11        0
>   2923.04     12        0
>   3509.43     13        0
>
> Any start date (1990..2003) till today gives good results.
> You can verify these results by your own test runs of xxTrader.
> The file Summary.csv contains a summary of all results.
>
> One interessting conclusion is that the integrated
> system in xxTrader gives best results if MAperiods is
> between 9..13. Sometimes also 9..16 are very good too.
> Shorter or longer MAperiods is not recommended.
>
> And having more than 3 positions open at a time is
> also not recommended as the results make this clear.
> Best results can be get with as less positions as possible
> ie. 1 (this also saves trading costs), but this is a
> psychologic issue and seem more riskier, therefore
> IMHO 2 positions is the ideal.
>
> --
> Uenal Mutlu (UM)
> http://groups.yahoo.com/group/abtool

#477 From: "iiiiiigor" <wfs@...>
Date: Fri Jun 27, 2003 2:19 am
Subject: Updating an indicator as chart is scrolled back in time
iiiiiigor
Send Email Send Email
 
In looking at a linear regression line plotted on the main price
chart (using AFL LinRegSlope and LinRegIntercept), the line seems to
be "attached" to the most recent date/data range.  That is, the line
gets calculated for the most recent data, but then the line will
scroll to the right and off screen when the chart window is scrolled
backwards in time.  Is it possible to have the regression line
recalculated so it will continue to appear on the scrolled-back chart
window?  That is, it would be the linear regression calculated on the
most recent data *visible* on the chart (not the most recent data in
the database).  Any suggestions on how I might do this?  Looked in
the archives, but wasn't successful - perhaps not knowing what to
call for in the search.

#478 From: "Tomasz Janeczko" <amibroker@...>
Date: Fri Jun 27, 2003 3:48 pm
Subject: Re: Updating an indicator as chart is scrolled back in time
amibroker
Send Email Send Email
 
Hello,

You can use Status("barvisible") for that.
http://www.amibroker.com/guide/afl/afl_view.php?name=STATUS

You can also search mailing list archive for hundreds of examples
of barsvisible:
One example link:
http://groups.yahoo.com/group/amibroker/message/22107


Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: "iiiiiigor" <wfs@...>
To: <amibroker-ts@yahoogroups.com>
Sent: Friday, June 27, 2003 4:19 AM
Subject: [amibroker-ts] Updating an indicator as chart is scrolled back in time


> In looking at a linear regression line plotted on the main price
> chart (using AFL LinRegSlope and LinRegIntercept), the line seems to
> be "attached" to the most recent date/data range.  That is, the line
> gets calculated for the most recent data, but then the line will
> scroll to the right and off screen when the chart window is scrolled
> backwards in time.  Is it possible to have the regression line
> recalculated so it will continue to appear on the scrolled-back chart
> window?  That is, it would be the linear regression calculated on the
> most recent data *visible* on the chart (not the most recent data in
> the database).  Any suggestions on how I might do this?  Looked in
> the archives, but wasn't successful - perhaps not knowing what to
> call for in the search.
>
>
>
> To unsubscribe from this group, send an email to:
> amibroker-ts-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>

#479 From: "Wayne" <wfs@...>
Date: Fri Jun 27, 2003 4:00 pm
Subject: Re: Updating an indicator as chart is scrolled back in time
iiiiiigor
Send Email Send Email
 
Thank you, Thomas...


----- Original Message -----
From: "Tomasz Janeczko" <amibroker@...>
To: <amibroker-ts@yahoogroups.com>
Sent: Friday, June 27, 2003 8:48 AM
Subject: Re: [amibroker-ts] Updating an indicator as chart is scrolled back
in time


> Hello,
>
> You can use Status("barvisible") for that.
> http://www.amibroker.com/guide/afl/afl_view.php?name=STATUS
>
> You can also search mailing list archive for hundreds of examples
> of barsvisible:
> One example link:
> http://groups.yahoo.com/group/amibroker/message/22107
>
>
> Best regards,
> Tomasz Janeczko
> amibroker.com
> ----- Original Message -----
> From: "iiiiiigor" <wfs@...>
> To: <amibroker-ts@yahoogroups.com>
> Sent: Friday, June 27, 2003 4:19 AM
> Subject: [amibroker-ts] Updating an indicator as chart is scrolled back in
time
>
>
> > In looking at a linear regression line plotted on the main price
> > chart (using AFL LinRegSlope and LinRegIntercept), the line seems to
> > be "attached" to the most recent date/data range.  That is, the line
> > gets calculated for the most recent data, but then the line will
> > scroll to the right and off screen when the chart window is scrolled
> > backwards in time.  Is it possible to have the regression line
> > recalculated so it will continue to appear on the scrolled-back chart
> > window?  That is, it would be the linear regression calculated on the
> > most recent data *visible* on the chart (not the most recent data in
> > the database).  Any suggestions on how I might do this?  Looked in
> > the archives, but wasn't successful - perhaps not knowing what to
> > call for in the search.
> >
> >
> >
> > To unsubscribe from this group, send an email to:
> > amibroker-ts-unsubscribe@yahoogroups.com
> >
> >
> >
> > Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
> >
> >
> >
>
>
> To unsubscribe from this group, send an email to:
> amibroker-ts-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>

#480 From: uenal.mutlu@...
Date: Sat Jun 28, 2003 6:20 pm
Subject: PredictNextBar()
anty3de
Send Email Send Email
 
Hi, could someone please check if the following
code is correct, because it gives an unbelievable
hit rate of around 68 % for predicting the next bar.
Tried on DELL, IBM, ^NDX, MSFT
UM

//---------------------------------------------
// ABtool/Scripts/afl/PredictNextBar.afl
// Predicting next bar's outcome as going up or down
// Status: Experimental, maybe buggy, open for discussion/verification
// Uses ABtool plugin
// Exploration: ApplyTo:current stock
// Written by Uenal Mutlu 030628Sa

Filter = 1;

function PredictNextBar(aPrice, fDebug)
   { // aPrice should be one of O,H,L,C,Avg
     // returns ARRAY; a 1 means Up, 0 means down for next bar prediction

     // you can change the default periods:
     pds = 7;

     // you can change the formula:
     aPredictedNextPrice = TSF(aPrice,pds);

     barFirst    = xxRangeBarFirst();
     barLast     = xxRangeBarLast();
     barsInRange = barLast  - barFirst + 1;
     nBars       = BarCount - barsInRange - pds;
     afPredictNextUp = aPredictedNextPrice >= aPrice;
     afCorrect       = (     afPredictNextUp  and (Ref(aPredictedNextPrice,1) >=
aPrice))
                    or ((not afPredictNextUp) and (Ref(aPredictedNextPrice,1) <=
aPrice));
     aSumCorrect = Sum(afCorrect, nBars);
     aHitPerc    = xxRelPosA(0, nBars, aSumCorrect);
     if (fDebug)
       {
      // AddColumn(pds,         "pds",   1);
         AddColumn(nBars,       "nBars", 1);
         AddColumn(aSumCorrect, "SumCorrect", 1);
         AddColumn(aHitPerc,    "Corect%",    1.2);
       }
     return afPredictNextUp;
   }

afNextBarUp = PredictNextBar(C, true);
//---------------------------------------------

#483 From: "mickeyamelinckx" <mickeyA@...>
Date: Tue Jul 15, 2003 10:43 am
Subject: Re: Mutual Fund Screener
mickeyamelinckx
Send Email Send Email
 
YEs the scan works !!!  If you read the commentaries well in the
code you will find out how to use it ! Basicaly itīs a scan and
backtest code.  It also takes a tremendous time to scan all so I
first run scan as is then look at rankings and adjust then to reduce
the list, scan again an these results I save as a list and this list
I run backtest on.

were below is a important commentary section of the code.
Hope this helps.
M

// Proposed usage:
// 1) Screen all monitored funds / securities
// 2) Sort by Weighted ROC, scroll down for a dosen, and replace
minWeightedROC
by the smallest acceptable value
// 3) Sort by CPR, and repeat the same.
// 4) If you want to put the down limit on 10 day or monthly ROC, do
the same
for these columns
// 5) Repeat exploration. Only the funds/stocks with ROCs more then
defined
values will be in the screen.
// 6) Check how many days passed since the alst buy/sell signal for
the
security. Probably it's not too late to rotate...
//



--- In amibroker-ts@yahoogroups.com, "jbell5931" <jbell5931@y...>
wrote:
> Hi,
>  There is a Fund Screener formula in the Amibroker AFL formula
> Library.  Has anyone gotten it to work properly?  It looks like
> something I could really use to rank my 401k funds.
>
>  For your info, I attached the script below.
>
> Joe
> ================================================================
>
> AFL Library
> List Add formula
>
> Details:
> Formula name: Fund Screener
> Author/Uploader: Dima Rasnitsyn - rasnitsyn@h...
> Date/Time added: 2001-10-13 12:58:30
> Origin:
> Keywords: funds, stocks, rate of change, rank
> Level: medium
> Flags: exploration
>
> Download formula file  |  Delete formula
>
> Description:
> Rank mutual funds [or securities] based on their rates of change
(or
> smoothed ROCs), and see how much time passed since buy/sell
signals
> generated by various systems.
>
>
> Formula:
> // FundScreaner by Dr. S.N.Berger & D.Rasnitsyn
> // The Idea of this screaner is to identify the strongest
securities
> (by their
> ROC), and also see how much time passed since the latest buy/sell
> signal
> generated by different trading systems for each of them.
> // The columns contain:
> // Weighted smoothed ROC (weight coefficients are configurable)
> // average of Monthly, quartely, semi-anual, and anual ROCs (this
> score is used
> by FundX)
> // 5 day smoothed ROC
> // 10 day smoothed ROC
> // 22 day (1 month) smoothed ROC
> // 9 week (2 month) smoothed ROC
> // 13 week -"-
> // 26 week -"-
> // The next columns show The number of days since the latest buy
> (positive) or
> sell (negative) signal generated by particular trading system:
> // N/D - system based on Jaco MRI, Williams AC+, MACD, and
Relative
> slope
> // Dags [sorry if the name is misspelled] peaker
> // Stochastics divergence
> // Any other???
> //
> // Proposed usage:
> // 1) Screen all monitored funds / securities
> // 2) Sort by Weighted ROC, scroll down for a dosen, and replace
> minWeightedROC
> by the smallest acceptable value
> // 3) Sort by CPR, and repeat the same.
> // 4) If you want to put the down limit on 10 day or monthly ROC,
do
> the same
> for these columns
> // 5) Repeat exploration. Only the funds/stocks with ROCs more
then
> defined
> values will be in the screen.
> // 6) Check how many days passed since the alst buy/sell signal
for
> the
> security. Probably it's not too late to rotate...
> //
> //
> // The following sections defines filter criteria.
> // Display only funds with ...
>
> // Filter date: 10000 * (year - 1900) + 100 * month + day, so 2001-
12-
> 31
> becomes 1011231 and 1995-12-31 becomes 951231
> // < 0 means the latest available date; 2001-04-05 - 1010405
> filterdate = -1;
>
> //minRelStrengthSP =-1000; // relative strength over S&P500 >=
this
> value
> min10dayROC =-100;      // Minimum 10 day rate of change < [-1000
> means better
> then S&P 500]
> min22dayROC =-1000;      // Minimum 22 day rate of change < [-1000
> means better
> then S&P 500]
> min13weekROC = -1000;    // Minimum 13 week rate of change < [-
1000
> means
> better then S&P 500]
> min9weekROC = -1000;     // Minimum 9 week rate of change < [-1000
> means better
> then S&P 500]
> minWeightedROC = -1000;  // Minimum weighted ROC !! FUNDS WITH
EMPTY
> WEIGHTED
> ROC (due to lack of 26 week data) ARE ALWAYS INCLUDED !!
> minCPR = -1000;          // Minimum CPR !! FUNDS WITH EMPTY
WEIGHTED
> ROC (due
> to lack of 26 week data) ARE ALWAYS INCLUDED !!
>
> // Smoothing factor (as EMA) for ROC parameters
> // SET TO 1 if want to disable smoothing
> //
> ROC5DayEMA = 9;
> ROC10DayEMA =9;
> ROC22DayEMA = 9;
> ROC9WeekEMA =9;
> ROC13WeekEMA =9;
> ROC26WeekEMA =9;
>
> //
> // WEIGHT coefficients for the weighted ROC calculation
> //
> weightROC5DayEMA = 10;
> weightROC10DayEMA = 15;
> weightROC22DayEMA = 15;
> weightROC9WeekEMA = 10;
> weightROC13WeekEMA = 5;
> weightROC26WeekEMA = 1;
>
> r5  = ema ( close, ROC5DayEMA);
> r10 = ema ( close, ROC10DayEMA);
> r22 = ema (close , ROC22DayEMA);
> r9w = ema (close , ROC9WeekEMA);
> r13w= ema (close, ROC13WeekEMA);
> r13w = IIF (isEmpty (r13w), r9w, r13w);
> r26w= ema (close, ROC26WeekEMA);
> r26w = IIF (isEmpty (r26w), r13w, r26w);
> r52w= ema (close, ROC26WeekEMA);
> r52w = IIF (isEmpty (r52w), r26w, r52w);
>
> numcolumns = 12;
> column2 = ROC5d =  roc (r5 , 5 )  ;
> column2name = "5 d %";
> column3 = ROC10d = roc (r10 , 10 ) ;
> column3name = "10 d %";
> column4 = ROC22d = roc (r22, 22)  ;
> column4name = "22 d %";
> column5 = ROC9w =  roc (r9w, 5*9) ;
> column5name = "9 w %";
> column6 = ROC13w = roc (r13w, 5*13);
> column6name = "13 w %";
> column7 = ROC26w = roc (r26w, 5*26);
> column7name = "26 w % ";
>
> ROC52w = roc (r52w, 5*52);
>
> // Experimental: relation to S&P 500 10 day ROC
> //column10 = RSSP = ROC10d * 100 / (ema (roc(foreign
> ("^SPC", "close") , 10 ),
> ROC10DayEMA));
> //column10name = "RS S&P %";
>
> column0 = weightedROC = (weightROC5DayEMA *ROC5d +
weightROC10DayEMA
> *ROC10d +
> weightROC22DayEMA *ROC22d + weightROC9WeekEMA *ROC9w +
> weightROC13WeekEMA
> *ROC13w + weightROC26WeekEMA * ROC26w)/(weightROC5DayEMA +
> weightROC10DayEMA +
> weightROC22DayEMA + weightROC9WeekEMA + weightROC13WeekEMA +
> weightROC26WeekEMA);
> column0name = "Wght ROC%";
>
> column1 = fundXCPR =   (roc (c, 22) + roc (c, 13*5) +  roc (c,
26*5)
> + roc (c,
> 52*5))  / 4;
> column1name = "CPR";
>
> //
> // Calculate S&P ROCs for filtering
> //
>
> r5sp   = roc (foreign ("^SPC", "close"), 5 )  ;
> r10sp  = roc (foreign ("^SPC", "close"), 10 ) ;
> r22sp  = roc (foreign ("^SPC", "close"), 22)  ;
> r9wsp  = roc (foreign ("^SPC", "close"), 5*9) ;
> r13wsp = roc (foreign ("^SPC", "close"), 5*13);
> r26wsp = roc (foreign ("^SPC", "close"), 5*26);
> r52wsp = roc (foreign ("^SPC", "close"), 5*52);
>
>
> ROC5dSP  = ema (r5sp  , ROC5DayEMA)  ;
> ROC10dSP = ema (r10sp , ROC10DayEMA)  ;
> ROC22dSP = ema (r22sp , ROC22DayEMA)   ;
> ROC9wSP  = ema (r9wsp , ROC9WeekEMA);
> ROC13wSP = ema (r13wsp, ROC13WeekEMA);
> ROC26wSP = ema (r26wsp, ROC26WeekEMA);
> ROC52wSP = ema (r52wsp, ROC26WeekEMA);
>
> min10dayROC  = IIF (min10dayROC  <= -1000, ROC10dSP, min10dayROC );
> min22dayROC  = IIF (min22dayROC  <= -1000, ROC22dSP, min22dayROC );
> min9weekROC  = IIF (min9weekROC  <= -1000, ROC9wSP , min9weekROC );
> min13weekROC = IIF (min13weekROC <= -1000, ROC13wSP, min13weekROC);
> minWeightedROC = IIF (minWeightedROC <= -1000, (weightROC5DayEMA
> *ROC5dSP +
> weightROC10DayEMA *ROC10dSP + weightROC22DayEMA *ROC22dSP +
> weightROC9WeekEMA
> *ROC9wSP + weightROC13WeekEMA *ROC13wSP + weightROC26WeekEMA *
> ROC26wSP)/(weightROC5DayEMA + weightROC10DayEMA +
weightROC22DayEMA +
> weightROC9WeekEMA + weightROC13WeekEMA + weightROC26WeekEMA),
> minWeightedROC);
> minCPR =  IIF (minCPR <= -1000, (r22sp + r13wsp +  r26wsp +
> r52wsp)  / 4,
> minCPR);
>
> filter = IIF (filterdate <= 0, cum(1) == lastvalue (cum(1)),
datenum
> () ==
> filterdate) AND ROC10d >= min10dayROC AND ROC22d >= min22dayROC
AND
> ROC9w >=
> min9weekROC AND ROC13w >= min13weekROC AND (isEmpty(weightedROC)
OR
> weightedROC
> >= minWeightedROC) AND (isEmpty (fundXCPR) OR fundXCPR >= minCPR);
>
> "CPR: " + writeval (fundXCPR) + ", S&P CPR: " + writeval (minCPR);
>
> buy = filter;
> sell = 0;
> short =cover = 0;
>
> // ======== Signals from different systems =====================
>
> // 1. Nate/Dima system
> /*
>  * combination of Jaco MRI, Williams, and MACD
>  */
>
> // Adjustable criteria
> moBuyCriteria = 60; // 70?
> moSellCriteria = 20; // 30?
> rocPeriod = 10;
> jacoHold =20; // Hold period
> exitOnOverbought  = 0;
>
>
>
>
> // Jaco MRI
> /* MRI developed by Jaco Jonker*/
>
> mo=close/ref(close,1)*100 - rsi(14);
> HV = hhv(mo,200);
> LV = llv(mo,200);
> AV = (HV+LV)/2;
>
>
> jacoBuy = isTrue (mo > moBuyCriteria);
> jacoBuy = hold (jacoBuy, jacoHold);
> jacoSell = isTrue (mo < moSellCriteria);
> jacoSell = hold (jacoSell, jacoHold);
>
> // Williams AC+
> outsidebar = outside();
> insidebar = H <= Ref(H,-1) and L >= Ref(L,-1);
> upbar = H > ref(H,-1) and L >= ref(L, -1);
> downbar = L < ref(L,-1) and H <= ref(H,-1);
> barcolor=iif(outsidebar, 1,
>                iif(downbar,   4,
>                iif(upbar,        5,
>                iif(insidebar,6, 0 ) ) ) );
>
>
> var1=ma( A , 34);
> var2=ma( A,5);
> var3=var2-var1;
> var4=var3-ma(var3,5);
>
> wilBuy = var4 > 0;
> wilSell = var4 < 0;
>
> //  Graph0=var4;
> //  graph0style=2+4;
> //  Graph1=wilders(var4,5);
> //  Graph1Style=5;
> //  Graph0Barcolor=Barcolor;
>
> // MACD
> macdBuy = macd() > signal();
> macdSell = macd() < signal();
>
> //  MA (instead of Zig-Zag)
> mac = ma (c, 10);
> maBuy = close > mac AND ref (close > mac, -1); // AND mac >= ref
> (mac, -1);
> maSell = close < mac;
>
> /*Relative Slope*/
> /*by Dimitris Tsokakis*/
> K=EMA((H+L+C)/3,10);
> S1=2*(K-REF(K,-1))/(K+REF(K,-1));
> RS=100*EMA(S1,3);
>
> rocDirBuy = RS > 0; // slope is up
> rocDirSell = NOT rocDirBuy;
>
> //
> // BUY: Jaco MRI was in buy area recently (i.e. the fund was
> oversold);
> currently WIlliams AC+ and MACD are above their reference lines
> (probably
> should replace it by more sensitive slope of the oscilator as
A.Elder
> recommends); price closes above 10 day MA, and Relative slope is
> positive
> buyLine = isTrue (jacoBuy AND wilBuy AND macdBuy AND maBuy AND
> rocDirBuy);
> SystemBuy = isTrue (cross (buyLine, 0));
>
>
> // SELL: Jaco MRI was in sell area recently (i.e. the fund was
> overbought);
> currently WIlliams AC+ and MACD are below their reference lines
> (probably
> should replace it by more sensitive slope of the oscilator as
A.Elder
> recommends); price closes below 10 day MA, and Relative slope is
> negative
> sellLine = isTrue (jacoSell AND wilSell AND macdSell AND maSell AND
> rocDirSell);
> SystemSell = isTrue (cross (sellLine, 0));
>
> sinceBuy = barssince (SystemBuy);
> sinceBuy = IIF (IsEmpty (sinceBuy), 1000, sinceBuy);
> sinceSell = barssince (SystemSell);
> sinceSell = IIF (IsEmpty (sinceSell), 1000, sinceSell);
> sinceSignal = IIF (sinceBuy < sinceSell, sinceBuy, -sinceSell);
>
> column8 = sinceSignal;
> column8name = "N/D";
> column8format = 2.1;
>
> // ------------------  Peak based signals (based on Dags work)
======
>
> pv = peak(close, 2);
>
> buyPeak = isTrue (cross(close, pv + pv/500));
> sellPeak = isTrue (cross( pv + pv/1000, close));
>
> sinceBuy = barssince (buyPeak);
> sinceBuy = IIF (IsEmpty (sinceBuy), 100, sinceBuy);
> sinceSell = barssince (sellPeak);
> sinceSell = IIF (IsEmpty (sinceSell), 100, sinceSell);
> sinceSignal = IIF (sinceBuy < sinceSell, sinceBuy, -sinceSell);
>
> column9 = sinceSignal;
> column9name = "Peak";
> column9format = 2.0;
>
> // ============= Stochastics divergence =====================
> /*Positive Stochastic Divergence for use in
> Indicator Builder and Automatic Analysis (scan mode),
> by Dimitris Tsokakis*/
> ST33=STOCHD(14);
> TR1=LLVBARS(ST33,4);
> TR2=IIF(ST33<30 AND TR1>0 AND REF(TR1,-1)==0,ref(ST33,-1),0);
> TRC=IIF(TR2>0,C,0);
> vs=valuewhen(tr2, ref(st33,-1), 1);
> dvs=vs-ref(vs,-1);
> vc=valuewhen(trc, LLV(c,3), 1);
> dvc=vc-ref(vc,-1);
> diver=iif(dvs>0 and dvc<0,30,0);
> DAS=BARSSINCE(REF(TR2,-1)>0);
> DD=IIF(DAS<20 AND C>=REF(C,-1),DIVER,0);
>
> buyStoch=DD>0 ;
> sinceBuy = barssince (buyStoch);
> sinceBuy = IIF (IsEmpty (sinceBuy), 100, sinceBuy);
>
> /*Negative Stochastic divergence for use in
> Indicator Builder and Automatic Analysis (scan mode),
> by Dimitris Tsokakis*/
> ST33=stochd(14);
> TR1=HHVBARS(ST33,4);
> TR2=IIF(ST33>70 AND TR1>0 AND REF(TR1,-1)==0,ref(ST33,-1),0);
> TRC=IIF(TR2>0,C,0);
> vs=valuewhen(tr2, ref(st33,-1), 1);
> dvs=vs-ref(vs,-1);
> vc=valuewhen(trc, HHV(H,3), 1);
> dvc=vc-ref(vc,-1);
> diver=iif(dvs<0 and dvc>0,90,0);
> DAS=BARSSINCE(REF(TR2,-1)>0);
> ddd=IIF(DAS<20 AND C<REF(C,-1),DIVER,0);
>
> sellStoch = ddd > 0;
> sinceSell = barssince (sellStoch);
> sinceSell = IIF (IsEmpty (sinceSell), 100, sinceSell);
> sinceSignal = IIF (sinceBuy < sinceSell, sinceBuy, -sinceSell);
>
> column10 = sinceSignal;
> column10name = "Stoch";
> column10format = 2.0;
>
> Slw = optimize("slw",3,1,4,1);
> Pds1 =optimize("pds",5,1,16,1);
> Pds2 = optimize("pds",10,1,16,1);
> upM = optimize ("Up margine", 80, 75, 85, 1);
> dnM = optimize ("Down margine", 20, 24, 10, 1);
>
> A =ema((Close -LLV(Low,Pds1))/(HHV(H,Pds1)-LLV(L,Pds1)),Slw)*100;
> B=ema((A-LLV(A,pds1))/(HHV(A,Pds1)-LLV(A,Pds1)),Slw)*100;
>
> A1 =ema((Close -LLV(Low,Pds2))/(HHV(H,Pds2)-LLV(L,Pds2)),Slw)*100;
> B1=ema((A1-LLV(A1,pds2))/(HHV(A1,Pds2)-LLV(A1,Pds2)),Slw)*100;
> SHORT = B > upM AND B1 < dnM;
> BUY = B1 > upM AND B < dnM;
> confShort = Hold (Short, 5) AND B < Ref (B, -1) and (B - B1) > 40;
> confBuy = Hold (Buy, 5) AND B > Ref (B, -1) and (B1 - B) > 40;;
>
> SELL = COVER = 0;
>
> // Do not display confirmed buy/sell meanwhile
> sinceBuy = barssince (confBuy);
> sinceBuy = IIF (IsEmpty (sinceBuy), 100, sinceBuy);
> sinceSell = barssince (SHORT);
> sinceSell = IIF (IsEmpty (sinceSell), 100, sinceSell);
> sinceSignal = IIF (sinceBuy < sinceSell, sinceBuy, -sinceSell);
>
> column11 = sinceSignal;
> column11name = "5&10 Stch";
> column11format = 2.0;
>
> Comments:
> Jean
> douron@h...
> 2003-05-06 20:59:58 Mr. Rasnitsyn,
> Your screener seem to work with the Automatic analysis function
Scan
> but I just obtain the title of each collumn with the function
> Explorer. Do you have operating instruction for this usefull
program.
> And what that mean the abreviation CPR in your listing.
> Thank you

#484 From: "mickeyamelinckx" <mickeyA@...>
Date: Tue Jul 15, 2003 10:48 am
Subject: looking for basic pattern code
mickeyamelinckx
Send Email Send Email
 
Hello,
Iīm wondering if someone found or made already a code to find basic
patterns with or without breakouts and is WILLING TO SHARE it with
me.
Thanks in advance
M

#485 From: "jbell5931" <jbell5931@...>
Date: Tue Jul 15, 2003 2:56 pm
Subject: Re: Mutual Fund Screener
jbell5931
Send Email Send Email
 
Thanks.  I finally got it working by changing S&P 500 index to the
proper Yahoo symbol.

--- In amibroker-ts@yahoogroups.com, "mickeyamelinckx" <mickeyA@b...>
wrote:
> YEs the scan works !!!  If you read the commentaries well in the
> code you will find out how to use it ! Basicaly itīs a scan and
> backtest code.  It also takes a tremendous time to scan all so I
> first run scan as is then look at rankings and adjust then to
reduce
> the list, scan again an these results I save as a list and this
list
> I run backtest on.
>
> were below is a important commentary section of the code.
> Hope this helps.
> M
>
> // Proposed usage:
> // 1) Screen all monitored funds / securities
> // 2) Sort by Weighted ROC, scroll down for a dosen, and replace
> minWeightedROC
> by the smallest acceptable value
> // 3) Sort by CPR, and repeat the same.
> // 4) If you want to put the down limit on 10 day or monthly ROC,
do
> the same
> for these columns
> // 5) Repeat exploration. Only the funds/stocks with ROCs more then
> defined
> values will be in the screen.
> // 6) Check how many days passed since the alst buy/sell signal for
> the
> security. Probably it's not too late to rotate...
> //
>
>
>
> --- In amibroker-ts@yahoogroups.com, "jbell5931" <jbell5931@y...>
> wrote:
> > Hi,
> >  There is a Fund Screener formula in the Amibroker AFL formula
> > Library.  Has anyone gotten it to work properly?  It looks like
> > something I could really use to rank my 401k funds.
> >
> >  For your info, I attached the script below.
> >
> > Joe
> > ================================================================
> >
> > AFL Library
> > List Add formula
> >
> > Details:
> > Formula name: Fund Screener
> > Author/Uploader: Dima Rasnitsyn - rasnitsyn@h...
> > Date/Time added: 2001-10-13 12:58:30
> > Origin:
> > Keywords: funds, stocks, rate of change, rank
> > Level: medium
> > Flags: exploration
> >
> > Download formula file  |  Delete formula
> >
> > Description:
> > Rank mutual funds [or securities] based on their rates of change
> (or
> > smoothed ROCs), and see how much time passed since buy/sell
> signals
> > generated by various systems.
> >
> >
> > Formula:
> > // FundScreaner by Dr. S.N.Berger & D.Rasnitsyn
> > // The Idea of this screaner is to identify the strongest
> securities
> > (by their
> > ROC), and also see how much time passed since the latest buy/sell
> > signal
> > generated by different trading systems for each of them.
> > // The columns contain:
> > // Weighted smoothed ROC (weight coefficients are configurable)
> > // average of Monthly, quartely, semi-anual, and anual ROCs (this
> > score is used
> > by FundX)
> > // 5 day smoothed ROC
> > // 10 day smoothed ROC
> > // 22 day (1 month) smoothed ROC
> > // 9 week (2 month) smoothed ROC
> > // 13 week -"-
> > // 26 week -"-
> > // The next columns show The number of days since the latest buy
> > (positive) or
> > sell (negative) signal generated by particular trading system:
> > // N/D - system based on Jaco MRI, Williams AC+, MACD, and
> Relative
> > slope
> > // Dags [sorry if the name is misspelled] peaker
> > // Stochastics divergence
> > // Any other???
> > //
> > // Proposed usage:
> > // 1) Screen all monitored funds / securities
> > // 2) Sort by Weighted ROC, scroll down for a dosen, and replace
> > minWeightedROC
> > by the smallest acceptable value
> > // 3) Sort by CPR, and repeat the same.
> > // 4) If you want to put the down limit on 10 day or monthly ROC,
> do
> > the same
> > for these columns
> > // 5) Repeat exploration. Only the funds/stocks with ROCs more
> then
> > defined
> > values will be in the screen.
> > // 6) Check how many days passed since the alst buy/sell signal
> for
> > the
> > security. Probably it's not too late to rotate...
> > //
> > //
> > // The following sections defines filter criteria.
> > // Display only funds with ...
> >
> > // Filter date: 10000 * (year - 1900) + 100 * month + day, so
2001-
> 12-
> > 31
> > becomes 1011231 and 1995-12-31 becomes 951231
> > // < 0 means the latest available date; 2001-04-05 - 1010405
> > filterdate = -1;
> >
> > //minRelStrengthSP =-1000; // relative strength over S&P500 >=
> this
> > value
> > min10dayROC =-100;      // Minimum 10 day rate of change < [-1000
> > means better
> > then S&P 500]
> > min22dayROC =-1000;      // Minimum 22 day rate of change < [-
1000
> > means better
> > then S&P 500]
> > min13weekROC = -1000;    // Minimum 13 week rate of change < [-
> 1000
> > means
> > better then S&P 500]
> > min9weekROC = -1000;     // Minimum 9 week rate of change < [-
1000
> > means better
> > then S&P 500]
> > minWeightedROC = -1000;  // Minimum weighted ROC !! FUNDS WITH
> EMPTY
> > WEIGHTED
> > ROC (due to lack of 26 week data) ARE ALWAYS INCLUDED !!
> > minCPR = -1000;          // Minimum CPR !! FUNDS WITH EMPTY
> WEIGHTED
> > ROC (due
> > to lack of 26 week data) ARE ALWAYS INCLUDED !!
> >
> > // Smoothing factor (as EMA) for ROC parameters
> > // SET TO 1 if want to disable smoothing
> > //
> > ROC5DayEMA = 9;
> > ROC10DayEMA =9;
> > ROC22DayEMA = 9;
> > ROC9WeekEMA =9;
> > ROC13WeekEMA =9;
> > ROC26WeekEMA =9;
> >
> > //
> > // WEIGHT coefficients for the weighted ROC calculation
> > //
> > weightROC5DayEMA = 10;
> > weightROC10DayEMA = 15;
> > weightROC22DayEMA = 15;
> > weightROC9WeekEMA = 10;
> > weightROC13WeekEMA = 5;
> > weightROC26WeekEMA = 1;
> >
> > r5  = ema ( close, ROC5DayEMA);
> > r10 = ema ( close, ROC10DayEMA);
> > r22 = ema (close , ROC22DayEMA);
> > r9w = ema (close , ROC9WeekEMA);
> > r13w= ema (close, ROC13WeekEMA);
> > r13w = IIF (isEmpty (r13w), r9w, r13w);
> > r26w= ema (close, ROC26WeekEMA);
> > r26w = IIF (isEmpty (r26w), r13w, r26w);
> > r52w= ema (close, ROC26WeekEMA);
> > r52w = IIF (isEmpty (r52w), r26w, r52w);
> >
> > numcolumns = 12;
> > column2 = ROC5d =  roc (r5 , 5 )  ;
> > column2name = "5 d %";
> > column3 = ROC10d = roc (r10 , 10 ) ;
> > column3name = "10 d %";
> > column4 = ROC22d = roc (r22, 22)  ;
> > column4name = "22 d %";
> > column5 = ROC9w =  roc (r9w, 5*9) ;
> > column5name = "9 w %";
> > column6 = ROC13w = roc (r13w, 5*13);
> > column6name = "13 w %";
> > column7 = ROC26w = roc (r26w, 5*26);
> > column7name = "26 w % ";
> >
> > ROC52w = roc (r52w, 5*52);
> >
> > // Experimental: relation to S&P 500 10 day ROC
> > //column10 = RSSP = ROC10d * 100 / (ema (roc(foreign
> > ("^SPC", "close") , 10 ),
> > ROC10DayEMA));
> > //column10name = "RS S&P %";
> >
> > column0 = weightedROC = (weightROC5DayEMA *ROC5d +
> weightROC10DayEMA
> > *ROC10d +
> > weightROC22DayEMA *ROC22d + weightROC9WeekEMA *ROC9w +
> > weightROC13WeekEMA
> > *ROC13w + weightROC26WeekEMA * ROC26w)/(weightROC5DayEMA +
> > weightROC10DayEMA +
> > weightROC22DayEMA + weightROC9WeekEMA + weightROC13WeekEMA +
> > weightROC26WeekEMA);
> > column0name = "Wght ROC%";
> >
> > column1 = fundXCPR =   (roc (c, 22) + roc (c, 13*5) +  roc (c,
> 26*5)
> > + roc (c,
> > 52*5))  / 4;
> > column1name = "CPR";
> >
> > //
> > // Calculate S&P ROCs for filtering
> > //
> >
> > r5sp   = roc (foreign ("^SPC", "close"), 5 )  ;
> > r10sp  = roc (foreign ("^SPC", "close"), 10 ) ;
> > r22sp  = roc (foreign ("^SPC", "close"), 22)  ;
> > r9wsp  = roc (foreign ("^SPC", "close"), 5*9) ;
> > r13wsp = roc (foreign ("^SPC", "close"), 5*13);
> > r26wsp = roc (foreign ("^SPC", "close"), 5*26);
> > r52wsp = roc (foreign ("^SPC", "close"), 5*52);
> >
> >
> > ROC5dSP  = ema (r5sp  , ROC5DayEMA)  ;
> > ROC10dSP = ema (r10sp , ROC10DayEMA)  ;
> > ROC22dSP = ema (r22sp , ROC22DayEMA)   ;
> > ROC9wSP  = ema (r9wsp , ROC9WeekEMA);
> > ROC13wSP = ema (r13wsp, ROC13WeekEMA);
> > ROC26wSP = ema (r26wsp, ROC26WeekEMA);
> > ROC52wSP = ema (r52wsp, ROC26WeekEMA);
> >
> > min10dayROC  = IIF (min10dayROC  <= -1000, ROC10dSP,
min10dayROC );
> > min22dayROC  = IIF (min22dayROC  <= -1000, ROC22dSP,
min22dayROC );
> > min9weekROC  = IIF (min9weekROC  <= -1000, ROC9wSP ,
min9weekROC );
> > min13weekROC = IIF (min13weekROC <= -1000, ROC13wSP,
min13weekROC);
> > minWeightedROC = IIF (minWeightedROC <= -1000, (weightROC5DayEMA
> > *ROC5dSP +
> > weightROC10DayEMA *ROC10dSP + weightROC22DayEMA *ROC22dSP +
> > weightROC9WeekEMA
> > *ROC9wSP + weightROC13WeekEMA *ROC13wSP + weightROC26WeekEMA *
> > ROC26wSP)/(weightROC5DayEMA + weightROC10DayEMA +
> weightROC22DayEMA +
> > weightROC9WeekEMA + weightROC13WeekEMA + weightROC26WeekEMA),
> > minWeightedROC);
> > minCPR =  IIF (minCPR <= -1000, (r22sp + r13wsp +  r26wsp +
> > r52wsp)  / 4,
> > minCPR);
> >
> > filter = IIF (filterdate <= 0, cum(1) == lastvalue (cum(1)),
> datenum
> > () ==
> > filterdate) AND ROC10d >= min10dayROC AND ROC22d >= min22dayROC
> AND
> > ROC9w >=
> > min9weekROC AND ROC13w >= min13weekROC AND (isEmpty(weightedROC)
> OR
> > weightedROC
> > >= minWeightedROC) AND (isEmpty (fundXCPR) OR fundXCPR >= minCPR);
> >
> > "CPR: " + writeval (fundXCPR) + ", S&P CPR: " + writeval (minCPR);
> >
> > buy = filter;
> > sell = 0;
> > short =cover = 0;
> >
> > // ======== Signals from different systems =====================
> >
> > // 1. Nate/Dima system
> > /*
> >  * combination of Jaco MRI, Williams, and MACD
> >  */
> >
> > // Adjustable criteria
> > moBuyCriteria = 60; // 70?
> > moSellCriteria = 20; // 30?
> > rocPeriod = 10;
> > jacoHold =20; // Hold period
> > exitOnOverbought  = 0;
> >
> >
> >
> >
> > // Jaco MRI
> > /* MRI developed by Jaco Jonker*/
> >
> > mo=close/ref(close,1)*100 - rsi(14);
> > HV = hhv(mo,200);
> > LV = llv(mo,200);
> > AV = (HV+LV)/2;
> >
> >
> > jacoBuy = isTrue (mo > moBuyCriteria);
> > jacoBuy = hold (jacoBuy, jacoHold);
> > jacoSell = isTrue (mo < moSellCriteria);
> > jacoSell = hold (jacoSell, jacoHold);
> >
> > // Williams AC+
> > outsidebar = outside();
> > insidebar = H <= Ref(H,-1) and L >= Ref(L,-1);
> > upbar = H > ref(H,-1) and L >= ref(L, -1);
> > downbar = L < ref(L,-1) and H <= ref(H,-1);
> > barcolor=iif(outsidebar, 1,
> >                iif(downbar,   4,
> >                iif(upbar,        5,
> >                iif(insidebar,6, 0 ) ) ) );
> >
> >
> > var1=ma( A , 34);
> > var2=ma( A,5);
> > var3=var2-var1;
> > var4=var3-ma(var3,5);
> >
> > wilBuy = var4 > 0;
> > wilSell = var4 < 0;
> >
> > //  Graph0=var4;
> > //  graph0style=2+4;
> > //  Graph1=wilders(var4,5);
> > //  Graph1Style=5;
> > //  Graph0Barcolor=Barcolor;
> >
> > // MACD
> > macdBuy = macd() > signal();
> > macdSell = macd() < signal();
> >
> > //  MA (instead of Zig-Zag)
> > mac = ma (c, 10);
> > maBuy = close > mac AND ref (close > mac, -1); // AND mac >= ref
> > (mac, -1);
> > maSell = close < mac;
> >
> > /*Relative Slope*/
> > /*by Dimitris Tsokakis*/
> > K=EMA((H+L+C)/3,10);
> > S1=2*(K-REF(K,-1))/(K+REF(K,-1));
> > RS=100*EMA(S1,3);
> >
> > rocDirBuy = RS > 0; // slope is up
> > rocDirSell = NOT rocDirBuy;
> >
> > //
> > // BUY: Jaco MRI was in buy area recently (i.e. the fund was
> > oversold);
> > currently WIlliams AC+ and MACD are above their reference lines
> > (probably
> > should replace it by more sensitive slope of the oscilator as
> A.Elder
> > recommends); price closes above 10 day MA, and Relative slope is
> > positive
> > buyLine = isTrue (jacoBuy AND wilBuy AND macdBuy AND maBuy AND
> > rocDirBuy);
> > SystemBuy = isTrue (cross (buyLine, 0));
> >
> >
> > // SELL: Jaco MRI was in sell area recently (i.e. the fund was
> > overbought);
> > currently WIlliams AC+ and MACD are below their reference lines
> > (probably
> > should replace it by more sensitive slope of the oscilator as
> A.Elder
> > recommends); price closes below 10 day MA, and Relative slope is
> > negative
> > sellLine = isTrue (jacoSell AND wilSell AND macdSell AND maSell
AND
> > rocDirSell);
> > SystemSell = isTrue (cross (sellLine, 0));
> >
> > sinceBuy = barssince (SystemBuy);
> > sinceBuy = IIF (IsEmpty (sinceBuy), 1000, sinceBuy);
> > sinceSell = barssince (SystemSell);
> > sinceSell = IIF (IsEmpty (sinceSell), 1000, sinceSell);
> > sinceSignal = IIF (sinceBuy < sinceSell, sinceBuy, -sinceSell);
> >
> > column8 = sinceSignal;
> > column8name = "N/D";
> > column8format = 2.1;
> >
> > // ------------------  Peak based signals (based on Dags work)
> ======
> >
> > pv = peak(close, 2);
> >
> > buyPeak = isTrue (cross(close, pv + pv/500));
> > sellPeak = isTrue (cross( pv + pv/1000, close));
> >
> > sinceBuy = barssince (buyPeak);
> > sinceBuy = IIF (IsEmpty (sinceBuy), 100, sinceBuy);
> > sinceSell = barssince (sellPeak);
> > sinceSell = IIF (IsEmpty (sinceSell), 100, sinceSell);
> > sinceSignal = IIF (sinceBuy < sinceSell, sinceBuy, -sinceSell);
> >
> > column9 = sinceSignal;
> > column9name = "Peak";
> > column9format = 2.0;
> >
> > // ============= Stochastics divergence =====================
> > /*Positive Stochastic Divergence for use in
> > Indicator Builder and Automatic Analysis (scan mode),
> > by Dimitris Tsokakis*/
> > ST33=STOCHD(14);
> > TR1=LLVBARS(ST33,4);
> > TR2=IIF(ST33<30 AND TR1>0 AND REF(TR1,-1)==0,ref(ST33,-1),0);
> > TRC=IIF(TR2>0,C,0);
> > vs=valuewhen(tr2, ref(st33,-1), 1);
> > dvs=vs-ref(vs,-1);
> > vc=valuewhen(trc, LLV(c,3), 1);
> > dvc=vc-ref(vc,-1);
> > diver=iif(dvs>0 and dvc<0,30,0);
> > DAS=BARSSINCE(REF(TR2,-1)>0);
> > DD=IIF(DAS<20 AND C>=REF(C,-1),DIVER,0);
> >
> > buyStoch=DD>0 ;
> > sinceBuy = barssince (buyStoch);
> > sinceBuy = IIF (IsEmpty (sinceBuy), 100, sinceBuy);
> >
> > /*Negative Stochastic divergence for use in
> > Indicator Builder and Automatic Analysis (scan mode),
> > by Dimitris Tsokakis*/
> > ST33=stochd(14);
> > TR1=HHVBARS(ST33,4);
> > TR2=IIF(ST33>70 AND TR1>0 AND REF(TR1,-1)==0,ref(ST33,-1),0);
> > TRC=IIF(TR2>0,C,0);
> > vs=valuewhen(tr2, ref(st33,-1), 1);
> > dvs=vs-ref(vs,-1);
> > vc=valuewhen(trc, HHV(H,3), 1);
> > dvc=vc-ref(vc,-1);
> > diver=iif(dvs<0 and dvc>0,90,0);
> > DAS=BARSSINCE(REF(TR2,-1)>0);
> > ddd=IIF(DAS<20 AND C<REF(C,-1),DIVER,0);
> >
> > sellStoch = ddd > 0;
> > sinceSell = barssince (sellStoch);
> > sinceSell = IIF (IsEmpty (sinceSell), 100, sinceSell);
> > sinceSignal = IIF (sinceBuy < sinceSell, sinceBuy, -sinceSell);
> >
> > column10 = sinceSignal;
> > column10name = "Stoch";
> > column10format = 2.0;
> >
> > Slw = optimize("slw",3,1,4,1);
> > Pds1 =optimize("pds",5,1,16,1);
> > Pds2 = optimize("pds",10,1,16,1);
> > upM = optimize ("Up margine", 80, 75, 85, 1);
> > dnM = optimize ("Down margine", 20, 24, 10, 1);
> >
> > A =ema((Close -LLV(Low,Pds1))/(HHV(H,Pds1)-LLV(L,Pds1)),Slw)*100;
> > B=ema((A-LLV(A,pds1))/(HHV(A,Pds1)-LLV(A,Pds1)),Slw)*100;
> >
> > A1 =ema((Close -LLV(Low,Pds2))/(HHV(H,Pds2)-LLV(L,Pds2)),Slw)*100;
> > B1=ema((A1-LLV(A1,pds2))/(HHV(A1,Pds2)-LLV(A1,Pds2)),Slw)*100;
> > SHORT = B > upM AND B1 < dnM;
> > BUY = B1 > upM AND B < dnM;
> > confShort = Hold (Short, 5) AND B < Ref (B, -1) and (B - B1) > 40;
> > confBuy = Hold (Buy, 5) AND B > Ref (B, -1) and (B1 - B) > 40;;
> >
> > SELL = COVER = 0;
> >
> > // Do not display confirmed buy/sell meanwhile
> > sinceBuy = barssince (confBuy);
> > sinceBuy = IIF (IsEmpty (sinceBuy), 100, sinceBuy);
> > sinceSell = barssince (SHORT);
> > sinceSell = IIF (IsEmpty (sinceSell), 100, sinceSell);
> > sinceSignal = IIF (sinceBuy < sinceSell, sinceBuy, -sinceSell);
> >
> > column11 = sinceSignal;
> > column11name = "5&10 Stch";
> > column11format = 2.0;
> >
> > Comments:
> > Jean
> > douron@h...
> > 2003-05-06 20:59:58 Mr. Rasnitsyn,
> > Your screener seem to work with the Automatic analysis function
> Scan
> > but I just obtain the title of each collumn with the function
> > Explorer. Do you have operating instruction for this usefull
> program.
> > And what that mean the abreviation CPR in your listing.
> > Thank you

#486 From: "mickeyamelinckx" <mickeyA@...>
Date: Fri Jul 18, 2003 2:24 am
Subject: need some help to code RS
mickeyamelinckx
Send Email Send Email
 
Did anyone code the RS similar then QRS of quotesplus or RS of IBD
already in AB ?
I use QRS but would like to chart an RS on the different indexes and
sinds Iīm a newby due I had to switch from software I would
appriciate all the help I can get.

Basicly itīs and RS on 240 days where time is divided in 4 part
where the weightings are 40-20-20-20  this is QRS but if you have
some other which is similar to this would be fine to.  So that I can
get some kind of example so I can adjust it myself.
Thanks for helping out !

#487 From: "Anthony Faragasso" <ajf1111@...>
Date: Fri Jul 18, 2003 10:46 am
Subject: Re: need some help to code RS
ajf1111us2000
Send Email Send Email
 
Can you use the following formula...it can be used in AA window and IB window.
 

//Relative Strength comparison %

period = 250;

//insert Base markets

basemkt1="^ndx";//must be enclosed in quotation marks

basemkt2="^gspc";//must be enclosed in quotation marks

BaseMkt=basemkt2;//Select Base market....

x = Foreign(BaseMkt,"C") - Ref(Foreign(BaseMkt,"C"),-period);

x = (x / Ref(Foreign(BaseMkt,"C"),-period)) * 100;

y = C - Ref(C,-period);

y = ( y / Ref(C,-period)) * 100;

rs = y - x;

Color=colorBlue;//line color

Plot(rs ,EncodeColor(colorBlack)+"Relative_Strength of .."+EncodeColor(Color)+Name()+EncodeColor(colorBlack)+".. as compared to "+WriteIf(basemkt==basemkt1,EncodeColor(color)+"^NDX",WriteIf(basemkt==basemkt2,EncodeColor(color)+"^GSPC","")),color,styleLine);

 

Filter=1;

AddColumn(rs,"RS_%",1.2);

----- Original Message -----
Sent: Thursday, July 17, 2003 10:24 PM
Subject: [amibroker-ts] need some help to code RS

Did anyone code the RS similar then QRS of quotesplus or RS of IBD
already in AB ?
I use QRS but would like to chart an RS on the different indexes and
sinds Iīm a newby due I had to switch from software I would
appriciate all the help I can get.

Basicly itīs and RS on 240 days where time is divided in 4 part
where the weightings are 40-20-20-20  this is QRS but if you have
some other which is similar to this would be fine to.  So that I can
get some kind of example so I can adjust it myself.
Thanks for helping out !



To unsubscribe from this group, send an email to:
amibroker-ts-unsubscribe@yahoogroups.com



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.501 / Virus Database: 299 - Release Date: 7/14/2003

#488 From: "mickeyamelinckx" <mickeyA@...>
Date: Fri Jul 18, 2003 12:36 pm
Subject: Re: need some help to code RS
mickeyamelinckx
Send Email Send Email
 
Thanks !  This is a Comparative RS of 250 days right ?  So I still
would have to add this

something like this right

( Current Close / Close from 62 trading days ago ) * .4

+ ( Close from 63 trading days ago / Close from 125 trading days
ago ) * .2

+ ( Close from 126 trading days ago / Close from 188 trading days
ago ) * .2

+ ( Close from 189 trading days ago / Close from 251 trading days
ago ) * .2


And is there a way to RANK this data as RS form IBD or QP ?  Also
what is GSPC I canīt seem to find that index
Thanks

--- In amibroker-ts@yahoogroups.com, "Anthony Faragasso"
<ajf1111@e...> wrote:
> Can you use the following formula...it can be used in AA window
and IB window.
>
> //Relative Strength comparison %
>
> period = 250;
>
> //insert Base markets
>
> basemkt1="^ndx";//must be enclosed in quotation marks
>
> basemkt2="^gspc";//must be enclosed in quotation marks
>
> BaseMkt=basemkt2;//Select Base market....
>
> x = Foreign(BaseMkt,"C") - Ref(Foreign(BaseMkt,"C"),-period);
>
> x = (x / Ref(Foreign(BaseMkt,"C"),-period)) * 100;
>
> y = C - Ref(C,-period);
>
> y = ( y / Ref(C,-period)) * 100;
>
> rs = y - x;
>
> Color=colorBlue;//line color
>
> Plot(rs ,EncodeColor(colorBlack)+"Relative_Strength
of .."+EncodeColor(Color)+Name()+EncodeColor(colorBlack)+".. as
compared to "+WriteIf(basemkt==basemkt1,EncodeColor(color)
+"^NDX",WriteIf(basemkt==basemkt2,EncodeColor(color)
+"^GSPC","")),color,styleLine);
>
>
>
> Filter=1;
>
> AddColumn(rs,"RS_%",1.2);
>
>   ----- Original Message -----
>   From: mickeyamelinckx
>   To: amibroker-ts@yahoogroups.com
>   Sent: Thursday, July 17, 2003 10:24 PM
>   Subject: [amibroker-ts] need some help to code RS
>
>
>   Did anyone code the RS similar then QRS of quotesplus or RS of
IBD
>   already in AB ?
>   I use QRS but would like to chart an RS on the different indexes
and
>   sinds Iīm a newby due I had to switch from software I would
>   appriciate all the help I can get.
>
>   Basicly itīs and RS on 240 days where time is divided in 4 part
>   where the weightings are 40-20-20-20  this is QRS but if you
have
>   some other which is similar to this would be fine to.  So that I
can
>   get some kind of example so I can adjust it myself.
>   Thanks for helping out !
>
>
>         Yahoo! Groups Sponsor
>               ADVERTISEMENT
>
>
>
>
>
>   To unsubscribe from this group, send an email to:
>   amibroker-ts-unsubscribe@yahoogroups.com
>
>
>
>   Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
>
>
>   ---
>   Outgoing mail is certified Virus Free.
>   Checked by AVG anti-virus system (http://www.grisoft.com).
>   Version: 6.0.501 / Virus Database: 299 - Release Date: 7/14/2003

#489 From: "Anthony Faragasso" <ajf1111@...>
Date: Fri Jul 18, 2003 1:13 pm
Subject: Re: Re: need some help to code RS
ajf1111us2000
Send Email Send Email
 
^GSPC is Standard and Poor's  500 index.
 
 
----- Original Message -----
Sent: Friday, July 18, 2003 8:36 AM
Subject: [amibroker-ts] Re: need some help to code RS

Thanks !  This is a Comparative RS of 250 days right ?  So I still
would have to add this

something like this right

( Current Close / Close from 62 trading days ago ) * .4

+ ( Close from 63 trading days ago / Close from 125 trading days
ago ) * .2

+ ( Close from 126 trading days ago / Close from 188 trading days
ago ) * .2

+ ( Close from 189 trading days ago / Close from 251 trading days
ago ) * .2


And is there a way to RANK this data as RS form IBD or QP ?  Also
what is GSPC I canīt seem to find that index
Thanks

--- In amibroker-ts@yahoogroups.com, "Anthony Faragasso"
<ajf1111@e...> wrote:
> Can you use the following formula...it can be used in AA window
and IB window.
>
> //Relative Strength comparison %
>
> period = 250;
>
> //insert Base markets
>
> basemkt1="^ndx";//must be enclosed in quotation marks
>
> basemkt2="^gspc";//must be enclosed in quotation marks
>
> BaseMkt=basemkt2;//Select Base market....
>
> x = Foreign(BaseMkt,"C") - Ref(Foreign(BaseMkt,"C"),-period);
>
> x = (x / Ref(Foreign(BaseMkt,"C"),-period)) * 100;
>
> y = C - Ref(C,-period);
>
> y = ( y / Ref(C,-period)) * 100;
>
> rs = y - x;
>
> Color=colorBlue;//line color
>
> Plot(rs ,EncodeColor(colorBlack)+"Relative_Strength
of .."+EncodeColor(Color)+Name()+EncodeColor(colorBlack)+".. as
compared to "+WriteIf(basemkt==basemkt1,EncodeColor(color)
+"^NDX",WriteIf(basemkt==basemkt2,EncodeColor(color)
+"^GSPC","")),color,styleLine);
>
>
>
> Filter=1;
>
> AddColumn(rs,"RS_%",1.2);
>
>   ----- Original Message -----
>   From: mickeyamelinckx
>   To: amibroker-ts@yahoogroups.com
>   Sent: Thursday, July 17, 2003 10:24 PM
>   Subject: [amibroker-ts] need some help to code RS
>
>
>   Did anyone code the RS similar then QRS of quotesplus or RS of
IBD
>   already in AB ?
>   I use QRS but would like to chart an RS on the different indexes
and
>   sinds Iīm a newby due I had to switch from software I would
>   appriciate all the help I can get.
>
>   Basicly itīs and RS on 240 days where time is divided in 4 part
>   where the weightings are 40-20-20-20  this is QRS but if you
have
>   some other which is similar to this would be fine to.  So that I
can
>   get some kind of example so I can adjust it myself.
>   Thanks for helping out !
>
>
>         Yahoo! Groups Sponsor
>               ADVERTISEMENT
>             
>       
>       
>
>
>   To unsubscribe from this group, send an email to:
>   amibroker-ts-unsubscribe@yahoogroups.com
>
>
>
>   Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
>
>
>   ---
>   Outgoing mail is certified Virus Free.
>   Checked by AVG anti-virus system (http://www.grisoft.com).
>   Version: 6.0.501 / Virus Database: 299 - Release Date: 7/14/2003



To unsubscribe from this group, send an email to:
amibroker-ts-unsubscribe@yahoogroups.com



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.501 / Virus Database: 299 - Release Date: 7/14/2003

#490 From: "Ronald Eaton" <r.e.eaton@...>
Date: Sun Jul 20, 2003 9:34 am
Subject: (No subject)
ronaldeeaton
Send Email Send Email
 
#494 From: "sheldonskidmore" <sheldon@...>
Date: Mon Jul 28, 2003 10:56 pm
Subject: System integration with Dynaorder
sheldonskidmore
Send Email Send Email
 
Hello,

Has anyone successfully integrated their trading system with
Dynaorder or any other broker software?  Any good/bad experiences to
share?  There seems to be very little documentation on the Dynaorder
site to help us out and this is something I would definitely like to
try.

Any help is appreciated.

Thanks,
Sheldon

#495 From: "expertpet" <expertpet@...>
Date: Fri Aug 15, 2003 8:30 am
Subject: equity curve based sytem-- Information wanted
expertpet
Send Email Send Email
 
Hallo,
           I am intrested to buy a standard system avialable in the
market fully based on Equity curve to design the system.  What I mean
is the system design should be fully based on the equity curve
movement of that sytem.  How many systems in the market is avialable
with this concept. What are the Plus and minus points of this concept.

          If any one can guide me, I will be thankfull and willing to
send one system freely which I purchased earliar from the market.

Yours thankfully,
chand

#496 From: "expertpet" <expertpet@...>
Date: Fri Aug 15, 2003 9:34 am
Subject: equity curve based sytem-- Information wanted
expertpet
Send Email Send Email
 
Hallo,
           I am intrested to buy a standard system avialable in the
market fully based on Equity curve to design the system.  What I mean
is the system design should be fully based on the equity curve
movement of that sytem.  How many systems in the market is avialable
with this concept. What are the Plus and minus points of this concept.

          If any one can guide me, I will be thankfull and willing to
send one system freely which I purchased earliar from the market.

Yours thankfully,
chand

#497 From: "dmc777_2000" <dcogburn@...>
Date: Tue Aug 26, 2003 4:26 pm
Subject: Beta Search???
dmc777_2000
Send Email Send Email
 
I am new to Amibroker.  Is it possible to scan for stocks according
to beta?  Thanks.
dmc

#498 From: "Tomasz Janeczko" <amibroker@...>
Date: Tue Aug 26, 2003 6:13 pm
Subject: Re: Beta Search???
amibroker
Send Email Send Email
 
Hello,

Yes but only using Quotes Plus as a data source and
GetExtraData function:
http://www.amibroker.com/guide/afl/afl_view.php?name=GETEXTRADATA

Hope this helps.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: "dmc777_2000" <dcogburn@...>
To: <amibroker-ts@yahoogroups.com>
Sent: Tuesday, August 26, 2003 6:26 PM
Subject: [amibroker-ts] Beta Search???


> I am new to Amibroker.  Is it possible to scan for stocks according
> to beta?  Thanks.
> dmc
>
>
>
>
> To unsubscribe from this group, send an email to:
> amibroker-ts-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>

#499 From: "Herman van den Bergen" <psytek@...>
Date: Mon Sep 1, 2003 10:44 am
Subject: RE: equity curve based sytem-- Information wanted
psytek2
Send Email Send Email
 
Perhaps you are thinking about Equity Feedback, you may do a search in the
AB archives and find many discussions on this topic.

herman

-----Original Message-----
From: expertpet [mailto:expertpet@...]
Sent: Friday, August 15, 2003 4:30 AM
To: amibroker-ts@yahoogroups.com
Subject: [amibroker-ts] equity curve based sytem-- Information wanted


Hallo,
           I am intrested to buy a standard system avialable in the
market fully based on Equity curve to design the system.  What I mean
is the system design should be fully based on the equity curve
movement of that sytem.  How many systems in the market is avialable
with this concept. What are the Plus and minus points of this concept.

          If any one can guide me, I will be thankfull and willing to
send one system freely which I purchased earliar from the market.

Yours thankfully,
chand




To unsubscribe from this group, send an email to:
amibroker-ts-unsubscribe@yahoogroups.com



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

#500 From: "jtelang" <jtelang@...>
Date: Wed Sep 3, 2003 11:29 pm
Subject: Weekly prices in daily analysis...
jtelang
Send Email Send Email
 
I'm hoping someone could point out what I'm doing wrong here. I'm
trying to keep track of weekly OHLC, and grab only the ones when week
ends in my daily analysis. So I wrote following to check how it would
work, and am puzzled at the results. The tracking HHV and LLV of the
week (using Max and Min below) seems to break down exactly 2 bars
from start of the week.

Any ideas?

Thanks.

Jitu

----------------
wopen = O;
whigh = H;
wlow = L;
wclose = C;

dow = DayOfWeek();
wstart = IIf(dow < Ref(dow, -1), True, False);
wend = IIf(dow > Ref(dow, 1), True, False);

wopen = IIf(wstart, O, Ref(wopen, -1));
whigh = IIf(wstart, H, Max(Ref(whigh, -1), H));
wlow = IIf(wstart, L, Min(Ref(wlow, -1), L));
wclose = C;

PlotOHLC(wopen, whigh, wlow, wclose, "Weekly", IIf(wend, colorYellow,
colorBlue), styleBar);

Messages 461 - 500 of 3522   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright Đ 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help