Re: [amibroker] Misunderstanding of Arrays

2010-08-26 Thread Steve Dugas
Hi - REF operates on the entire array like most other AB functions. It 
shifts the array by the number of bars you specify. You can plot a couple of 
different REF's to see it in action.  When you need to use IF with an array, 
use IIF instead -

MARY = IIF( Ref( Lowest_ROC_NUM, 0 ) == 9, 10, 0 );

Also, saying
Ref( Lowest_ROC_NUM, 0 )
shifts the array by zero bars, so it is the same as just using the original 
array...
Lowest_ROC_NUM



- Original Message - 
From: trfy1120 trfy1...@yahoo.com
To: amibroker@yahoogroups.com
Sent: Thursday, August 26, 2010 3:58 PM
Subject: [amibroker] Misunderstanding of Arrays


I have an array called lowest_roc_num.

 If I use the test:

 JOHN = Ref(Lowest_ROC_NUM,0)==9;

 JOHN gets the value of zero or 1 appropriately.

 If I use the syntax:

if (Ref(Lowest_ROC_NUM,0) == 9)
 MARY=10;

 I get an error message saying that the condition in an IF, WHILE or FOR 
 statement must be numeric or boolean, you cannot use an array here.  It 
 then says to use [] to refer to an element of the array.

 I have two problems.  First, I thought REF was referring to an element of 
 the array rather than the whole array and, second, I don't know how to 
 refer to the current bar using [].

 Thanks for any help.

 TRFY



 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links



 




Re: [amibroker] buy/sell rules for different market regimes

2010-06-24 Thread Steve Dugas
Hi - Try this way

Buy = IIF( C  MA( C, 200 ), BullBuyCond, BearBuyCond );
Similar for sell, short, cover.


- Original Message - 
From: Paolo pcavat...@gmail.com
To: amibroker@yahoogroups.com
Sent: Thursday, June 24, 2010 2:07 PM
Subject: [amibroker] buy/sell rules for different market regimes


 I'm missing how to code a very simple idea...basically I need to have 
 different buy/sell rules according to different market regimes (for 
 instance Bull and Bear markets).

 I tried somethink like the below code but it doesn't work since if/else 
 statements require array subscript and therefore for cycle which I'd like 
 to avoid.

 if ( C  MA(C, 200) ) //Bull Market
 {
 Buy = ...myBullBuyCond;
 Sell = ...myBullSellCond;
 Short = ...myBullShortCond;
 Cover = ...myBullCoverCond;
 }
 else //Bear Market
 {
 Buy = ...myBearBuyCond;
 Sell = ...myBearSellCond;
 Short = ...myBearShortCond;
 Cover = ...myBearCoverCond;
 }


 Any hints is appreciated,

 Paolo



 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links



 




Re: [amibroker] Re: buy/sell rules for different market regimes

2010-06-24 Thread Steve Dugas
You could stack them one inside another...

Buy = IIF( BullMkt AND LowVol , LVBullBuyCond,
   IIF( BullMkt AND HighVol, HVBullBuyCond,
IIF( BearMkt AND LowVol, LVBearBuyCond, HVBearBuyCond )));


- Original Message - 
From: Paolo pcavat...@gmail.com
To: amibroker@yahoogroups.com
Sent: Thursday, June 24, 2010 2:32 PM
Subject: [amibroker] Re: buy/sell rules for different market regimes


 Unfortunately I had already tried that but it doesn't work if market 
 regimes are more than 2 (for instance bull low vol, bull high vol, bear 
 high vol and bear low vol).

 Thanks for your suggestion anyway,

 Paolo

 --- In amibroker@yahoogroups.com, Steve Dugas sjdu...@... wrote:

 Hi - Try this way

 Buy = IIF( C  MA( C, 200 ), BullBuyCond, BearBuyCond );
 Similar for sell, short, cover.


 - Original Message - 
 From: Paolo pcavat...@...
 To: amibroker@yahoogroups.com
 Sent: Thursday, June 24, 2010 2:07 PM
 Subject: [amibroker] buy/sell rules for different market regimes


  I'm missing how to code a very simple idea...basically I need to have
  different buy/sell rules according to different market regimes (for
  instance Bull and Bear markets).
 
  I tried somethink like the below code but it doesn't work since if/else
  statements require array subscript and therefore for cycle which I'd 
  like
  to avoid.
 
  if ( C  MA(C, 200) ) //Bull Market
  {
  Buy = ...myBullBuyCond;
  Sell = ...myBullSellCond;
  Short = ...myBullShortCond;
  Cover = ...myBullCoverCond;
  }
  else //Bear Market
  {
  Buy = ...myBearBuyCond;
  Sell = ...myBearSellCond;
  Short = ...myBearShortCond;
  Cover = ...myBearCoverCond;
  }
 
 
  Any hints is appreciated,
 
  Paolo
 
 
 
  
 
   IMPORTANT PLEASE READ 
  This group is for the discussion between users only.
  This is *NOT* technical support channel.
 
  TO GET TECHNICAL SUPPORT send an e-mail directly to
  SUPPORT {at} amibroker.com
 
  TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
  http://www.amibroker.com/feedback/
  (submissions sent via other channels won't be considered)
 
  For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
  http://www.amibroker.com/devlog/
 
  Yahoo! Groups Links
 
 
 
 





 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links



 




Re: [amibroker] Re: buy/sell rules for different market regimes

2010-06-24 Thread Steve Dugas
Mike beat me to it...he must live closer to the server...   8 - )


- Original Message - 
From: Steve Dugas sjdu...@comcast.net
To: amibroker@yahoogroups.com
Sent: Thursday, June 24, 2010 2:49 PM
Subject: Re: [amibroker] Re: buy/sell rules for different market regimes


 You could stack them one inside another...

 Buy = IIF( BullMkt AND LowVol , LVBullBuyCond,
   IIF( BullMkt AND HighVol, HVBullBuyCond,
IIF( BearMkt AND LowVol, LVBearBuyCond, HVBearBuyCond )));


 - Original Message - 
 From: Paolo pcavat...@gmail.com
 To: amibroker@yahoogroups.com
 Sent: Thursday, June 24, 2010 2:32 PM
 Subject: [amibroker] Re: buy/sell rules for different market regimes


 Unfortunately I had already tried that but it doesn't work if market
 regimes are more than 2 (for instance bull low vol, bull high vol, bear
 high vol and bear low vol).

 Thanks for your suggestion anyway,

 Paolo

 --- In amibroker@yahoogroups.com, Steve Dugas sjdu...@... wrote:

 Hi - Try this way

 Buy = IIF( C  MA( C, 200 ), BullBuyCond, BearBuyCond );
 Similar for sell, short, cover.


 - Original Message - 
 From: Paolo pcavat...@...
 To: amibroker@yahoogroups.com
 Sent: Thursday, June 24, 2010 2:07 PM
 Subject: [amibroker] buy/sell rules for different market regimes


  I'm missing how to code a very simple idea...basically I need to have
  different buy/sell rules according to different market regimes (for
  instance Bull and Bear markets).
 
  I tried somethink like the below code but it doesn't work since 
  if/else
  statements require array subscript and therefore for cycle which I'd
  like
  to avoid.
 
  if ( C  MA(C, 200) ) //Bull Market
  {
  Buy = ...myBullBuyCond;
  Sell = ...myBullSellCond;
  Short = ...myBullShortCond;
  Cover = ...myBullCoverCond;
  }
  else //Bear Market
  {
  Buy = ...myBearBuyCond;
  Sell = ...myBearSellCond;
  Short = ...myBearShortCond;
  Cover = ...myBearCoverCond;
  }
 
 
  Any hints is appreciated,
 
  Paolo
 
 
 
  
 
   IMPORTANT PLEASE READ 
  This group is for the discussion between users only.
  This is *NOT* technical support channel.
 
  TO GET TECHNICAL SUPPORT send an e-mail directly to
  SUPPORT {at} amibroker.com
 
  TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
  http://www.amibroker.com/feedback/
  (submissions sent via other channels won't be considered)
 
  For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
  http://www.amibroker.com/devlog/
 
  Yahoo! Groups Links
 
 
 
 





 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links








 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links



 




Re: [amibroker] Help with a Plot(AFL containing IIF AFL's

2010-06-19 Thread Steve Dugas
Hi Ron - Unless something has changed, the Style arg won't take an array, i.e. 
style must be the same for all bars.  I think a workaround like this using 
multiple plot statments would probably work...

Plot( IIF( tXa, yFe50, NULL ), a, colorRed, styleDots );
Plot( IIF( aXt, yFe50, NULL ), a, colorWhite, styleDots );
...

  - Original Message - 
  From: ronald davis 
  To: amibroker@yahoogroups.com 
  Sent: Saturday, June 19, 2010 7:57 PM
  Subject: [amibroker] Help with a Plot(AFL containing IIF AFL's




  Above the dotted line, I have pasted an AFL Plot  that works great. 
  The aqua plot color changes color correctly when a cross occurs.
   
  Below the dotted line is an AFL Plot that I would like to have, but it will 
not work. 
   
  I would  be appreciate it  if a code guru would change this plot statement so 
that it still 
   
  changes color, but also changes the style from line to dots.  Ron D
   
  tXa=Cross(t,a);aXt=Cross(a,t);
   
  Plot(yFe50,a,IIf(tXa,colorRed,IIf(aXt,colorRed,colorAqua)),styleThick);
  

  
Plot(yFe50,a,IIf(tXa,colorRed|styleDots,IIf(aXt,colorWhite|styleDots,colorAqua)),styleThick);
 


  

Re: [amibroker] Help with a Plot(AFL containing IIF AFL's

2010-06-19 Thread Steve Dugas
oops!  2nd line should say styleLine...forgot to change it when I copied/pasted 
the 1st line...

  - Original Message - 
  From: Steve Dugas 
  To: amibroker@yahoogroups.com 
  Sent: Saturday, June 19, 2010 9:49 PM
  Subject: Re: [amibroker] Help with a Plot(AFL containing IIF AFL's





  Hi Ron - Unless something has changed, the Style arg won't take an array, 
i.e. style must be the same for all bars.  I think a workaround like this using 
multiple plot statments would probably work...

  Plot( IIF( tXa, yFe50, NULL ), a, colorRed, styleDots );
  Plot( IIF( aXt, yFe50, NULL ), a, colorWhite, styleDots );
  ...

- Original Message - 
From: ronald davis 
To: amibroker@yahoogroups.com 
Sent: Saturday, June 19, 2010 7:57 PM
Subject: [amibroker] Help with a Plot(AFL containing IIF AFL's


Above the dotted line, I have pasted an AFL Plot  that works great. 
The aqua plot color changes color correctly when a cross occurs.
 
Below the dotted line is an AFL Plot that I would like to have, but it will 
not work. 
 
I would  be appreciate it  if a code guru would change this plot statement 
so that it still 
 
changes color, but also changes the style from line to dots.  Ron D
 
tXa=Cross(t,a);aXt=Cross(a,t);
 
Plot(yFe50,a,IIf(tXa,colorRed,IIf(aXt,colorRed,colorAqua)),styleThick);



Plot(yFe50,a,IIf(tXa,colorRed|styleDots,IIf(aXt,colorWhite|styleDots,colorAqua)),styleThick);
 



  

Re: [amibroker] How Do You Handle Plotting Huge Max/Min Values In An Indicator?

2010-06-11 Thread Steve Dugas
Hi - How about something like this...

RelPct = YourCalc;
RelPct = Max( Min( RelPct, 50 ), -50 );


- Original Message - 
From: jorgen_wallgren jorgen.wallg...@gmail.com
To: amibroker@yahoogroups.com
Sent: Friday, June 11, 2010 10:59 PM
Subject: [amibroker] How Do You Handle Plotting Huge Max/Min Values In An 
Indicator?


 Hi there!


 I have a problem I am hoping someone on the list can help me to solve. I 
 have an Indicator (in it's own pane) which gives me a relative percentage 
 value. At the market opening, this value can sometimes be very big or very 
 small- for example oscillate between +245% and -450%. So at the opening I 
 can clearly see in which direction the indicator goes and everything is 
 great.

 But after a while when things cool down, the relative percentage value 
 will go down and it can then oscillate between for example between -20% 
 and +30% for the remaining time of the trading day.

 Due to the huge difference between these values during the day and the 
 opening values, all I now can see  is a plot of the opening values and the 
 lower values are now just a thin line. Sure- I could of course just zoom 
 in so the initial plotting of the huge values disappear from screen. But 
 then I loose bar resolution and I want to display a full trading day.

 So I was thinking that this can probably be solved by some code which cut 
 off the abnormal opening values, once the Relative Percentage comes 
 closer to the normal values- so I can clearly see the graph.

 But I have not yet been able to figure out a good way to handle this 
 automatically via code?

 Any suggestions? Anyone have solved this?

 Thanks and Regards,

 Jorgen



 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links



 




Re: [amibroker] Wow what a plunge !

2010-05-06 Thread Steve Dugas
That was me, I decided to sell off a few holdings...   8 - )
Sorry about that !!  8 - )

Seriously, perhaps program trading kicking off more program trading?


  - Original Message - 
  From: Fred Tonetti 
  To: amibroker@yahoogroups.com 
  Sent: Thursday, May 06, 2010 3:16 PM
  Subject: RE: [amibroker] Wow what a plunge !





  The reality of not being able to get blood from a stone starts to be 
understood.

   


--

  From: amibroker@yahoogroups.com [mailto:amibro...@yahoogroups.com] On Behalf 
Of Tomasz Janeczko
  Sent: Thursday, May 06, 2010 3:12 PM
  To: amibroker@yahoogroups.com
  Subject: [amibroker] Wow what a plunge !

   



  Hello,

  Wow what a plunge ! Did some quant algorithms gone wild again ?

  Best regards,
  Tomasz Janeczko
  amibroker.com




  

Re: [amibroker] AB 5.29, Windows 7 (64bit) and i7

2010-03-14 Thread Steve Dugas
Hi - I am guessing that your computer is multi-core?  AB is not written for 
multi-threaded optimization - I have a quad-core, 1 instance of AB uses 25% 
of total CPU power so I run 4 instances side-by-side when optimizing to keep 
the CPU maxed out.  I don't think I have heard of a 6-core machine but 16% 
CPU usage sounds like maybe 6 cores?  Anyway, you can run multiple 
instances, OR you should also check out Fred's MCO program in the files 
section which he wrote for maximizing use of multiple cores and even 
multiple computers.

Steve

- Original Message - 
From: liveyourdream4ever frankhass...@yahoo.de
To: amibroker@yahoogroups.com
Sent: Saturday, March 13, 2010 5:27 AM
Subject: [amibroker] AB 5.29, Windows 7 (64bit) and i7


 Hello,

 i'm running AB 5.29 on W7(64bit) with a i7 CPU. When using the optimizer 
 the i7 CPU isn't really busy, only up to 16%.

 Has anyone experience with such an environment?
 What can i expect in terms of CPU load factor?

 Thanks for your response.



 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links



 




Re: [amibroker] Could someone comment on how this loop is executed (Basic)

2010-02-16 Thread Steve Dugas
Hi - untested but you can try something like this...

emaCross = Cross( EMA1, EMA2 );
cumCross = Cum( emaCross );
thirdCross = emaCross AND ( cumCross % 3 == 0 );

Steve

- Original Message - 
From: m.kuschel31 m.kusche...@yahoo.com
To: amibroker@yahoogroups.com
Sent: Friday, February 12, 2010 1:13 PM
Subject: [amibroker] Could someone comment on how this loop is executed 
(Basic)


 Hi,

 I'm used to programming C during my years in university, but it's been a 
 while and by all means, I'm not an expert. I've been seriously working on 
 this for a couple of days and I cannot get a grip on it. I went through 
 the tutorials, references, etc.

 What I am trying to accomplish is rather simple:

 Count the number of EMA crossovers (upcross in this case), create an array 
 that's 1 at multiples of 3 corssovers(so to say after each 3rd crossover 
 array=1), otherwise the array is 0.

 Well, it goes like this:

 EMA1=EMA(C,10);
 EMA2=EMA(C,200);
 Plot(EMA1,EMA10, colorRed,styleLine);
 Plot(EMA2,EMA20,colorBlue,styleLine);

 Buycross[0]=0;
 exit[0]=0;

 threshold=3;
 multiplier=1;

 Buycross= Cross(EMA1,EMA2);
 Counter=Cum(Buycross); //== Here the crossover are counted with CUM

 // start loop
 for(i=0; iBarCount;i++)
 {
 if (Counter[i]==threshold*multiplier)
 {
 multiplier++ AND exit[i]=1; // AND-statement?!?!
 }
 }

 printf(buycross:\n);
 WriteVal(Buycross,1);
 printf(counter:\n);
 WriteVal(Counter,1);
 printf(multiplier:\n);
 WriteVal(multiplier,1);
 printf(exit:\n);
 WriteVal(exit,1);

 Counter here is an array, as opposed to the 2nd example. Looks strange, 
 but works.


 Fine you might say, he did his job, so what's he asking for?

 I only achieved this by some means of trial and error and I don't 
 understand, why I have to add AND in the loop.So to say, I don't 
 understand what I did. Ok, check this:

 EMA1=EMA(C,10);
 EMA2=EMA(C,200);
 Plot(EMA1,EMA10, colorRed,styleLine);
 Plot(EMA2,EMA20,colorBlue,styleLine);

 Buycross[0]=0;
 exit[0]=0;
 COUNTER=0;// Integer, variable
 threshold=3;
 multiplier=1;

 Buycross= Cross(EMA1,EMA2);


 // start loop
 for(i=0; iBarCount;i++)
 {
if (buycross[i]==0)
{
   counter++;//=== simple increment
}
 if (Counter==threshold*multiplier)
 {
multiplier++;  //=== The two statements without AND
   exit[i]=1; //=== don't seem to work
 }
 }

 printf(buycross:\n);
 WriteVal(Buycross,1);
 printf(counter:\n);
 WriteVal(Counter,1);
 printf(multiplier:\n);
 WriteVal(multiplier,1);
 printf(exit:\n);
 WriteVal(exit,1);

 Eventhough my varible counter is initialized, the loop would simply not 
 do the increment. Like this, I cannot loop the process of crossover 
 counting. counter goes from 2 to 5, sometimes it's doing nothing or even 
 DEcreases. BTW, I'm checking every value of my OHLCV array from the 
 interpretation window.
 Also, the 2 statements would not be executed properly without the AND. I 
 finally accomplished my task in the first code but I do not understand how 
 AFL treats the variables / arrays in a loop. I believe I am not the first 
 one to experience this problem and I would appreciate any kind of help or 
 explanation. I just know that the 2nd code in C would rather work.

 I considered varget, global varibale, but the problem didn't seem to get 
 resolved. What am I missing? Where should I look to read up on this?


 Thanks,

 Matthias



 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links



 




Re: [amibroker] Re: Projecting prices

2010-02-12 Thread Steve Dugas
Hi - AB allows you to define BuyPrice, SellPrice, etc.  So if you have your 
signals defined as price crossing BB, couldn't you just say

BuyPrice = BBandTop() or whatever?

Steve

- Original Message - 
From: mbausys mbau...@gmail.com
To: amibroker@yahoogroups.com
Sent: Friday, February 12, 2010 7:13 AM
Subject: [amibroker] Re: Projecting prices


 Steve,

 What I want to do with this code is for it to allow me enter a trade 
 exactly at the price which triggers a signal. In particular, I use 
 Bollinger Bands and want trades to be executed at the price at which it 
 equals Bollinger Bands. The price might then reverse and in EOD chart the 
 closing price would be inside Bollinger Bands. However, I would know that 
 the signal would have been generated intraday and I could have entered a 
 position. I'm not proficient with Amibroker coding yet so the required 
 twist might be very simple. Thank you for your help.


 Marius

 --- In amibroker@yahoogroups.com, Steve Dugas sjdu...@... wrote:



 Hi - What did you have in mind?  Fred can correct me if I'm wrong, but I
 always imagined it was written for someone who wanted to trade at the 
 close
 but only gets EOD data. By the time you do the nightly data download and 
 see
 a new signal, the markets are closed and you can only trade NDO. With 
 this
 code you can predict the price needed to trigger a signal, then put on 
 CNBC
 or QuoteTracker to see if your price point has been met and trade just 
 prior
 to today's close. For backtests, just set trade price to close and trade
 delay to zero, you should only need to predict the price for real-time
 trading.

 Steve

 - Original Message - 
 From: mbausys mbau...@...
 To: amibroker@yahoogroups.com
 Sent: Thursday, February 11, 2010 4:10 PM
 Subject: [amibroker] Re: Projecting prices


 
 
  Thanks a lot for posting this. I'd like to ask how it would be possible 
  to
  use this process in a backtest procedure as it only determines a 
  required
  price for tomorrow. Please correct me if I'm wrong.
 
 
  Regards,
 
  Marius
 
 
  --- In amibroker@yahoogroups.com, Ara Kaloustian ara1@ wrote:
 
  Thanks Steve
 
  A
- Original Message - 
From: Steve Dugas
To: amibroker@yahoogroups.com
Sent: Monday, April 10, 2006 10:53 AM
Subject: Re: [amibroker] Projecting prices
 
 
Hi Ara,
 
Your question rang a bell with me, so I searched my saved e-mails 
  and
  found this code that Fred was kind enough to post a couple of years 
  ago.
  Maybe it will be helpful for you?
 
Steve
 
// ***
//
// An all purpose routine to find the price
// necessary to move an indicator to a GOAL.
//
// This should work for virtually any indicator,
// built in or otherwise.  It's demonstrated
// here using RSI  BBand's ...
//
// Note: It will appear to use future quotes
// because of the down shifting of the
// price array, but obviously it can't
// know tomorrows price.  There's
// probably a way to rectify this but
// I was more concerned with the rest
// of the process.
//
// The maximum iterations have arbitrarily been
// set to 200 which is undoubtedly overkill
// as I've yet to see anything take 200 even
// when tolerance was set to 0 on datastreams
// with very high prices.
//
// For real usage the saving of i in j and the
// accuracy calculation can be tossed as they
// were only put in for demonstration purposes
//
// ***
//
// This Routine requires the following things
//
// P0 = A price array or synthetic
//
// Goal = The goal value of the indicator
//
// Acc = An accuracy level for the calculations
//
//   Set this to the order of magnitude
//   that you want.  For example if you want
//   accuracy in calculated price to within
//   0.01 then set it 0.01.  It can even
//   be set to 0 which will force AB to
//   calculate until it can't find any
//   further improvements (Usually between
//   150-170 iterations) but this is semi
//   useless as improvements relative to
//   price granularity have long since
//   been gone by.
//
//   The lower you set it the longer it
//   will take but it's pretty quick
//   (Usually between 15-30 iterations)
//   unless you set it at 0.
//
// ***
//
// Note: Some goals are virtually unattainable on
// the next bar, especially on the downside
// as they would require a negative price
// which is what this routine will show if
// that is what is required.
//
// ***
 
P0   = C;
 
Acc  = 0.0001;
 
LVBI = LastValue(BarIndex());
Mult = 1;
 
// ***
// Shift

Re: [amibroker] ZigZag-Indicator

2010-02-12 Thread Steve Dugas
Hi - I have seen several user-coded versions of the Zig over the years, I 
think there is one or two in the library and probably a couple in previous 
posts, you might get lucky with those or at least they could give you some 
starting code to tweak.

Steve

- Original Message - 
From: Daphne Renault daphne.rena...@yahoo.com
To: amibroker@yahoogroups.com
Cc: Tomasz Janeczko gro...@amibroker.com
Sent: Friday, February 12, 2010 7:08 AM
Subject: [amibroker] ZigZag-Indicator


 Hi,

 is there a possibility to use the ZigZag-Indicator without a fixed 
 percentage? I think a fixed percentage is nice if volatility is constant. 
 But if volatility changes than 5% in a high volatility regime is by far a 
 less severe price change than in a low volatility regime.

 A ZigZag-Indicator that accounts for this - e.g. instead of a fixed 
 percentage parameter, a fixed standard deviation (of returns) parameter 
 and a fixed time period to calculate the rolling standard deviation (of 
 returns) - would be very nice.

 Does anybody know, how to setup such a modified version of the indicator 
 in amibroker?

 Best wishes,

 Daphne








 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links



 




Re: [amibroker] Re: Projecting prices

2010-02-11 Thread Steve Dugas
Hi - What did you have in mind?  Fred can correct me if I'm wrong, but I 
always imagined it was written for someone who wanted to trade at the close 
but only gets EOD data. By the time you do the nightly data download and see 
a new signal, the markets are closed and you can only trade NDO. With this 
code you can predict the price needed to trigger a signal, then put on CNBC 
or QuoteTracker to see if your price point has been met and trade just prior 
to today's close. For backtests, just set trade price to close and trade 
delay to zero, you should only need to predict the price for real-time 
trading.

Steve

- Original Message - 
From: mbausys mbau...@gmail.com
To: amibroker@yahoogroups.com
Sent: Thursday, February 11, 2010 4:10 PM
Subject: [amibroker] Re: Projecting prices




 Thanks a lot for posting this. I'd like to ask how it would be possible to 
 use this process in a backtest procedure as it only determines a required 
 price for tomorrow. Please correct me if I'm wrong.


 Regards,

 Marius


 --- In amibroker@yahoogroups.com, Ara Kaloustian a...@... wrote:

 Thanks Steve

 A
   - Original Message - 
   From: Steve Dugas
   To: amibroker@yahoogroups.com
   Sent: Monday, April 10, 2006 10:53 AM
   Subject: Re: [amibroker] Projecting prices


   Hi Ara,

   Your question rang a bell with me, so I searched my saved e-mails and 
 found this code that Fred was kind enough to post a couple of years ago. 
 Maybe it will be helpful for you?

   Steve

   // ***
   //
   // An all purpose routine to find the price
   // necessary to move an indicator to a GOAL.
   //
   // This should work for virtually any indicator,
   // built in or otherwise.  It's demonstrated
   // here using RSI  BBand's ...
   //
   // Note: It will appear to use future quotes
   // because of the down shifting of the
   // price array, but obviously it can't
   // know tomorrows price.  There's
   // probably a way to rectify this but
   // I was more concerned with the rest
   // of the process.
   //
   // The maximum iterations have arbitrarily been
   // set to 200 which is undoubtedly overkill
   // as I've yet to see anything take 200 even
   // when tolerance was set to 0 on datastreams
   // with very high prices.
   //
   // For real usage the saving of i in j and the
   // accuracy calculation can be tossed as they
   // were only put in for demonstration purposes
   //
   // ***
   //
   // This Routine requires the following things
   //
   // P0 = A price array or synthetic
   //
   // Goal = The goal value of the indicator
   //
   // Acc = An accuracy level for the calculations
   //
   //   Set this to the order of magnitude
   //   that you want.  For example if you want
   //   accuracy in calculated price to within
   //   0.01 then set it 0.01.  It can even
   //   be set to 0 which will force AB to
   //   calculate until it can't find any
   //   further improvements (Usually between
   //   150-170 iterations) but this is semi
   //   useless as improvements relative to
   //   price granularity have long since
   //   been gone by.
   //
   //   The lower you set it the longer it
   //   will take but it's pretty quick
   //   (Usually between 15-30 iterations)
   //   unless you set it at 0.
   //
   // ***
   //
   // Note: Some goals are virtually unattainable on
   // the next bar, especially on the downside
   // as they would require a negative price
   // which is what this routine will show if
   // that is what is required.
   //
   // ***

   P0   = C;

   Acc  = 0.0001;

   LVBI = LastValue(BarIndex());
   Mult = 1;

   // ***
   // Shift Price up by n orders of magnitude to make
   // it = 1.  This is useful to increase
   // accuracy on very low priced datastreams
   // such as the JY.
   // ***
   for (i = 0; i  10; i++)
   {
   if (P0[LVBI] = 1)
   i = 99;
   else
   Mult = Mult * 10;
   }
   // ***

   P1   = Ref(P0, 1) * Mult;
   UpDn = 100 * P1[LVBI];

   for (i = 0; i  200; i++)
   {

   // An example for finding price associated with the next bars
   BBandTop
   //
   //
   **
   ***
   // Put whatever indicator you want to goal seek here based on P1
   //
   **
   ***
   Calc = P1;
   //
   **
   ***
   // Put whatever you want for the goal here ...
   //
   // The reason for putting it in the loop is because sometimes
   the goal is price
   // oriented and will need to be recalculated on each
   iteration

Re: [amibroker] Help with Parameter error

2010-02-08 Thread Steve Dugas
Remove the words default=.  It is just there for informational purposes.


- Original Message - 
From: benjamin.bolsa benjamin.bo...@yahoo.com
To: amibroker@yahoogroups.com
Sent: Monday, February 08, 2010 8:15 AM
Subject: [amibroker] Help with Parameter error


I have one AFL Formula but give me error with this line:
 
 Cziparam = Param(CZI angle parameter,default=5,0,360);
 
 Why ? Who cen help me ?
 
 Thanks
 
 
 
 
 
  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.
 
 TO GET TECHNICAL SUPPORT send an e-mail directly to 
 SUPPORT {at} amibroker.com
 
 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)
 
 For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
 http://www.amibroker.com/devlog/
 
 Yahoo! Groups Links
 
 
 




Re: [amibroker] Problem removing OptimizerSetEngine(cmae);

2010-01-31 Thread Steve Dugas
Hi - Exhaustive optimizer can crash if the opt has too many steps and it 
eventually runs out of memory.  Does the crash happen well into the opt?

Steve

  - Original Message - 
  From: James 
  To: amibroker@yahoogroups.com 
  Sent: Sunday, January 31, 2010 6:26 PM
  Subject: [amibroker] Problem removing OptimizerSetEngine(cmae);





  Has anyone else had a problem removing this line from their code:



  OptimizerSetEngine(cmae); 



  and then trying to run an exhaustive optimization? Every file of code I 
remove this from, I then can an exception error crash when I try to optimize. I 
am running XP pro and version 5.29.6.



  James





  

Re: [amibroker] What are static variables used for?

2010-01-30 Thread Steve Dugas
Hi -I think the big thing with static vars is that they can be shared, i.e. 
you can create a var in one chart and save it with StaticVarSet(), then you 
can access it from other charts or from AA with a call to StaticVarGet().

Steve

- Original Message - 
From: Pmxgs pm...@vizzavi.pt
To: amibroker@yahoogroups.com
Sent: Saturday, January 30, 2010 9:45 AM
Subject: [amibroker] What are static variables used for?


 Hello,

  can someone please explain me what ate static variables used for?

  In the help section it says that a static varable keeps its value in 
 memory until the end of the program.
 What's the difference between this and assigning a value to a normal 
 variable (which also doesn't change unless we assign another value to it). 
 For example: var=3; keeps this variable equal to 3 until we assign another 
 value to it.

  I know I'm missing something obvious, but I'm learning how to program and 
 I can't understand this concept.

 thanks





 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links



 




Re: [amibroker] PremiumData Question

2010-01-14 Thread Steve Dugas
Hi Richard - Your upcoming plugin sounds great, just wondering if it will be 
64-bit?  With 64-bit computers and OS's increasingly becoming the norm and 
64-bit AmiBroker waiting in the wings, it would be real nice if just one 
maintenance-free data provider could provide a 64-bit API/plugin and remove the 
3GB bottleneck for us.  And perhaps get a bunch of new customers...Thank you 
Sir!

Steve


- Original Message - 
  From: Richard Dale 
  To: amibroker@yahoogroups.com 
  Cc: patsgreatdeals 
  Sent: Sunday, January 10, 2010 5:00 AM
  Subject: Re: [amibroker] PremiumData Question




  I'll try and explain how this works.  It's all a bit complicated.

  There's three databases at work:
  1.  Premium Data's MetaStock format database
  2.  AmiBroker's native price database
  3.  AmiBroker's security details database

  There are two settings available:
  Use Local Data Storage - either Enabled or Disabled
  Data Source - either MetaStock Plug-in or Local Database.

  The default setting is when you set Use Local data storage to false and 
Data source: MetaStock Plugin.  This uses databases 1 and 3.  Database 1 is 
updated using the Premium Data program.  Database 3 is maintained using the 
Tools-US-PremiumData command.  Normally Database 2 isn't used, except for 
composite symbols you might create.

  Why would we want to change this?

  Some people have commented that accessing AmiBroker's native price database 
is quicker for large backtests.  So how do we copy data from database1 into 
database 2?  Set Local data storage to Enable and Data source - MetaStock 
Plugin, then any time you access a security in database 1, a COPY of the data 
is placed into database 2.  Some people run a scan across all data to popuulate 
this (eg. with an entry condition that is always true).

  How do we then use that copied data? Set Local data storage to Enabled and 
Data source to Local Database.  Note that any updates to database 1 will no 
longer be reflected in database 2.

  Now, should there be any maintenance required, you should either change back 
to the default setting or to the second setting.  Ensure you run 
Tools-US-PremiumData in this mode too.

  If you decide that maintaining a duplicate of the price data in Amibroker's 
natvie price database is too cumbersome, then return the settings to default as 
described above.Then shut down AmiBroker.  Make a backup of the entire 
C:\Program files\Amibroker\US-PremiumData folder.  Delete the A-Z folders 
inside the folder C:\Program Files\AmiBroker\US-PremiumData folder.  Start 
AmiBroker.  Click Tools-US-PremiumData.

  What we are doing to improve this
  We are developing a native plugin to AmiBroker and also getting rid of the 
MetaStock file format.  This should provide significant performance increases 
(so there is no need to utilise a native price database), automatically the 
database on-the-fly as code/symbol changes occur (i.e. no need to run 
Tools-US-PremiumData) plus also give us extra flexibility to offer new features 
(such as historical index constituents - eg. you will be able to specify in 
your entry conditions during backtesting SP 500 constituent = true and this 
will use the historical set of SP500 constituents on each relevant day to 
determine whether the entry condition is true.  This is the ultimate 
survivorship-bias-free form of testing.  



Best regards,
Richard Dale.
Norgate Investor Services
- Premium quality Stock, Futures and Foreign Exchange Data for
  markets in Australia, Asia, Canada, Europe, UK  USA -
www.premiumdata.net

   Original Message  
  Subject: [amibroker] PremiumData Question
  From: patsgreatdeals patsgreatde...@yahoo.com
  To: amibroker@yahoogroups.com
  Date: Sun, 10 Jan 2010 05:14:24 -

  
I was wondering when using PremiumData.net feed and switching checking Use 
Local Data so that AMIBroker will run faster with the data in the AMIBroker 
Database 

what happens when the PremiumData downloader renames symbols? I saw a bunch 
being renamed, will the AMIBroker DB then have two symbols one with the old 
name, and one with the renamed symbol?








  

Re: [amibroker] PremiumData Question

2010-01-14 Thread Steve Dugas
Thanks Richard - reading your reply I remember now that you just answered this 
question recently, I am sorry to bother you with it again.  Looking forward to 
your new release!

Steve

  - Original Message - 
  From: Richard Dale 
  To: amibroker@yahoogroups.com 
  Sent: Thursday, January 14, 2010 11:34 AM
  Subject: Re: [amibroker] PremiumData Question




  Yes we will be looking to support 64 bit once a new 64 bit AmiBroker is 
compiled by Tomsasz... right now we have incorporated features into it that 
require v4.28+ but v4.22 was the last 64 bit version released so we'll have to 
wait for now.



Best regards,
Richard Dale.
Norgate Investor Services
- Premium quality Stock, Futures and Foreign Exchange Data for
  markets in Australia, Asia, Canada, Europe, UK  USA -
www.premiumdata.net
   Original Message  
  Subject: Re: [amibroker] PremiumData Question
  From: Steve Dugas sjdu...@comcast.net
  To: amibroker@yahoogroups.com
  Date: Thu, 14 Jan 2010 11:24:01 -0500

  

Hi Richard - Your upcoming plugin sounds great, just wondering if it will 
be 64-bit?  With 64-bit computers and OS's increasingly becoming the norm and 
64-bit AmiBroker waiting in the wings, it would be real nice if just one 
maintenance-free data provider could provide a 64-bit API/plugin and remove the 
3GB bottleneck for us.  And perhaps get a bunch of new customers...Thank you 
Sir!

Steve


- Original Message - 
  From: Richard Dale 
  To: amibroker@yahoogroups.com 
  Cc: patsgreatdeals 
  Sent: Sunday, January 10, 2010 5:00 AM
  Subject: Re: [amibroker] PremiumData Question


  I'll try and explain how this works.  It's all a bit complicated.

  There's three databases at work:
  1.  Premium Data's MetaStock format database
  2.  AmiBroker's native price database
  3.  AmiBroker's security details database

  There are two settings available:
  Use Local Data Storage - either Enabled or Disabled
  Data Source - either MetaStock Plug-in or Local Database.

  The default setting is when you set Use Local data storage to false and 
Data source: MetaStock Plugin.  This uses databases 1 and 3.  Database 1 is 
updated using the Premium Data program.  Database 3 is maintained using the 
Tools-US-PremiumData command.  Normally Database 2 isn't used, except for 
composite symbols you might create.

  Why would we want to change this?

  Some people have commented that accessing AmiBroker's native price 
database is quicker for large backtests.  So how do we copy data from database1 
into database 2?  Set Local data storage to Enable and Data source - 
MetaStock Plugin, then any time you access a security in database 1, a COPY of 
the data is placed into database 2.  Some people run a scan across all data to 
popuulate this (eg. with an entry condition that is always true).

  How do we then use that copied data? Set Local data storage to Enabled 
and Data source to Local Database.  Note that any updates to database 1 will no 
longer be reflected in database 2.

  Now, should there be any maintenance required, you should either change 
back to the default setting or to the second setting.  Ensure you run 
Tools-US-PremiumData in this mode too.

  If you decide that maintaining a duplicate of the price data in 
Amibroker's natvie price database is too cumbersome, then return the settings 
to default as described above.Then shut down AmiBroker.  Make a backup of 
the entire C:\Program files\Amibroker\US-PremiumData folder.  Delete the A-Z 
folders inside the folder C:\Program Files\AmiBroker\US-PremiumData folder.  
Start AmiBroker.  Click Tools-US-PremiumData.

  What we are doing to improve this
  We are developing a native plugin to AmiBroker and also getting rid of 
the MetaStock file format.  This should provide significant performance 
increases (so there is no need to utilise a native price database), 
automatically the database on-the-fly as code/symbol changes occur (i.e. no 
need to run Tools-US-PremiumData) plus also give us extra flexibility to offer 
new features (such as historical index constituents - eg. you will be able to 
specify in your entry conditions during backtesting SP 500 constituent = 
true and this will use the historical set of SP500 constituents on each 
relevant day to determine whether the entry condition is true.  This is the 
ultimate survivorship-bias-free form of testing.  



Best regards,
Richard Dale.
Norgate Investor Services
- Premium quality Stock, Futures and Foreign Exchange Data for
  markets in Australia, Asia, Canada, Europe, UK  USA -
www.premiumdata.net

   Original Message  
  Subject: [amibroker] PremiumData Question
  From: patsgreatdeals patsgreatde...@yahoo.com
  To: amibroker@yahoogroups.com
  Date: Sun, 10 Jan 2010 05:14:24 -

  
I was wondering when using PremiumData.net feed and switching

Re: [amibroker] PremiumData Question

2010-01-14 Thread Steve Dugas
BTW, could anyone tell me, when subscribing to Norgate data, how many computers 
does their license cover? Thank you!

Steve

  - Original Message - 
  From: Steve Dugas 
  To: amibroker@yahoogroups.com 
  Sent: Thursday, January 14, 2010 12:22 PM
  Subject: Re: [amibroker] PremiumData Question





  Thanks Richard - reading your reply I remember now that you just answered 
this question recently, I am sorry to bother you with it again.  Looking 
forward to your new release!

  Steve

- Original Message - 
From: Richard Dale 
To: amibroker@yahoogroups.com 
Sent: Thursday, January 14, 2010 11:34 AM
Subject: Re: [amibroker] PremiumData Question


Yes we will be looking to support 64 bit once a new 64 bit AmiBroker is 
compiled by Tomsasz... right now we have incorporated features into it that 
require v4.28+ but v4.22 was the last 64 bit version released so we'll have to 
wait for now.



Best regards,
Richard Dale.
Norgate Investor Services
- Premium quality Stock, Futures and Foreign Exchange Data for
  markets in Australia, Asia, Canada, Europe, UK  USA -
www.premiumdata.net
 Original Message  
Subject: Re: [amibroker] PremiumData Question
From: Steve Dugas sjdu...@comcast.net
To: amibroker@yahoogroups.com
Date: Thu, 14 Jan 2010 11:24:01 -0500



  Hi Richard - Your upcoming plugin sounds great, just wondering if it will 
be 64-bit?  With 64-bit computers and OS's increasingly becoming the norm and 
64-bit AmiBroker waiting in the wings, it would be real nice if just one 
maintenance-free data provider could provide a 64-bit API/plugin and remove the 
3GB bottleneck for us.  And perhaps get a bunch of new customers...Thank you 
Sir!

  Steve


  - Original Message - 
From: Richard Dale 
To: amibroker@yahoogroups.com 
Cc: patsgreatdeals 
Sent: Sunday, January 10, 2010 5:00 AM
Subject: Re: [amibroker] PremiumData Question


I'll try and explain how this works.  It's all a bit complicated.

There's three databases at work:
1.  Premium Data's MetaStock format database
2.  AmiBroker's native price database
3.  AmiBroker's security details database

There are two settings available:
Use Local Data Storage - either Enabled or Disabled
Data Source - either MetaStock Plug-in or Local Database.

The default setting is when you set Use Local data storage to false 
and Data source: MetaStock Plugin.  This uses databases 1 and 3.  Database 1 is 
updated using the Premium Data program.  Database 3 is maintained using the 
Tools-US-PremiumData command.  Normally Database 2 isn't used, except for 
composite symbols you might create.

Why would we want to change this?

Some people have commented that accessing AmiBroker's native price 
database is quicker for large backtests.  So how do we copy data from database1 
into database 2?  Set Local data storage to Enable and Data source - 
MetaStock Plugin, then any time you access a security in database 1, a COPY of 
the data is placed into database 2.  Some people run a scan across all data to 
popuulate this (eg. with an entry condition that is always true).

How do we then use that copied data? Set Local data storage to 
Enabled and Data source to Local Database.  Note that any updates to database 1 
will no longer be reflected in database 2.

Now, should there be any maintenance required, you should either change 
back to the default setting or to the second setting.  Ensure you run 
Tools-US-PremiumData in this mode too.

If you decide that maintaining a duplicate of the price data in 
Amibroker's natvie price database is too cumbersome, then return the settings 
to default as described above.Then shut down AmiBroker.  Make a backup of 
the entire C:\Program files\Amibroker\US-PremiumData folder.  Delete the A-Z 
folders inside the folder C:\Program Files\AmiBroker\US-PremiumData folder.  
Start AmiBroker.  Click Tools-US-PremiumData.

What we are doing to improve this
We are developing a native plugin to AmiBroker and also getting rid of 
the MetaStock file format.  This should provide significant performance 
increases (so there is no need to utilise a native price database), 
automatically the database on-the-fly as code/symbol changes occur (i.e. no 
need to run Tools-US-PremiumData) plus also give us extra flexibility to offer 
new features (such as historical index constituents - eg. you will be able to 
specify in your entry conditions during backtesting SP 500 constituent = 
true and this will use the historical set of SP500 constituents on each 
relevant day to determine whether the entry condition is true.  This is the 
ultimate survivorship-bias-free form of testing.  



Best regards,
Richard Dale.
Norgate Investor Services
- Premium quality Stock, Futures and Foreign Exchange Data

Re: [amibroker] PremiumData Question

2010-01-14 Thread Steve Dugas
Thank you Louies!

  - Original Message - 
  From: Louies 
  To: amibroker@yahoogroups.com 
  Sent: Thursday, January 14, 2010 3:57 PM
  Subject: Re: [amibroker] PremiumData Question





  They give you 2: one for the laptop; one for desktop. At least, that is in my 
case




--
  From: Steve Dugas sjdu...@comcast.net
  To: amibroker@yahoogroups.com
  Sent: Thu, January 14, 2010 11:10:45 AM
  Subject: Re: [amibroker] PremiumData Question



  BTW, could anyone tell me, when subscribing to Norgate data, how many 
computers does their license cover? Thank you!

  Steve

- Original Message - 
From: Steve Dugas 
To: amibro...@yahoogrou ps.com 
Sent: Thursday, January 14, 2010 12:22 PM
Subject: Re: [amibroker] PremiumData Question


Thanks Richard - reading your reply I remember now that you just answered 
this question recently, I am sorry to bother you with it again.  Looking 
forward to your new release!

Steve

  - Original Message - 
  From: Richard Dale 
  To: amibro...@yahoogrou ps.com 
  Sent: Thursday, January 14, 2010 11:34 AM
  Subject: Re: [amibroker] PremiumData Question


  Yes we will be looking to support 64 bit once a new 64 bit AmiBroker is 
compiled by Tomsasz... right now we have incorporated features into it that 
require v4.28+ but v4.22 was the last 64 bit version released so we'll have to 
wait for now.



Best regards,Richard Dale.Norgate Investor Services- Premium quality Stock, 
Futures and Foreign Exchange Data for  markets in Australia, Asia, Canada, 
Europe, UK  USA -www.premiumdata. net
   Original Message  
  Subject: Re: [amibroker] PremiumData Question
  From: Steve Dugas sjdu...@comcast. net
  To: amibro...@yahoogrou ps.com
  Date: Thu, 14 Jan 2010 11:24:01 -0500

  

Hi Richard - Your upcoming plugin sounds great, just wondering if it 
will be 64-bit?  With 64-bit computers and OS's increasingly becoming the norm 
and 64-bit AmiBroker waiting in the wings, it would be real nice if just one 
maintenance- free data provider could provide a 64-bit API/plugin and remove 
the 3GB bottleneck for us.  And perhaps get a bunch of new customers... Thank 
you Sir!

Steve


- Original Message - 
  From: Richard Dale 
  To: amibro...@yahoogrou ps.com 
  Cc: patsgreatdeals 
  Sent: Sunday, January 10, 2010 5:00 AM
  Subject: Re: [amibroker] PremiumData Question


  I'll try and explain how this works.  It's all a bit complicated..

  There's three databases at work:
  1.  Premium Data's MetaStock format database
  2.  AmiBroker's native price database
  3.  AmiBroker's security details database

  There are two settings available:
  Use Local Data Storage - either Enabled or Disabled
  Data Source - either MetaStock Plug-in or Local Database.

  The default setting is when you set Use Local data storage to false 
and Data source: MetaStock Plugin.  This uses databases 1 and 3.  Database 1 is 
updated using the Premium Data program.  Database 3 is maintained using the 
Tools-US-PremiumData command.  Normally Database 2 isn't used, except for 
composite symbols you might create.

  Why would we want to change this?

  Some people have commented that accessing AmiBroker's native price 
database is quicker for large backtests.  So how do we copy data from database1 
into database 2?  Set Local data storage to Enable and Data source - 
MetaStock Plugin, then any time you access a security in database 1, a COPY of 
the data is placed into database 2.  Some people run a scan across all data to 
popuulate this (eg. with an entry condition that is always true).

  How do we then use that copied data? Set Local data storage to 
Enabled and Data source to Local Database.  Note that any updates to database 1 
will no longer be reflected in database 2.

  Now, should there be any maintenance required, you should either 
change back to the default setting or to the second setting.  Ensure you run 
Tools-US-PremiumData in this mode too.

  If you decide that maintaining a duplicate of the price data in 
Amibroker's natvie price database is too cumbersome, then return the settings 
to default as described above.Then shut down AmiBroker.  Make a backup of 
the entire C:\Program files\Amibroker\ US-PremiumData folder.  Delete the A-Z 
folders inside the folder C:\Program Files\AmiBroker\ US-PremiumData folder.  
Start AmiBroker.  Click Tools-US-PremiumData.

  What we are doing to improve this
  We are developing a native plugin to AmiBroker and also getting rid 
of the MetaStock file format.  This should provide significant performance 
increases (so there is no need to utilise a native price database

Re: [amibroker] Assistance request with a Custom Indicator

2010-01-14 Thread Steve Dugas
Hi - You can try this...

StartDate = ParamDate( Start Date, 1/4/2010 );
Plot (IIF( DateNum()  StartDate, NULL, ROC(Foreign(^AORD,C)),1), All 
Ords, colorWhite,styleThick);
...

Steve


- Original Message - 
From: pacific5_au pacific5...@yahoo.com
To: amibroker@yahoogroups.com
Sent: Thursday, January 14, 2010 9:33 PM
Subject: [amibroker] Assistance request with a Custom Indicator


I would like a custom indicator to start from a date that I choose and not 
show all the data of the tickers in question.

 I basically want to show ROC on a series of indice tickers from a 
 nominated date, ie current calender year for example. I would like this 
 start date to be user definable from any date.

 Here is what I have already, but it plots a running ROC on all the data 
 for the tickers.


 _SECTION_BEGIN(AU Indices);

 Plot (ROC(Foreign(^AORD,C),1), All Ords, colorWhite,styleThick);
 Plot (ROC(Foreign(XSO,C),1), Small Ords, colorRed,styleThick );
 Plot (ROC(Foreign(XMD,C),1), Mid Cap50,colorGreen,styleThick );
 Plot (ROC(Foreign(XTL,C),1), 20, colorLime,styleThick );
 Plot (ROC(Foreign(XFL,C),1), 50, colorYellow,styleThick );
 Plot (ROC(Foreign(XTO,C),1), 100, colorViolet,styleThick );
 Plot (ROC(Foreign(XJ0,C),1), 200, colorOrange,styleThick );
 Plot (ROC(Foreign(XKO,C),1), 300, colorPaleGreen,styleThick );
 _SECTION_END();

 Have tried Startpoint and begin value but its not producing what I want 
 and clearly I'm on the wrong track.

 Any assistance will be most appreciated.

 TIA
 Pacific




 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links



 




Re: [amibroker] Assistance request with a Custom Indicator

2010-01-14 Thread Steve Dugas
Oops, put the param in the wrong place, this one looks better...

Plot (IIF( DateNum()  StartDate, NULL, ROC(Foreign(^AORD,C),1)), All
Ords, colorWhite,styleThick);

- Original Message - 
From: Steve Dugas sjdu...@comcast.net
To: amibroker@yahoogroups.com
Sent: Thursday, January 14, 2010 10:05 PM
Subject: Re: [amibroker] Assistance request with a Custom Indicator


 Hi - You can try this...

 StartDate = ParamDate( Start Date, 1/4/2010 );
 Plot (IIF( DateNum()  StartDate, NULL, ROC(Foreign(^AORD,C)),1), All
 Ords, colorWhite,styleThick);
 ...

 Steve


 - Original Message - 
 From: pacific5_au pacific5...@yahoo.com
 To: amibroker@yahoogroups.com
 Sent: Thursday, January 14, 2010 9:33 PM
 Subject: [amibroker] Assistance request with a Custom Indicator


I would like a custom indicator to start from a date that I choose and not
show all the data of the tickers in question.

 I basically want to show ROC on a series of indice tickers from a
 nominated date, ie current calender year for example. I would like this
 start date to be user definable from any date.

 Here is what I have already, but it plots a running ROC on all the data
 for the tickers.


 _SECTION_BEGIN(AU Indices);

 Plot (ROC(Foreign(^AORD,C),1), All Ords, colorWhite,styleThick);
 Plot (ROC(Foreign(XSO,C),1), Small Ords, colorRed,styleThick );
 Plot (ROC(Foreign(XMD,C),1), Mid Cap50,colorGreen,styleThick );
 Plot (ROC(Foreign(XTL,C),1), 20, colorLime,styleThick );
 Plot (ROC(Foreign(XFL,C),1), 50, colorYellow,styleThick );
 Plot (ROC(Foreign(XTO,C),1), 100, colorViolet,styleThick );
 Plot (ROC(Foreign(XJ0,C),1), 200, colorOrange,styleThick );
 Plot (ROC(Foreign(XKO,C),1), 300, colorPaleGreen,styleThick );
 _SECTION_END();

 Have tried Startpoint and begin value but its not producing what I want
 and clearly I'm on the wrong track.

 Any assistance will be most appreciated.

 TIA
 Pacific




 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links








 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links



 




Re: [amibroker] Average MAE/MFE

2010-01-03 Thread Steve Dugas
Hi - I believe it is only the Professional Edition that has MAE / MFE.

Steve

  - Original Message - 
  From: James 
  To: amibroker@yahoogroups.com 
  Sent: Sunday, January 03, 2010 1:59 PM
  Subject: Re: [amibroker] Average MAE/MFE





  I must be overlooking this feature. I just updated to 5.29.6 and I still do 
not see average MAE/MFE. I have checked the settings in the Automatic Analysis 
window, run backtests in Trade list, Detailed log and Summary mode and have not 
seen anything. I have searched the latest users guide from the help menu and 
the PDF version, (both still 5.20) and the DevLog to no avail.  Could someone 
please clearly point out where this feature is, like you are explaining it to a 
dummy.  Just to clarify, I am looking for the averages of the MAE and MFE 
columns without having to go to excel.

  Best regards,
  James




--
  From: Gordon Pelletier gordonpellet...@gmail.com


  Yes 5.29 Beta

  Regards


  2010/1/3 James jamesmemphis@ yahoo.com

  

Neil,

Could you be a little more specific regarding advanced? I am using 5.20. Is 
it a newer version that does this?

Best regards,
James





From: Neil Wrightson ne...@nwe.net. au


Hi James,

The advanced AB version already does this for you.

Regards, 

Neil Wrightson. 






From: amibro...@yahoogrou ps.com [mailto:amibroker@ yahoogroups. com] On 
Behalf Of James
Sent: Saturday, 2 January 2010 10:26 AM
To: amibro...@yahoogrou ps.com
Subject: [amibroker] Average MAE/MFE


  

I would like to calculate the average MAE and MFE for all trades in 
backtest results. I know I could save the report as a file and do it in excel, 
but was wondering if there was a faster, easier way -  just to eyeball it. I 
thought a possible solution would be to add Avg. MAE and Avg MFE columns to the 
backtest results when using the optimize feature instead of backtest, but I am 
not sure how difficult this would be.

TIA,
James
















  

Re: [amibroker] Does anyone do FX backtesting?

2009-12-26 Thread Steve Dugas
Hi - You can turn off that range checking by adding this to your code -

SetOption( PriceBoundChacking, False );

Steve

  - Original Message - 
  From: Potato Soup 
  To: amibroker@yahoogroups.com 
  Sent: Saturday, December 26, 2009 2:50 AM
  Subject: Re: [amibroker] Does anyone do FX backtesting?





  I tried using BuyPrice/SellPrice/ShortPrice/CoverPrice but the problem is it 
won't take values that fall outside the range of the Low and High for a bar. I 
can't think of any other way to trick it, any ideas?




--
  From: Potato Soup potatoso...@yahoo.com
  To: amibroker@yahoogroups.com
  Sent: Sat, December 26, 2009 1:27:54 AM
  Subject: [amibroker] Does anyone do FX backtesting?




  How do you handle pairs quoted against the dollar, such as USDCAD? To the 
backtester it will look like the symbol costs 1.0579, when in fact it costs 
.94520. Is there a way to fix this automatically, or do you test for this in 
the script by looking at the pair? And if the latter, how do you retrieve the 
price so that you can invert it?









  

Re: [amibroker] Does anyone do FX backtesting?

2009-12-26 Thread Steve Dugas
Oops, screwed that up pretty good. Try this one instead -

SetOption( PriceBoundChecking, False );

  - Original Message - 
  From: Steve Dugas 
  To: amibroker@yahoogroups.com 
  Sent: Saturday, December 26, 2009 11:44 AM
  Subject: Re: [amibroker] Does anyone do FX backtesting?





  Hi - You can turn off that range checking by adding this to your code -

  SetOption( PriceBoundChacking, False );

  Steve

- Original Message - 
From: Potato Soup 
To: amibroker@yahoogroups.com 
Sent: Saturday, December 26, 2009 2:50 AM
Subject: Re: [amibroker] Does anyone do FX backtesting?


I tried using BuyPrice/SellPrice/ShortPrice/CoverPrice but the problem is 
it won't take values that fall outside the range of the Low and High for a bar. 
I can't think of any other way to trick it, any ideas?





From: Potato Soup potatoso...@yahoo.com
To: amibroker@yahoogroups.com
Sent: Sat, December 26, 2009 1:27:54 AM
Subject: [amibroker] Does anyone do FX backtesting?




How do you handle pairs quoted against the dollar, such as USDCAD? To the 
backtester it will look like the symbol costs 1.0579, when in fact it costs 
.94520. Is there a way to fix this automatically, or do you test for this in 
the script by looking at the pair? And if the latter, how do you retrieve the 
price so that you can invert it?










  

[amibroker] OT - US Traders Tax

2009-12-22 Thread Steve Dugas
Hi - For those interested in signing, here is another petition regarding the 
proposed US Traders Tax. It would seem there are those in Congress who have 
latched onto this idea as a way to raise revenue for just about anything and 
everything, pretty much abandoning the pretense of forcing Wall Street to pay 
for any damage they may have done. In addition to the original HR1068 we also 
have HR3153 and HR4191 now - as far as I can see they have removed the sunset 
clause also, these look like they would be permanent regardless of when the 
TARP funds are repaid.

http://www.rallycongress.com/greentradertax-traders-association1/2720/a-financial-transaction-tax-is-detrimental-to-many-industries/

Re: [amibroker] How to use custom indicator

2009-12-21 Thread Steve Dugas
Hi - Probably best to look at AA and charting as seperate modules, they do not 
see each other.  You can save your variables to memory using StaticVarSet() 
and retrieve them using StaticVarGet(), then they will be visible to charts and 
AA, but better yet is to just write one code that includes the required 
statements for everything you want to do, i.e.you can write one code that 
includes -

1. Plot() function so you can chart it
2. AddColumn / AddTextColumn for explorations
3. Buy / Sell statements for the backtester
4. Optimize function if you want to optimize

Very convenient !!

Steve

  - Original Message - 
  From: i cs 
  To: amibroker@yahoogroups.com 
  Sent: Monday, December 21, 2009 5:12 PM
  Subject: Re: [amibroker] How to use custom indicator





  Hi Rolf,


  I'm a bit of a newbie to AB as well, but I have worked as a programmer for a 
while.

  What I do with my custom indicators is put them in an include file in the 
include subdirectory and then use the #include myCustom.afl directive in 
the file in which I will refer to that indicator.

  This won't give you code completion, but it means you only have to write the 
indicator once. Not sure if you can get code completion on custom indicators. 
I'm sort of assuming no, simply because in AB there is no formal declaration 
of functions - let alone indicators, and you'd need some sort of formal 
declaration so that the editor would recognise the arguments that the function 
requires. 

  To a newbie AB can seem complex, but trust me, languages which include formal 
declarations can become very, very complex quickly, so I suspect that there is 
balance between ease of use, steepness of the learning curve, execution speed 
and flexibiliity. 

  Hope this helps a bit.

  RZ



--
  From: rolf.spuler rolf.spu...@yahoo.com
  To: amibroker@yahoogroups.com
  Sent: Mon, 21 December, 2009 3:53:17 AM
  Subject: [amibroker] How to use custom indicator


  Hello

  I have a beginner question but I could not figure out from the user guide 
what I am doing wrong.

  I coded my custom indicator. It is showing up in the Custom folder and I can 
attach it to a chart. But when I try to write a simple buy/sell script in the 
AFL Editor it does not recognize my indicator (syntax error). It also does not 
show up in the auto-completion drop down (typing first char and pressing ctrl + 
space). Did I miss something or do I have to include the indicator somehow?

  Thanks for any help

  Rolf





--
  See what's on at the movies in your area. Find out now. 


  

Re: [amibroker] Traders Tax

2009-12-08 Thread Steve Dugas
Thanks for posting Jerry.  There is also this one, it has been around longer 
and has 63,000 signatures so far.  I have signed both.

Steve

http://www.rallycongress.com:80/no2tradertax/1536/tell-congres-to-block-trader-tax/



- Original Message - 
From: Jerry Gress pleasenospample...@comcast.net
To: amibroker@yahoogroups.com
Sent: Tuesday, December 08, 2009 11:19 AM
Subject: [amibroker] Traders Tax


 Hello,

 Just received the below to fill out and automatically send to Washington
 written by Robert Green. Free on E-mail or $9 to have a service print and
 mail.

 JG

 PS. First from California to send, so it said?

 http://www.rallycongress.com/greentradertax-traders-association1/2644/save-t
 raders-jobs-do-not-enact-financial-transaction-tax/


 begin letter
 Save Traders' Jobs: Do Not Enact a Financial-Transaction Tax
 Sign the Petition : 7,329 Letters and Emails Sent So Far
 Dear Congressman,

 Please don't pass a financial-transaction tax. It will cause my colleagues
 and me to lose our jobs. I understand you want to pass a
 financial-transaction to finance a new jobs recovery bill. That makes very
 little sense, because the tax would put me out of business and lead to job
 losses among my colleagues. Look at the number of people who have signed
 this petition and kindly count them as job losses. If you can table the
 financial-transaction tax, you can count this number as saved jobs.

 Rep. Peter DeFazio (D-Ore.) continues to support the tax as a way to pay 
 for
 a jobs bill he is drafting with Rep. Ed Perlmutter (D-Colo.) titled Let
 Wall Street Pay for the Restoration of Main Street Act of 2009. They are
 proposing a 0.25-percent tax on the sale and purchase of financial
 instruments including stocks, options, derivatives, and futures.

 I'm a humble small business trader trading in an honest and legal manner 
 to
 support my family. If you pass this tax and put me out of business, I have
 few job prospects in this economy. I understand recovery may take another
 year or two, and I can't wait that long. I'm not necessarily suitable for
 some of the new jobs advocated by the government, such as road 
 construction,
 working in windmills, and green-energy installation jobs. I am doing a 
 good
 job for myself and society using my higher education, knowledge of 
 computers
 and the internet, and my savings to trade the financial markets. Many
 traders have already used up unemployment benefits after being laid off, 
 so
 if you put them out of business, they will have no safety net. Traders buy
 goods and services from Main Street and most traders live on Main Street,
 not Wall Street. This tax proposal will hurt existing Main Street jobs and
 won't produce new ones, either.

 I've read that supporters view this transaction tax as a way to make Wall
 Street pay. But their logic is inaccurate: The economy's downward spiral
 was caused by the real estate bubble and poor lending practices; not by
 traders. The stock-market recovery since March 2009 - one of the few 
 bright
 spots of the economic recovery - has been helped by traders like me 
 bidding
 up stocks on a daily basis. Traders provided liquidity when financial
 markets crashed, buying stocks when other investors panicked and sold off.

 Kindly reassess the financial-transaction tax and do not include it in 
 your
 jobs recovery efforts. If you believe taxes should be charged against some
 of those on Wall Street - big banks and institutions - please don't lump 
 me
 in that category. Why not consider a bank levy as suggested by Secretary
 Geithner and the IMF instead?

 If you're looking to raise taxes from Wall Street, here's another idea. 
 You
 could let the TARP banks and institutions pay bonuses to their workers in
 stock rather than cash. As I understand it, close to 50 percent of those
 bonus payments (whether in cash or stock) will go to federal, state, and
 city taxes, amounting to $50 billion dollars or more (rough estimates). 
 This
 is a similar dollar amount you intend to raise with the
 financial-transaction tax. If you don't allow the Wall Street banks to pay
 bonuses and they retain those profits, it won't necessarily enhance 
 capital
 and it won't lead to higher tax revenue. Those banks have large net
 operating losses to soak up the profits.

 Everyone I know in the trading business will be forced out of work with 
 the
 financial-transaction tax, so you won't collect the projected tax revenue
 from us. If you pass this tax in the U.S. well before the rest of the
 world's financial centers pass it, traders all over the globe will trade
 foreign markets instead of U.S. markets. In addition to running me out of
 business, you'll also force my brokerage firm and the financial exchanges 
 to
 lay off employees. This tax will bring many unintended consequences,
 including job losses on Main Street.

 President Obama empowered Treasury Secretary Geithner to speak for the 
 U.S.
 on the world stage at the 

Re: [amibroker] Re: What's a good k ratio,and thoughts on when k ratio clashes with MDD and Shar

2009-12-01 Thread Steve Dugas
Hi - For CAR, the user guide gives the formula used by AB...

AmiBroker is one of the few programs that calculates annual returns correctly 
and will give you correct value of 20% as shown in the example above. The 
formula that AmiBroker uses for annual return calculation is as follows:

correctly_annualized_perc_return = 100% * ( (final_value/initial_value) ^ ( 365 
/ days_in_test ) - 1 )

- Original Message - 

  From: Mike 
  To: amibroker@yahoogroups.com 
  Sent: Tuesday, December 01, 2009 5:01 PM
  Subject: [amibroker] Re: What's a good k ratio,and thoughts on when k ratio 
clashes with MDD and Shar




  Keith,


  Change the granularity of your formula to be on a bar basis, as opposed to an 
annual basis, and you should come out with a value very close to what AB 
produces.


  e.g.


  SetCustomBacktestProc(); 

  if (Status(action) == actionPortfolio) { 
 first = LastValue(ValueWhen(Status(firstbarinrange), BarIndex())); 
 last = LastValue(ValueWhen(Status(lastbarinrange), BarIndex())); 
 bo = GetBacktesterObject(); 

 bo.Backtest(); 

 CAR = 100 * ((bo.Equity/bo.InitialEquity) ^ (252 / (last - first + 1)) - 
1); 

 bo.AddCustomMetric(MyCAR, CAR); 
  }


  I believe that the information for K-Ratio is out of date. The formula has 
been revised. I seem to recall the author suggesting that a value of 0.5 was 
good. Howard has suggested that 0.15 was good.


  Note that the metrics you were comparing dealt with return without regard for 
how that return was achieved. K-Ratio measures the consistency of the return. 
So, it is not unusual to have strong CAR/MDD with poor K-Ratio. A couple of big 
gains would improve the former while hurting the latter.


  I seem to recall a posting in this forum offering many of the calculations 
that you're asking for. Otherwise, you can try looking at the Portfolio.afl of 
IO since it displays many of the same values.


  Mike

  --- In amibroker@yahoogroups.com, Keith McCombs kmcco...@... wrote:
  
   Mike --
   The tooltip (which I must admit I was unaware of), unfortunately, 
   provides no more information than the AmiBroker User's Guide (which I 
   referred to in my previous posting).
   
   Using your suggestion of Googling the metrics, I Googled CAR, and came 
   up with the following link:
   http://www.investorglossary.com/compound-annual-return.htm#rate_definition
   resulting in the definition, The formula for the compound annual return 
   is ((Ending Value) /(Beginning Value))^(1/Number of years)-1.
   
   I just ran a portfolio backtest for a strategy from 10/26/07 to 
   10/25/09, a period of 2years. The results were:
   Initial capital 10.00 10.00 10.00
   Ending capital 134224.01 134224.01 10.00
   Net Profit 34224.01 34224.01 0.00
   Net Profit % 34.22 % 34.22 % 0.00 %
   Exposure % 2.70 % 2.70 % 0.00 %
   Net Risk Adjusted Return % 1268.77 % 1268.77 % N/A
   Annual Return % 19.79 % 19.79 % 0.00 %
   Risk Adjusted Return % 733.63 % 733.63 % N/A
   
   
   Note that the net profit over the two year period is 34.22% and the 
   Annual Return is shown as 19.79%. However if one calculates the Annual 
   Return using net profit and the formula above,
   1.3422401^.5 -1 = 15.855%.
   
   The AB User's Guide suggests that a good system might have the following 
   characteristics:
   CAR/MaxDD - Compound Annual % Return divided by Max. system % drawdown. 
   Good if bigger than 2.
   
   Sharpe Ratio of trades - Measure of risk adjusted return of investment. 
   Above 1.0 is good, more than 2.0 is very good.
   
   K-Ratio - Detects inconsistency in returns. Should be 1.0 or more.
   
   The strategy tested above showed the following:
   MDD = -8.02%
   CAR/MDD = 2.47
   RRR = 4.32
   Sharpe = 5.27
   K-Ratio =0.0051 (seems rather inconsistent with others)
   
   I have back tested many profitable, low risk systems over the years, and 
   do not recall ever seeing a K-Ratio greater than 1.0.
   
   So, I'd still like to have AFL formulas to produce results equivalent to 
   those shown in AB back tester analysis.
   
   And, BTW, does AB calculate MDD from High/Low bars or from equity curve 
   based on closes. I suspect the latter, but don't really know.
   
   Thank you.
   -- Keith
   
   
   Mike wrote:

   
For a textual description, generate a backtest report and then hover 
your mouse over any metric name. The tooltip will provide a 
description of the metric. For most, a mathematical explanation can be 
found via google.
   
Mike
   
--- In amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com, 
Potato Soup potatosoupz@ wrote:

 Yes, I still don't have an explanation for what car is. And all the 
others I listed.

 -Original Message-
 From: Keith McCombs kmccombs@
 Date: Mon, 30 Nov 2009 14:05:23
 To: amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com
 Subject: Re: [amibroker] What's a good k ratio,
 

Re: [amibroker] Comparing Two Symbols Error Problem

2009-11-28 Thread Steve Dugas
Foreign() will return the entire array, just call it once, assign to a 
variable and then reference the variable. Your 2nd call has the correct 
format so you can just do this

y = Foreign(, Close); // current price for 

x = ref( y, -260 );


- Original Message - 
From: Alan a...@thenorthams.us
To: amibroker@yahoogroups.com
Sent: Saturday, November 28, 2009 11:39 AM
Subject: [amibroker] Comparing Two Symbols Error Problem


 To group:

 I am trying to compare AAPL to  over the last 260 trading days.
 Everything works except that I get an error with variable 'x' when
 trying to return the closing price for  260 days ago.  Can someone
 correct the coding for variable 'x'?

 // CURRENT SYMBOL
 a = Ref(Close, -260);  // closing price one year ago
 b = Close;  // current price
 perf = b / a;  // Performance = current price divided by the current
 price one year ago

 // FOREIGN SYMBOL
 x = Foreign(, Ref(Close, -260)); // closing price of  one year 
 ago
 y = Foreign(, Close); // current price for 
 perf_foreign = y / x ; // Performance = current price of  divided by
 price of  one year ago

 // RELATIVE PRICE COMPARATIVE
 rpc = perf / perf_foreign ; // compares the current symbol to the 's

 // PLOT RESULTS
 Plot(perf, ticker, colorDarkGreen, 1);  // plot current symbol 
 performance
 Plot(perf_foreign, , colorRed, 1);  // plot performance of 
 Plot(rpc, Rel_Price_Comp, colorBlack, 32);  // plot Relative Price
 Comparative

 Alan-
 http://www.eset.com


 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links



 




Re: [amibroker] Walk Forward Test - How would you...

2009-11-13 Thread Steve Dugas
built-in Standard Particle Swarm Optimizer?

  - Original Message - 
  From: Howard B 
  To: amibroker@yahoogroups.com 
  Sent: Friday, November 13, 2009 5:32 AM
  Subject: Re: [amibroker] Walk Forward Test - How would you...




  Hi Dubi --

  What is SPSO?

  Thanks,
  Howard


  On Wed, Nov 11, 2009 at 9:07 AM, dubi1974 gonzale...@chello.at wrote:

  
Hi!

Is it possible to optimize a system (for e.g. best net performance %) with 
SPSO but then use the highest Ulcer Performance Index or CAR/MDD and use then 
this parameters for the out of sample test for the next period in the Walk 
Forward Test of Amibroker? I know I could do this in separate steps, but I 
would like to automize that. Or does someone know an other solution for this?

Many thanks and kind regards,

dubi







  

Re: [amibroker] AmiBroker 25x times faster!

2009-11-10 Thread Steve Dugas
Yep, I suppose it is human nature that when everything is going great, people 
just go about their business, mostly posting when they have a question or a 
problem. It is nice to see someone posting the good stuff, reminds me why we 
are all still here. AB rocks!   8 - )


  - Original Message - 
  From: Mark Hike 
  To: amibroker@yahoogroups.com 
  Sent: Tuesday, November 10, 2009 1:52 PM
  Subject: Re: [amibroker] AmiBroker 25x times faster!




  I am not surprised :-) 
  Try to run a simple system over 3 year 1 minutes data with 100 symbols, AB 
would get it done in less than 5 minutes, and the other software just crashes!


  On Tue, Nov 10, 2009 at 1:41 PM, Jez j...@automated-trading-system.com 
wrote:

  
I recently started using AmiBroker and realised how fast it was compared to 
my other back-testing platform (TradersStudio).

I decided to stage a speed comparison test between both platforms to see 
how much faster AmiBroker really is.

For an e-ratio calculation of a simple Donchian Channel breakout AmiBroker 
came out on top winning by a factor of 25! Yes AmiBroker was 25 times faster 
than TradersStudio.
If you want to check it for yourself be sure to check the blog post 
detailing the results:
http://bit.ly/3SPEV4

This is simply amazingly good!







  

Re: [amibroker] Re: Ami is exiting without an exit command

2009-11-03 Thread Steve Dugas
Same here, I stopped pressing Enter a year or more ago, now I just click on 
the param name to close the slider. Also agree is doesn't happen every time 
and is tough to pin down why it happens sometimes and not others. I can say 
that I only have EOD data so I don't think it is due to streaming data or 
continuous chart refreshes.  However most all my codes now are pretty long 
and complex, and sometimes I drag/drop several copies to the same chart so 
that it can result in a noticable delay in refreshing the chart so perhaps I 
am overworking things...

Steve


- Original Message - 
From: Bruce bru...@zwave.net
To: amibroker@yahoogroups.com
Sent: Tuesday, November 03, 2009 8:58 AM
Subject: [amibroker] Re: Ami is exiting without an exit command




Dennis, Tomasz -

I'll confirm this also - again.  Its something that several that I know have 
experienced for a long time, but I've never been able to relate it to type 
of parameter, number of parameters (Param, ParamStr, etc.), length of time 
AB has been up, AB busy or not busy, etc.  I just know to NOT use Enter in 
chart parameters.  Unfortunately, I still do it sometimes, and Amibroker 
occasionally goes down hard and some work in progress in lost.

I sympathize with Tomasz's problem in catching this.  In an effort to 
reproduce this, I've even tried using AutoIt to repeatedly feed actions at a 
Parameter box without reproducing the problem.

I'm afraid that it may remain an annoyance.

-- BruceR


--- In amibroker@yahoogroups.com, Dennis Brown se...@... wrote:

 Yes, It works most of the time for me also.  That is why I have not
 sent it to support yet, because I can not reproduce it reliably,
 though it will happen at least once a day.  I think it may happen only
 with a very slow chart that is busy when I hit enter, but I am not sure.

 Best regards,
 Dennis

 On Nov 2, 2009, at 7:10 PM, Tomasz Janeczko wrote:

  Hello,
 
  Tried that. I can enter number in param window and press ENTER and
  it works just fine.
 
  Best regards,
  Tomasz Janeczko
  amibroker.com
  - Original Message -
  From: Dennis Brown se...@...
  To: amibroker@yahoogroups.com
  Sent: Monday, November 02, 2009 11:49 PM
  Subject: Re: [amibroker] Ami is exiting without an exit command
 
 
  I have also seen this closing without warning or saving my data on
  this last beta only.  However, for me it has nothing to do with the
  data feed.  Instead, it closes when I enter a number into a slider
  control in the param window and hit the enter key.  If I just click on
  some other control parameter it does not crash.  It only does this on
  occasion, so I have developed the new habit of not using the enter key
  to complete a parameter entry. ;)
 
  BR,
  Dennis
 
  On Nov 2, 2009, at 1:12 PM, reinsley wrote:
 
 
  Barry,
 
  I got this issue from 5.26.5 to 5.29.2, as soon as TWS was running
  AB shuts.
 
  I fixed this way : downgrade to 5.20 then upgrade to 5.29.2.
 
  I lost few datas, but backfiiling recover the whole stuff. Backup
  your
  DB before.
 
  It's still running as a charm...
 
  Best regards
 
  Keith McCombs a écrit :
 
 
  Joris --
  Have your lawyer call my lawyer.
  -- Keith
 
 
  Joris M.schuller wrote:
 
 
 
  That is an _old problem that began in the AB 4.X days_. Suddenly
  for
  no apparent reason, not just at the start of TWS, AB would close.
  (In
  fact, I can't rule out that it also happened with other data
  vendors
  such as IQFeed, QT) The first couple of times that was of course
  quite
  unsettling.  After that you got used to it. It didn't seem to
  corrupt
  anything, apart from losing some data and on occasion an unsaved
  AFL.
  It clearly _is an intermittent problem_, which are the hardest to
  solve. I spent more time on fault isolation than it was worth, but
  could isolate the problem to AB: Different mice, computers, OS even
  UPS all on occasion showed the same problem.  Currently (in AB
  5.20-5.26) the problem is much reduced. The _high tech solution I
  use_
  (of course proprietary and copyrighted, not to mention unique and
  never done by anyone else before, in short encompassing all the
  customary claims made in this field) is placing the AB in the
  taskbar
  on the left next to the Start button. Then after an inadvertent AB
  close, I then (and again this is proprietary) move the cursor over
  the
  AB icon, place one of my fingers (index selection not critical) on
  the
  mouse and press the Left mouse button and click: Like magic AB
  starts
  up and re-appears. I hope that this explanation is explicit enough:
  Otherwise, don't hesitate to contact Tomasz.
 
 
 
  *From:* amibroker@yahoogroups.com
  [mailto:amibro...@yahoogroups.com]
  *On Behalf Of *Edward Pottasch
  *Sent:* Monday, November 02, 2009 9:02 AM
  *To:* amibroker@yahoogroups.com
  *Subject:* Re: [amibroker] Ami is exiting without an exit command
 
 
 
 
 
  yes, see the AT group.  In my case I have the TWS already started.
  Then I start AB and 

Re: [amibroker] Help? Strange Foreign Function Behavior

2009-10-31 Thread Steve Dugas
Hi - Probably a dumb question but is PSIG a valid ticker in your DB?  I 
don't see it in my DB and I believe SetForeign will just return the current 
ticker if it can't find the one requested.  SetForeign seems to work fine 
for me...

Steve


- Original Message - 
From: Mike m...@earthlink.net
To: amibroker@yahoogroups.com
Sent: Saturday, October 31, 2009 10:43 AM
Subject: [amibroker] Help? Strange Foreign Function Behavior


I am seeing something I have never seen before.  I can only see foreign 
function plots and calculations if the symbol called by foreign function is 
also the selected symbol.

 'm using end of day data on Yahoo indexes along with externally calculated 
 signal file.

 It doesn't matter whether or not I use the yahoo data or signal as the 
 foreign function.  No foreign data is pulled in unless that ticker is 
 selected.

 Has to be something simple I'm overlooking but can't see it.  Has anyone 
 encountered this and know what simple thing I'm just not seeing?  Using 
 version 5.2 professional.

 Thank you,  Mike

 SetForeign(psig);
 SIG = C;
 Plot(SIG,signal,colorGreen,512);
 RestorePriceArrays();



 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links



 




Re: [amibroker] help with HighestSince in loop

2009-10-25 Thread Steve Dugas

  - Original Message - 
  From: James 
  To: amibroker@yahoogroups.com 
  Sent: Sunday, October 25, 2009 6:52 PM
  Subject: [amibroker] help with HighestSince in loop





  In the code below, I cannot use an array after HighestSince. Can someone help 
explain how can I achieve this without using an array? Reverse equals inlong 
==0.



  TIA,

  James



  if ( inlong ) 
 { 
if (High [ i ]  HighestSince( reverse, H, 1)) 
{ 
   nBarNet [i] = Max (findNthLowerLow( n, currentBar, dflt ), nBarNet [ 
i-1 ]); 
} 
else 
{ 
   nBarNet [i] = nBarNet [ i-1 ]; 






  

Re: [amibroker] Re: activeX ..how to perform EXPLORE() on current symbol only using ActiveX`

2009-10-19 Thread Steve Dugas
Hi - Actually I haven't done any of this OLE stuff in years and I was never 
too good at it anyway, but after a quick look at the Object Model I might 
try something like this. I really don't know if it is correct or not without 
trying it, there are others here who know this OLE stuff much better than me 
so perhaps someone else can comment...

AB.Stock.Ticker = MSFT


- Original Message - 
From: gajanan gajan...@gmail.com
To: amibroker@yahoogroups.com
Sent: Monday, October 19, 2009 2:49 AM
Subject: [amibroker] Re: activeX ..how to perform EXPLORE() on current 
symbol only using ActiveX`


 HI,
 Thanks a lotsteve.. that helped partially ...

 I'm having problem setting the current symbol through VB.

AOneStk = AStks.Item(stkPosition) 'only1 added
ADocs.Open(symbol)  'SHUD THIS SET THE CURRENT SYMBOL?
AOneDoc = ADocs.Item(0)
tempName = AOneDoc.Name
' add to watchllist 9
'AOneStk.WatchListBits = AOneStk.WatchListBits + (1  9)
AB.RefreshAll()
' use watchlist 9
AA.Filter(0, watchlist) = 9   ' /* watch list number */;
'set explore prams
AA.ApplyTo = 1 ' current stock..but how is this selected.
AA.RangeMode = RngMode.RngMode_ALL   ' all quotes
AA.LoadFormula(AflFile)
AA.LoadSettings(AbSettings)
AA.Explore() '

 Any advice is immensely appreciated.

 Gajanan


 --- In amibroker@yahoogroups.com, Steve Dugas sjdu...@... wrote:

 Hi - I think this will do it...

 Steve


 AA.ApplyTo = 1; // 0=all symbols, 1=current symbol, 2=use filter



 - Original Message - 
 From: gajanan gajan...@...
 To: amibroker@yahoogroups.com
 Sent: Saturday, October 17, 2009 10:30 PM
 Subject: [amibroker] activeX ..how to perform EXPLORE() on current 
 symbol
 only using ActiveX`


  HI,
  I wanted to automate Explore() in VB for Amibroker. I was able to do so
  for a watchlist. how do I do it for the current symbol or for only 1
  symbol.
 
  e.g. Code below..
 AB = CreateObject(Broker.Application)
 AA = AB.Analysis
 AA.ClearFilters()
 AA.Filter(0, watchlist) = 6   ' /* watch list number */;
 AA.ApplyTo = 2  ' use filter
 
 ' set range
 AA.RangeMode = RngMode.RngMode_LastNDays   ' all quotes
 AA.RangeN = AbLastNDays  '- defines N (number of bars/days to
  backtest)
 'AA.RangeFromDate()'- defines From date
 'AA.RangeToDate()  '- defines To date
 
 AA.LoadFormula(AflFile)
 AA.LoadSettings(AbSettings)
 AA.Explore()
 
  will perform Explore on Watchlist 6 for last N days.
  now
  instead of performing on watchlist 6 i just want to perform it on one
  stock symbol. How do I do that..
  I see 2 possible solutions
  1) set current symbol only property somewhere ?
  2) clear a watchlist, set it to have only one symbol..use it..
 
  Can any one plz suggest, how can i do either of the two?
 
  Thank You,
  Gajanan
 
 
 
 
 
  
 
   IMPORTANT PLEASE READ 
  This group is for the discussion between users only.
  This is *NOT* technical support channel.
 
  TO GET TECHNICAL SUPPORT send an e-mail directly to
  SUPPORT {at} amibroker.com
 
  TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
  http://www.amibroker.com/feedback/
  (submissions sent via other channels won't be considered)
 
  For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
  http://www.amibroker.com/devlog/
 
  Yahoo! Groups Links
 
 
 
 





 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links



 




Re: [amibroker] Re: MA cross with %filter

2009-10-19 Thread Steve Dugas
Hi - Close, it is Exrem that removes all signals until opposite signal is 
generated. Flip, after a True, will continue to return True until it comes 
to a True in the 2nd array. I think it is convenient to look at it as Signal 
( buy, sell, use Exrem ) vs. State ( in long, in short, use Flip ) In your 
case, if you have 2 arrays...

11011000111 // in buy zone, occasionally drops into neutral 
territory
0011000 // in sell zone

then after doing
InLong = Flip( InBuyZone, InSellZone );
you will have

11011000111 // in buy zone
0011000 // in sell zone
1100111 // in long, here is the filter you wanted I think?


- Original Message - 
From: levibreidenbach lev...@comcast.net
To: amibroker@yahoogroups.com
Sent: Monday, October 19, 2009 11:15 AM
Subject: [amibroker] Re: MA cross with %filter


 Hello:

 I'm still having difficulty understanding both the flip() and exrem() 
 function.  Can somebody help to explain them.  I've read documentation, 
 but it is fairly brief.

 Does flip remove all signals until a opposite signal is generated?  Not 
 sure if I'm understanding it.

 Thanks

 Levi

 --- In amibroker@yahoogroups.com, levibreidenbach lev...@... wrote:

 Hello:

 Fairly new to Amibroker with a question regarding MA crossover.  This is 
 probably very simple to code, but I can't seem to wrap my head around it. 
 I would like to have a filter that I include with buy logic as follows: 
 Using SP500 data, whenever price moves above 65 week moving average by 
 1%, filter = 1.  Whenever price moves below MA by 1% filter = 0.

 The part I'm getting hung up on is what happens in between filter.  Say 
 price trends down from buy zone (1.01*65 week MA), but doesn't close 
 below sell zone (.99*65 week MA).  Then price comes back up above 1% buy 
 filter.  During this period, the filter should always = 1.  But if it 
 crosses 1% sell filter, it should become 0 until it crosses above 1% buy 
 filter.

 I think I'm making this much more confusing than it needs to be.  I'm 
 sure there is a very simple way to program this - that's what I'm looking 
 for.

 Thanks ahead of time,

 Levi





 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links



 




Re: [amibroker] MA cross with %filter

2009-10-18 Thread Steve Dugas
Hi - Have a look at the Flip() function, once price enters your buy zone it 
can return a 1 until it enters your sell zone.

Steve

- Original Message - 
From: levibreidenbach lev...@comcast.net
To: amibroker@yahoogroups.com
Sent: Friday, October 16, 2009 4:47 PM
Subject: [amibroker] MA cross with %filter


 Hello:

 Fairly new to Amibroker with a question regarding MA crossover.  This is 
 probably very simple to code, but I can't seem to wrap my head around it. 
 I would like to have a filter that I include with buy logic as follows: 
 Using SP500 data, whenever price moves above 65 week moving average by 
 1%, filter = 1.  Whenever price moves below MA by 1% filter = 0.

 The part I'm getting hung up on is what happens in between filter.  Say 
 price trends down from buy zone (1.01*65 week MA), but doesn't close below 
 sell zone (.99*65 week MA).  Then price comes back up above 1% buy filter. 
 During this period, the filter should always = 1.  But if it crosses 1% 
 sell filter, it should become 0 until it crosses above 1% buy filter.

 I think I'm making this much more confusing than it needs to be.  I'm sure 
 there is a very simple way to program this - that's what I'm looking for.

 Thanks ahead of time,

 Levi



 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links



 




[amibroker] Fw: [holygrailsm] Stratfor - George Friedman interview on Financial situation

2009-10-18 Thread Steve Dugas
Hey TJ, we will have to get together in 2050 or so for the big victory party!
Please leave some room in your social calender...   8 - )

Steve


- Original Message - 
From: Stan Sztaba 
To: holygrai...@yahoogroups.com 
Sent: Sunday, October 18, 2009 5:03 PM
Subject: [holygrailsm] Stratfor - George Friedman interview on Financial 
situation





Below is a link to an interview from the current issue of Stock Futures and 
Options magazine with George Friedman, founder of Stratfor, a geo-political 
analytical company.   The interview is Friedman's analysis of the current 
financial situation in the US

http://sfomag.com/ArticlePrint.aspx?ID=1414

Friedman's analysis is always interesting and thought provoking, and this 
interview is no exception.

His book The Next Hundred Years is a fascinating read.   In addition to 
describing weakness in China, and the collapse of Russia, he describes the 
build-up to the next World War in mid-century, between the then current world 
powers:  the United States allied with Poland, against Japan allied with Turkey.

http://www.amazon.com/Next-100-Years-Forecast-Century/dp/038551705X/ref=sr_1_1?ie=UTF8s=booksqid=1255899526sr=8-1-catcorr

Stan







Re: [amibroker] activeX ..how to perform EXPLORE() on current symbol only using ActiveX`

2009-10-17 Thread Steve Dugas
Hi - I think this will do it...

Steve


AA.ApplyTo = 1; // 0=all symbols, 1=current symbol, 2=use filter



- Original Message - 
From: gajanan gajan...@gmail.com
To: amibroker@yahoogroups.com
Sent: Saturday, October 17, 2009 10:30 PM
Subject: [amibroker] activeX ..how to perform EXPLORE() on current symbol 
only using ActiveX`


 HI,
 I wanted to automate Explore() in VB for Amibroker. I was able to do so 
 for a watchlist. how do I do it for the current symbol or for only 1 
 symbol.

 e.g. Code below..
AB = CreateObject(Broker.Application)
AA = AB.Analysis
AA.ClearFilters()
AA.Filter(0, watchlist) = 6   ' /* watch list number */;
AA.ApplyTo = 2  ' use filter

' set range
AA.RangeMode = RngMode.RngMode_LastNDays   ' all quotes
AA.RangeN = AbLastNDays  '- defines N (number of bars/days to 
 backtest)
'AA.RangeFromDate()'- defines From date
'AA.RangeToDate()  '- defines To date

AA.LoadFormula(AflFile)
AA.LoadSettings(AbSettings)
AA.Explore()

 will perform Explore on Watchlist 6 for last N days.
 now
 instead of performing on watchlist 6 i just want to perform it on one 
 stock symbol. How do I do that..
 I see 2 possible solutions
 1) set current symbol only property somewhere ?
 2) clear a watchlist, set it to have only one symbol..use it..

 Can any one plz suggest, how can i do either of the two?

 Thank You,
 Gajanan





 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links



 




Re: [amibroker] Ram Jam after optimization problem

2009-10-13 Thread Steve Dugas
Hi - Yes it can be quite easy for optimizations to use up all memory and 
basically lock up your computer or generate an exception.  I found that if I 
started using smaller opts and then gradually increased the size until it 
locked up I could get a pretty good idea of the upper step limit for 
running future opts without overdoing it.   There is also the 3GB switch, 
you can probably get details on that by searching the posts in this group 
although if you only have 2G to begin with I don't know if that could help 
you.

Funny you should mention this because I was just thinking the other day, TJ 
has implemented column hiding in AA but I believe the stats for the hidden 
columns are still calculated and saved in memory. If this could be enhanced 
so that only visible columns are calculated, it would seem that would allow 
the opts to run faster while also using less memory to store the results. So 
we could run both faster and larger opts? Perhaps *much* faster and larger 
if we only wanted to see a few columns? Anyone have any thoughts? Thanks!

Steve


- Original Message - 
From: melaleu...@sbcglobal.net blues...@sbcglobal.net
To: amibroker@yahoogroups.com
Sent: Tuesday, October 13, 2009 2:20 PM
Subject: [amibroker] Ram Jam after optimization problem


 After running a long, multi symbol optimization, TaskManager shows 
 broker.exe using 1.2 Gb or more of Ram.

 Problem one is that the optimization report, although usable, cannot be 
 saved with 'Export' or 'Select/Copy'.  I push the 'Export' button and 
 usually it blinks, but no Export dialog appears. Copy doesn't copy.

 In addition, afterwards, I can't clear the Ram and the computer is 
 basically useless; redrawing windows a little at a time, etc.

 My only recourse is to restart the computer.

 Ram would be the answer, but the computer is maxed out at 2Gb.

 DuoCore Dell Laptop, XP, 2GB Ram (maxed out)

 ??
 Balin



 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links



 




Re: [amibroker] Re: AB vers. 5.29

2009-10-11 Thread Steve Dugas
Hi Rob - Years ago I had an issue with params, I would open AB and find many 
of the params kept reverting back to the defaults. That can happen if AB 
doesn't save them properly - if it can't find them on startup then it will 
use the defaults. I started tracking the size and contents of broker.params 
whenever I would close AB and found the size would change drastically and 
half the params weren't being saved to the file. Turns out that I was using 
different keyboard characters in my param names, and somehow these 
characters were causing AB to abort the save process when it would come 
across them. I renamed all my params using only letters and numbers and 
never had any more problems after that.

Steve

- Original Message - 
From: Rob sidharth...@yahoo.com
To: amibroker@yahoogroups.com
Sent: Sunday, October 11, 2009 7:15 AM
Subject: [amibroker] Re: AB vers. 5.29


I had a similar issue... along with a separate issue regarding corrupted 
parameter lists (this is an old issue pre 5.29)...

 Anyway, I deleted broker.params file from the AB directory.. reloaded AB 
 and now my symbol window seems to be correct...

 --- In amibroker@yahoogroups.com, Steve Dugas sjdu...@... wrote:

 MessageThanks Gordon, beginning to look like there may be a bug or two, 
 I'll file a couple of reports and we'll see what comes of it.

 Steve

   - Original Message - 
   From: gos...@...
   To: amibroker@yahoogroups.com
   Sent: Saturday, October 10, 2009 4:18 PM
   Subject: RE: [amibroker] AB vers. 5.29





   Steve,

   If I may butt in here, I have my Symbols tab checked for Hide Empty 
 Markets/Groups/Sectors etc and you are right, I have to 'Refresh All' to 
 get the Empty slots to hide every time I open AB. I am running 
 5.29.0Beta2. I also have issues with duplication of two days per symbol 
 in AA Explorations Reports and problems with WF Optimization crashes 
 using the exhaustive engine. I am working with Marcin on these issues.

   Cheers,

   Gordon Sutherland
 -Original Message-
 From: amibroker@yahoogroups.com [mailto:amibro...@yahoogroups.com] On 
 Behalf Of Steve Dugas
 Sent: Sunday, 11 October 2009 6:51 a.m.
 To: amibroker@yahoogroups.com
 Subject: Re: [amibroker] AB vers. 5.29


 Ara, one question if you don't mid - When you click on the Symbols 
 tab, does your symbol tree come up with all tickers or do you have to 
 click Refresh All to fill it? I have to click Refresh All, that seems 
 like strange behavior to be by design, just wondering if my 
 installation might be corrupted or something...thanks!

 Steve
   - Original Message - 
   From: Steve Dugas
   To: amibroker@yahoogroups.com
   Sent: Saturday, October 10, 2009 1:37 PM
   Subject: Re: [amibroker] AB vers. 5.29


   Same here, things are messed up. I download mutual funds also, half 
 the mutual funds are listed under ETF's. Most all the ETF's and common 
 stocks are listed under Undefined. Something changed, either on the AB 
 side or the QP side. I had switched over to Gary's plugin that retrieves 
 the Morningstar industries and then switched back to TJ's plugin when he 
 updated it for the new DB, I wondered if that might be the problem but it 
 would seem not if you are having the same problems on a brand new DB. 
 Tough to get any answers out of QP these days, seems there is nobody home 
 anymore. Perhaps TJ could comment if it is possible the problem lies with 
 his new plugin?

   Steve
 - Original Message - 
 From: Ara Kaloustian
 To: AB-Main
 Sent: Saturday, October 10, 2009 12:20 AM
 Subject: [amibroker] AB vers. 5.29


 I am having a lot of trouble installing AB version 5.29 the 
 database contains very little data in Groups

 I am running one QuotesPlus database and two installations of EOD 
 Amibrokers, Version 5.26 (old database) and 5.29 (new database) both 
 getting their data from the single QP database.

 My original installation of version 5.26 still works fine, but 
 5.29 has very poor data integrity as it contains far fewer issues in 
 Groups.

 For example, Common Stocks group contains only 384 issues 
 (version 5.26 contains 5170 issues  for Common Stocks).

 I recall a couple of others had similar issues.

 Did anyone experience this and found a solution?

 Thanks

 ara





 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links



 




Re: [amibroker] Re: AB vers. 5.29

2009-10-11 Thread Steve Dugas
No I mean the name you see when you open the params. I was doing stuff like 
this

MyParam = Param(  % MyName ( ^ ) , 

It was a weird little system I had, each character meant something to me and 
when I saw them in the param window I knew what they meant.  I thought since 
it was a literal string I could name it anything I wanted but when AB went 
to save those names there was some character or character combo that caused 
it to abort the save before it finished.  I never did find out exactly which 
one, I just removed all the oddball characters from all the names and it has 
worked fine ever since.


- Original Message - 
From: Rob sidharth...@yahoo.com
To: amibroker@yahoogroups.com
Sent: Sunday, October 11, 2009 11:54 AM
Subject: [amibroker] Re: AB vers. 5.29


 Steve,

 Interesting. I'm not sure what you mean when you talk about 'naming 
 parameters'...? Do you simply mean the variable that they are assigned 
 to...?

 TIA

 --- In amibroker@yahoogroups.com, Steve Dugas sjdu...@... wrote:

 Hi Rob - Years ago I had an issue with params, I would open AB and find 
 many
 of the params kept reverting back to the defaults. That can happen if AB
 doesn't save them properly - if it can't find them on startup then it 
 will
 use the defaults. I started tracking the size and contents of 
 broker.params
 whenever I would close AB and found the size would change drastically and
 half the params weren't being saved to the file. Turns out that I was 
 using
 different keyboard characters in my param names, and somehow these
 characters were causing AB to abort the save process when it would come
 across them. I renamed all my params using only letters and numbers and
 never had any more problems after that.

 Steve

 - Original Message - 
 From: Rob sidharth...@...
 To: amibroker@yahoogroups.com
 Sent: Sunday, October 11, 2009 7:15 AM
 Subject: [amibroker] Re: AB vers. 5.29


 I had a similar issue... along with a separate issue regarding corrupted
 parameter lists (this is an old issue pre 5.29)...
 
  Anyway, I deleted broker.params file from the AB directory.. reloaded 
  AB
  and now my symbol window seems to be correct...
 
  --- In amibroker@yahoogroups.com, Steve Dugas sjdugas@ wrote:
 
  MessageThanks Gordon, beginning to look like there may be a bug or 
  two,
  I'll file a couple of reports and we'll see what comes of it.
 
  Steve
 
- Original Message - 
From: gosuth@
To: amibroker@yahoogroups.com
Sent: Saturday, October 10, 2009 4:18 PM
Subject: RE: [amibroker] AB vers. 5.29
 
 
 
 
 
Steve,
 
If I may butt in here, I have my Symbols tab checked for Hide Empty
  Markets/Groups/Sectors etc and you are right, I have to 'Refresh All' 
  to
  get the Empty slots to hide every time I open AB. I am running
  5.29.0Beta2. I also have issues with duplication of two days per 
  symbol
  in AA Explorations Reports and problems with WF Optimization crashes
  using the exhaustive engine. I am working with Marcin on these issues.
 
Cheers,
 
Gordon Sutherland
  -Original Message-
  From: amibroker@yahoogroups.com [mailto:amibro...@yahoogroups.com] 
  On
  Behalf Of Steve Dugas
  Sent: Sunday, 11 October 2009 6:51 a.m.
  To: amibroker@yahoogroups.com
  Subject: Re: [amibroker] AB vers. 5.29
 
 
  Ara, one question if you don't mid - When you click on the Symbols
  tab, does your symbol tree come up with all tickers or do you have to
  click Refresh All to fill it? I have to click Refresh All, that seems
  like strange behavior to be by design, just wondering if my
  installation might be corrupted or something...thanks!
 
  Steve
- Original Message - 
From: Steve Dugas
To: amibroker@yahoogroups.com
Sent: Saturday, October 10, 2009 1:37 PM
Subject: Re: [amibroker] AB vers. 5.29
 
 
Same here, things are messed up. I download mutual funds also, 
  half
  the mutual funds are listed under ETF's. Most all the ETF's and common
  stocks are listed under Undefined. Something changed, either on the AB
  side or the QP side. I had switched over to Gary's plugin that 
  retrieves
  the Morningstar industries and then switched back to TJ's plugin when 
  he
  updated it for the new DB, I wondered if that might be the problem but 
  it
  would seem not if you are having the same problems on a brand new DB.
  Tough to get any answers out of QP these days, seems there is nobody 
  home
  anymore. Perhaps TJ could comment if it is possible the problem lies 
  with
  his new plugin?
 
Steve
  - Original Message - 
  From: Ara Kaloustian
  To: AB-Main
  Sent: Saturday, October 10, 2009 12:20 AM
  Subject: [amibroker] AB vers. 5.29
 
 
  I am having a lot of trouble installing AB version 5.29 
  the
  database contains very little data in Groups
 
  I am running one QuotesPlus database and two

Re: [amibroker] Re: AB vers. 5.29

2009-10-11 Thread Steve Dugas
Hi Ara - Have you tried retrieving the tickers from the QP database with the 
new 5.29 plugin to see if the assignments were still correct? Thanks!

Steve

- Original Message - 
From: Ara Kaloustian a...@san.rr.com
To: amibroker@yahoogroups.com
Sent: Sunday, October 11, 2009 4:44 PM
Subject: Re: [amibroker] Re: AB vers. 5.29


I just re-installed 5.29 on top of ver 5.26 and it installed OK.

 None of the problems I encountered the first time. No idea why the
 difference.

 Ara


 - Original Message - 
 From: Richard aree...@yahoo.com
 To: amibroker@yahoogroups.com
 Sent: Sunday, October 11, 2009 10:52 AM
 Subject: [amibroker] Re: AB vers. 5.29



 Ara,
 When I went to beta 5.27 it blew out my database. I contacted support and
 was told If I didn't make a backup tough luck you'll have to build a 
 new
 one.  The change (as I recall started with 5.27)  I hope this isn't your
 problem.  I reinstalled 5.20 and am running it with no problem. I don't
 know how this will be resolved with 5.30 ... does anybody know?

 Dick H

 --- In amibroker@yahoogroups.com, Ara Kaloustian a...@... wrote:

 I am having a lot of trouble installing AB version 5.29 the database
 contains very little data in Groups

 I am running one QuotesPlus database and two installations of EOD
 Amibrokers, Version 5.26 (old database) and 5.29 (new database) both
 getting their data from the single QP database.

 My original installation of version 5.26 still works fine, but 5.29 has
 very poor data integrity as it contains far fewer issues in Groups.

 For example, Common Stocks group contains only 384 issues (version 5.26
 contains 5170 issues  for Common Stocks).

 I recall a couple of others had similar issues.

 Did anyone experience this and found a solution?

 Thanks

 ara





 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links








 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links



 




Re: [amibroker] AB vers. 5.29

2009-10-10 Thread Steve Dugas
Same here, things are messed up. I download mutual funds also, half the mutual 
funds are listed under ETF's. Most all the ETF's and common stocks are listed 
under Undefined. Something changed, either on the AB side or the QP side. I had 
switched over to Gary's plugin that retrieves the Morningstar industries and 
then switched back to TJ's plugin when he updated it for the new DB, I wondered 
if that might be the problem but it would seem not if you are having the same 
problems on a brand new DB. Tough to get any answers out of QP these days, 
seems there is nobody home anymore. Perhaps TJ could comment if it is possible 
the problem lies with his new plugin?

Steve
  - Original Message - 
  From: Ara Kaloustian 
  To: AB-Main 
  Sent: Saturday, October 10, 2009 12:20 AM
  Subject: [amibroker] AB vers. 5.29





  I am having a lot of trouble installing AB version 5.29 the database 
contains very little data in Groups

  I am running one QuotesPlus database and two installations of EOD Amibrokers, 
Version 5.26 (old database) and 5.29 (new database) both getting their data 
from the single QP database.

  My original installation of version 5.26 still works fine, but 5.29 has very 
poor data integrity as it contains far fewer issues in Groups.

  For example, Common Stocks group contains only 384 issues (version 5.26 
contains 5170 issues  for Common Stocks).

  I recall a couple of others had similar issues.

  Did anyone experience this and found a solution?

  Thanks

  ara



  

Re: [amibroker] AB vers. 5.29

2009-10-10 Thread Steve Dugas
Ara, one question if you don't mid - When you click on the Symbols tab, does 
your symbol tree come up with all tickers or do you have to click Refresh All 
to fill it? I have to click Refresh All, that seems like strange behavior to be 
by design, just wondering if my installation might be corrupted or 
something...thanks!

Steve
  - Original Message - 
  From: Steve Dugas 
  To: amibroker@yahoogroups.com 
  Sent: Saturday, October 10, 2009 1:37 PM
  Subject: Re: [amibroker] AB vers. 5.29





  Same here, things are messed up. I download mutual funds also, half the 
mutual funds are listed under ETF's. Most all the ETF's and common stocks are 
listed under Undefined. Something changed, either on the AB side or the QP 
side. I had switched over to Gary's plugin that retrieves the Morningstar 
industries and then switched back to TJ's plugin when he updated it for the new 
DB, I wondered if that might be the problem but it would seem not if you are 
having the same problems on a brand new DB. Tough to get any answers out of QP 
these days, seems there is nobody home anymore. Perhaps TJ could comment if it 
is possible the problem lies with his new plugin?

  Steve
- Original Message - 
From: Ara Kaloustian 
To: AB-Main 
Sent: Saturday, October 10, 2009 12:20 AM
Subject: [amibroker] AB vers. 5.29


I am having a lot of trouble installing AB version 5.29 the database 
contains very little data in Groups

I am running one QuotesPlus database and two installations of EOD 
Amibrokers, Version 5.26 (old database) and 5.29 (new database) both getting 
their data from the single QP database.

My original installation of version 5.26 still works fine, but 5.29 has 
very poor data integrity as it contains far fewer issues in Groups.

For example, Common Stocks group contains only 384 issues (version 5.26 
contains 5170 issues  for Common Stocks).

I recall a couple of others had similar issues.

Did anyone experience this and found a solution?

Thanks

ara



  

Re: [amibroker] AB vers. 5.29

2009-10-10 Thread Steve Dugas
MessageThanks Gordon, beginning to look like there may be a bug or two, I'll 
file a couple of reports and we'll see what comes of it.

Steve

  - Original Message - 
  From: gos...@xtra.co.nz 
  To: amibroker@yahoogroups.com 
  Sent: Saturday, October 10, 2009 4:18 PM
  Subject: RE: [amibroker] AB vers. 5.29





  Steve,

  If I may butt in here, I have my Symbols tab checked for Hide Empty 
Markets/Groups/Sectors etc and you are right, I have to 'Refresh All' to get 
the Empty slots to hide every time I open AB. I am running 5.29.0Beta2. I also 
have issues with duplication of two days per symbol in AA Explorations Reports 
and problems with WF Optimization crashes using the exhaustive engine. I am 
working with Marcin on these issues.

  Cheers,

  Gordon Sutherland
-Original Message-
From: amibroker@yahoogroups.com [mailto:amibro...@yahoogroups.com] On 
Behalf Of Steve Dugas
Sent: Sunday, 11 October 2009 6:51 a.m.
To: amibroker@yahoogroups.com
Subject: Re: [amibroker] AB vers. 5.29


Ara, one question if you don't mid - When you click on the Symbols tab, 
does your symbol tree come up with all tickers or do you have to click Refresh 
All to fill it? I have to click Refresh All, that seems like strange behavior 
to be by design, just wondering if my installation might be corrupted or 
something...thanks!

Steve
  - Original Message - 
  From: Steve Dugas 
  To: amibroker@yahoogroups.com 
  Sent: Saturday, October 10, 2009 1:37 PM
  Subject: Re: [amibroker] AB vers. 5.29


  Same here, things are messed up. I download mutual funds also, half the 
mutual funds are listed under ETF's. Most all the ETF's and common stocks are 
listed under Undefined. Something changed, either on the AB side or the QP 
side. I had switched over to Gary's plugin that retrieves the Morningstar 
industries and then switched back to TJ's plugin when he updated it for the new 
DB, I wondered if that might be the problem but it would seem not if you are 
having the same problems on a brand new DB. Tough to get any answers out of QP 
these days, seems there is nobody home anymore. Perhaps TJ could comment if it 
is possible the problem lies with his new plugin?

  Steve
- Original Message - 
From: Ara Kaloustian 
To: AB-Main 
Sent: Saturday, October 10, 2009 12:20 AM
Subject: [amibroker] AB vers. 5.29


I am having a lot of trouble installing AB version 5.29 the 
database contains very little data in Groups

I am running one QuotesPlus database and two installations of EOD 
Amibrokers, Version 5.26 (old database) and 5.29 (new database) both getting 
their data from the single QP database.

My original installation of version 5.26 still works fine, but 5.29 has 
very poor data integrity as it contains far fewer issues in Groups.

For example, Common Stocks group contains only 384 issues (version 5.26 
contains 5170 issues  for Common Stocks).

I recall a couple of others had similar issues.

Did anyone experience this and found a solution?

Thanks

ara



  

Re: [amibroker] [Backtesting] Going long/short on a particular date - problem with weekends

2009-10-07 Thread Steve Dugas
Hi - This should sell on 14th or following market day...

Sell = Day() = 14 AND Month() == 2;
Sell = Sell AND NOT ref( Sell, -1 );

Steve

- Original Message - 
From: miloslavhebky miloslavhe...@yahoo.com
To: amibroker@yahoogroups.com
Sent: Tuesday, October 06, 2009 6:15 AM
Subject: [amibroker] [Backtesting] Going long/short on a particular date - 
problem with weekends


 Hi, I have futures EOD data and I'm trying to go long on a particular day. 
 So far I have this

 Buy =  Day() == 29 AND Month() == 1;
 Sell = Day() == 14 AND Month() == 2;

 The problem is when I enter on 1/29 and suppose 2/14 is holiday or 
 weekend, Sell command won't be executed because OHLC is not defined for 
 weekends so these days are skipped by AB during testing. How can I handle 
 these cases? How can I find closest trading day (the next or previous one) 
 when to leave or enter if the date I want to enter/leave is weekend?

 I was going through the forums and few guys were struggling with similar 
 issue and they were told that one possible solution might be to edit EOD 
 files and put there dummy values for weekends and fill OHLC with -1 or 
 something. Then in a to code check Close value and if it is -1 that day 
 is weekend or holiday and then with use of Ref one can skip back and 
 forward to look for the first trading day.

 imo this might work, but is there any better way. Thanks



 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links



 




Re: [amibroker] Need help - for loop MACD() not incrementing in array

2009-10-07 Thread Steve Dugas
Hi - If you want to step through the array bar-by-bar, you should be using 
subscripts inside the loop that refer to the bar, e.g.

MCAD[i]

But unless you need the loop for something else, I think you could just 
remove the looping code at the top and use your regular array-based AFL to 
do what you want...

Steve

- Original Message - 
From: Michael herps...@yahoo.com
To: amibroker@yahoogroups.com
Sent: Wednesday, October 07, 2009 12:08 PM
Subject: [amibroker] Need help - for loop MACD() not incrementing in array


 Thanks for lookin'.
 I am attempting to process a for loop through EOD data that includes a 
 test of the difference between the MACD() and Signal(). I installed a 
 trace and found that the MACD() and Signal() are not incrementing through 
 the data array. The numbers returned remain the same and I go nowhere.

 What do I have to do to increment MACD() and Signal() through the EOD data 
 within a for loop?

 Partial code sample follows:

 for(i = 1; i  BarCount; i++ )
 { // for loop bracket
 x = MACD();
 y = Signal();
 Hist = x - y;
 z = Hist  Ref(Hist, -1); // z = 0 if True, 1 if False
 _TRACE(x = + x +  y = + y +  Hist = + Hist);

 Thanks,
 Mike L.



 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links



 




Re: [amibroker] AB vers 5.29 - Sectors

2009-10-07 Thread Steve Dugas
Hi - I had a problem recently that in the symbol tree all markets, groups, etc 
were suddenly empty. Not sure when it started, I think either with addition of 
GICS support or when TJ recently updated the QP plugin and I had to revert from 
Gary's plugin back to TJ's. Anyway, I went to Symbol  Organize Assignments, 
looked around and saw that everything looked intact, closed the window and then 
tickers appeared in the tree again.

Ara - In your case could the second Utilities be left over from a previous 
classification? That happened to me once when QP eliminated one or two 
industries. I removed the tickers and renamed it back to default name, then 
updated from the QP database and it remained empty with original name.

Steve 


  - Original Message - 
  From: Robert Nemeth 
  To: amibroker@yahoogroups.com 
  Sent: Wednesday, October 07, 2009 12:58 PM
  Subject: Re: [amibroker] AB vers 5.29 - Sectors





  Same issue here in AB 5.28. I am also having a big problem in groups. 
Nothing seems to be listed correctly in common stocks, etf's and others. This 
was after a complete reload of quotes plus database. Any insight appreciated. I 
sent a message to qp but maybe it is the wrong place.
  Robert




--
  From: Ara Kaloustian a...@san.rr.com
  To: AB-Main amibroker@yahoogroups.com
  Sent: Wed, October 7, 2009 12:18:12 AM
  Subject: [amibroker] AB vers 5.29 - Sectors [1 Attachment]



  Attachment shows the sectors menu with Utilities listed twice

  The top group of Utilities has all the components and works normally.

  The bottom group contains only one subsector and there are no symbols 
associate with it.

  Anyone having same issue?

  ara




  

Re: [amibroker] AB vers 5.29 - Sectors

2009-10-07 Thread Steve Dugas
Hmm...well now I have just looked again and tickers from symbol tree are gone 
again. Added them again by going to Organize Assignments, shut down / restarted 
AB and gone again. It seems AB does not save QP's markets, groups etc now when 
it shuts down?


  - Original Message - 
  From: Steve Dugas 
  To: amibroker@yahoogroups.com 
  Sent: Wednesday, October 07, 2009 1:32 PM
  Subject: Re: [amibroker] AB vers 5.29 - Sectors





  Hi - I had a problem recently that in the symbol tree all markets, groups, 
etc were suddenly empty. Not sure when it started, I think either with addition 
of GICS support or when TJ recently updated the QP plugin and I had to revert 
from Gary's plugin back to TJ's. Anyway, I went to Symbol  Organize 
Assignments, looked around and saw that everything looked intact, closed the 
window and then tickers appeared in the tree again.

  Ara - In your case could the second Utilities be left over from a previous 
classification? That happened to me once when QP eliminated one or two 
industries. I removed the tickers and renamed it back to default name, then 
updated from the QP database and it remained empty with original name.

  Steve 


- Original Message - 
From: Robert Nemeth 
To: amibroker@yahoogroups.com 
Sent: Wednesday, October 07, 2009 12:58 PM
Subject: Re: [amibroker] AB vers 5.29 - Sectors


Same issue here in AB 5.28. I am also having a big problem in groups. 
Nothing seems to be listed correctly in common stocks, etf's and others. This 
was after a complete reload of quotes plus database. Any insight appreciated. I 
sent a message to qp but maybe it is the wrong place.
Robert





From: Ara Kaloustian a...@san.rr.com
To: AB-Main amibroker@yahoogroups.com
Sent: Wed, October 7, 2009 12:18:12 AM
Subject: [amibroker] AB vers 5.29 - Sectors [1 Attachment]

  

Attachment shows the sectors menu with Utilities listed twice

The top group of Utilities has all the components and works normally.

The bottom group contains only one subsector and there are no symbols 
associate with it.

Anyone having same issue?

ara





  

Re: [amibroker] AB vers 5.29 - Sectors [1 Attachment]

2009-10-07 Thread Steve Dugas
Hi - I think I have this symbol behavior figured out now. If I shut down AB 
with the Symbols tab selected, then AB will fill the symbol tree when it starts 
again. But if I shut it down with another tab selected and then switch to the 
Symbols tab, the tree is not filled and there are no boxes to expand Markets, 
Groups etc ( as shown in attached pic ) and then I need to Refresh All to fill 
the tree.. So my 2 questions are

1. TJ, is the new symbols window supposed to work this way?
2. Is that how it works for other people too,  or just on my machine?

TIA for any info !

Steve


  - Original Message - 
  From: Tomasz Janeczko 
  To: amibroker@yahoogroups.com 
  Sent: Wednesday, October 07, 2009 7:37 PM
  Subject: Re: [amibroker] AB vers 5.29 - Sectors





  You can not delete sectors.  See how categories work:
  http://www.amibroker.com/guide/h_workspace.html

  What you should do is to MOVE symbols listed in wrong category using organize 
assignments
  and then use View-Refresh All.

  Best regards,
  Tomasz Janeczko
  amibroker.com
- Original Message - 
From: Ara Kaloustian 
To: amibroker@yahoogroups.com 
Sent: Wednesday, October 07, 2009 9:50 PM
Subject: Re: [amibroker] AB vers 5.29 - Sectors


I deleted the second Utilities label, but the tree structure is still 
there with the + box.
  - Original Message - 
  From: Steve Dugas 
  To: amibroker@yahoogroups.com 
  Sent: Wednesday, October 07, 2009 10:32 AM
  Subject: Re: [amibroker] AB vers 5.29 - Sectors


  Hi - I had a problem recently that in the symbol tree all markets, 
groups, etc were suddenly empty. Not sure when it started, I think either with 
addition of GICS support or when TJ recently updated the QP plugin and I had to 
revert from Gary's plugin back to TJ's. Anyway, I went to Symbol  Organize 
Assignments, looked around and saw that everything looked intact, closed the 
window and then tickers appeared in the tree again.

  Ara - In your case could the second Utilities be left over from a 
previous classification? That happened to me once when QP eliminated one or two 
industries. I removed the tickers and renamed it back to default name, then 
updated from the QP database and it remained empty with original name.

  Steve 


- Original Message - 
From: Robert Nemeth 
To: amibroker@yahoogroups.com 
Sent: Wednesday, October 07, 2009 12:58 PM
Subject: Re: [amibroker] AB vers 5.29 - Sectors


Same issue here in AB 5.28. I am also having a big problem in groups. 
Nothing seems to be listed correctly in common stocks, etf's and others. This 
was after a complete reload of quotes plus database. Any insight appreciated. I 
sent a message to qp but maybe it is the wrong place.
Robert





From: Ara Kaloustian a...@san.rr.com
To: AB-Main amibroker@yahoogroups.com
Sent: Wed, October 7, 2009 12:18:12 AM
Subject: [amibroker] AB vers 5.29 - Sectors [1 Attachment]

  

Attachment shows the sectors menu with Utilities listed twice

The top group of Utilities has all the components and works normally.

The bottom group contains only one subsector and there are no symbols 
associate with it.

Anyone having same issue?

ara





  

Re: [amibroker] Getting Periodicity programmatically?

2009-09-30 Thread Steve Dugas
Interval() function


- Original Message - 
From: Keith McCombs kmcco...@engineer.com
To: amibroker@yahoogroups.com
Sent: Wednesday, September 30, 2009 12:02 AM
Subject: [amibroker] Getting Periodicity programmatically?


 Is there any way to programmatically determine the periodicity of a graph 
 or the setting in AA?
 -- Keith



 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links



 




Re: [amibroker] how to create combined ticker in Amibroker and chart it

2009-09-28 Thread Steve Dugas
Hi - Since you want to create a new ticker you could put your 5 starting 
tickers into a watchlist and then run AddToComposite() function over the 
list. You can read about AddToComposite by using Search tab in the user 
guide and also I think there is a very good tutorial by Herman in the files 
section.

Would probably be simpler if you could get by without actually creating a 
ticker but just an AFL named MPLSUTIL, e.g. -

Input1 = Foreign( epd, close );
Input2 = Foreign( paa, close );

MyIndex = ( 0.25 * Input1 ) + ( 0.15 * Input2 )
Plot( MyIndex...


Steve


- Original Message - 
From: dicric_71 bdvo...@centrum.cz
To: amibroker@yahoogroups.com
Sent: Monday, September 28, 2009 11:22 AM
Subject: [amibroker] how to create combined ticker in Amibroker and chart it


I have studied AB help , tested some formulas, but I am little lost. Hope 
somebody can help me.

 I want to create ticker
 ticker = ( 0.25 * EPD ) + ( 0.15 * PAA ) + ( 0.20 * RGNC ) + ( 0.15 * KMP) 
 + (0.25 * ETP)
 and have it under name MPLSUTIL in symbol list and then have it in list of 
 symbols with possibility to chart it in chart window (candlestick chart).

 Can somebody help me how to do it ?

 Thank you in advance,
 Richard



 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links



 




Re: [amibroker] Help understanding array processing

2009-09-21 Thread Steve Dugas
Hi - I think you have run into the old recursive problem. In the first 
line...

theHi[0] = C[0];

you set only the first bar of the Hi to the close. Don't know what the rest 
of the array is offhand, AB may initialize it to zero or null or something, 
otherwise I would think the values are whatever was previously in memory. 
Then the second line operates on the entire array at once so it will use 
whatever those values of theHi are at that point, it will *not* do one bar 
at a time and then refer back to that bar, I think that is one reason why TJ 
added looping.

It looks like you are looking for the highest Close in the array, could you 
just use

Highest( Close)  ?

Steve

- Original Message - 
From: Barry razzba...@imageview.us
To: amibroker@yahoogroups.com
Sent: Monday, September 21, 2009 5:25 PM
Subject: [amibroker] Help understanding array processing


I am not new to Ami, been using it since 2003.  But at times the array 
processing drives me nuts.  I tried to use barssince and looked at the buy 
and sell arrays before they were set. so they were still nulls even when I 
initialized them to buy = sell = 0;

 But to try to understand what the arrays were doing I wrote a stupid 
 little program to see what was going on. The code is below.

 What I am trying to do is save the highest hi in an array called theHi.  I 
 set the first cell in theHi to the value of in the first cell of the 
 close.  Then I compare them but theHi follows the close even when the 
 close goes down.

 Then I wrote the same function in a for loop and it works fine.

 Then I added the formula to Excel and it worked correctly.
 =IF(C3D2,C3,D2) where C has the close and D the hi array values. Here I 
 also set the hi in cell 2 to the first value of Close.
 SO excel works fine with the same formula as Afl but Afl fails.

 I must be missing something really basic. Can anyone tell me why Ami won't 
 allow me to scan through the close array and save the high?

 Thanks,
 Barry

 _SECTION_BEGIN(TestBarsSince);

 _N(Title = StrFormat(BarsSince test - {{INTERVAL}} {{DATE}} \nOpen %g, Hi 
 %g, Lo %g, Close %g (%.1f%%) Vol  +WriteVal( V, 1.0 ) + {{VALUES}}, O, 
 H, L, C, SelectedValue( ROC( C, 1 )) ));

 Plot( C, Close, ParamColor(Color, colorBlack ), styleNoTitle | 
 styleBar  ); // shows all style options

 theHi[0] = C[0];
 theHi = IIf(C  Ref(theHi, -1), C, Ref(theHi, -1));
 Plot(theHi, \nTheHi, colorBlue  );

 forHi[0] = C[0];
 for (i = 1; i  BarCount; ++i)
 {
 if(C[i]  forHi[i-1]) forHi[i] = C[i]; else forHi[i] = forHi[i-1];
 }

 Plot(forHi, \nHi with for loop, colorGreen);

 _SECTION_END();



 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links



 




Re: [amibroker] Re: Help understanding array processing

2009-09-21 Thread Steve Dugas
Hi Barry, I believe subscripts [] will use the shorter QuickAFL arrays and 
not the entire dataset.


- Original Message - 
From: Barry razzba...@imageview.us
To: amibroker@yahoogroups.com
Sent: Monday, September 21, 2009 7:46 PM
Subject: [amibroker] Re: Help understanding array processing


 What I am trying to do is find the lowest low from the last sell so I can 
 calculate a buy point above that low, or below the high for a sell.  The 
 first problem I ran into was what to do before the first trade.  I used 
 highest and lowest but afterward I wanted to use hhv and llv.  Ami goes 
 nuts when I try to reference buy and sell before they are ever set.  So 
 barssince returned nulls for all bars.

 Marcin told me I had to use loops.  I remember loops really slowing things 
 down so I tried to do it another way. I tried to set my test hi and low 
 arrays one step at a time.  The hi and lo just followed the close. I was 
 expecting it to operate one bar at a time. That did not work as you 
 pointed out.

 I finally said to heck with it and used loops. I am used to arrays in C++ 
 and I really get screwed up with Ami's arrays. Do you know if looping 
 slows the process down a lot or does Ami only go back far enough to load 
 the indicators correctly?  I remember seeing something like that.

 Thanks Steve,
 Barry

 --- In amibroker@yahoogroups.com, Steve Dugas sjdu...@... wrote:

 Hi - I think you have run into the old recursive problem. In the first
 line...

 theHi[0] = C[0];

 you set only the first bar of the Hi to the close. Don't know what the 
 rest
 of the array is offhand, AB may initialize it to zero or null or 
 something,
 otherwise I would think the values are whatever was previously in memory.
 Then the second line operates on the entire array at once so it will use
 whatever those values of theHi are at that point, it will *not* do one 
 bar
 at a time and then refer back to that bar, I think that is one reason why 
 TJ
 added looping.

 It looks like you are looking for the highest Close in the array, could 
 you
 just use

 Highest( Close)  ?

 Steve

 - Original Message - 
 From: Barry razzba...@...
 To: amibroker@yahoogroups.com
 Sent: Monday, September 21, 2009 5:25 PM
 Subject: [amibroker] Help understanding array processing


 I am not new to Ami, been using it since 2003.  But at times the array
 processing drives me nuts.  I tried to use barssince and looked at the 
 buy
 and sell arrays before they were set. so they were still nulls even when 
 I
 initialized them to buy = sell = 0;
 
  But to try to understand what the arrays were doing I wrote a stupid
  little program to see what was going on. The code is below.
 
  What I am trying to do is save the highest hi in an array called theHi. 
  I
  set the first cell in theHi to the value of in the first cell of the
  close.  Then I compare them but theHi follows the close even when the
  close goes down.
 
  Then I wrote the same function in a for loop and it works fine.
 
  Then I added the formula to Excel and it worked correctly.
  =IF(C3D2,C3,D2) where C has the close and D the hi array values. Here 
  I
  also set the hi in cell 2 to the first value of Close.
  SO excel works fine with the same formula as Afl but Afl fails.
 
  I must be missing something really basic. Can anyone tell me why Ami 
  won't
  allow me to scan through the close array and save the high?
 
  Thanks,
  Barry
 
  _SECTION_BEGIN(TestBarsSince);
 
  _N(Title = StrFormat(BarsSince test - {{INTERVAL}} {{DATE}} \nOpen %g, 
  Hi
  %g, Lo %g, Close %g (%.1f%%) Vol  +WriteVal( V, 1.0 ) + {{VALUES}}, 
  O,
  H, L, C, SelectedValue( ROC( C, 1 )) ));
 
  Plot( C, Close, ParamColor(Color, colorBlack ), styleNoTitle |
  styleBar  ); // shows all style options
 
  theHi[0] = C[0];
  theHi = IIf(C  Ref(theHi, -1), C, Ref(theHi, -1));
  Plot(theHi, \nTheHi, colorBlue  );
 
  forHi[0] = C[0];
  for (i = 1; i  BarCount; ++i)
  {
  if(C[i]  forHi[i-1]) forHi[i] = C[i]; else forHi[i] = forHi[i-1];
  }
 
  Plot(forHi, \nHi with for loop, colorGreen);
 
  _SECTION_END();
 
 
 
  
 
   IMPORTANT PLEASE READ 
  This group is for the discussion between users only.
  This is *NOT* technical support channel.
 
  TO GET TECHNICAL SUPPORT send an e-mail directly to
  SUPPORT {at} amibroker.com
 
  TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
  http://www.amibroker.com/feedback/
  (submissions sent via other channels won't be considered)
 
  For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
  http://www.amibroker.com/devlog/
 
  Yahoo! Groups Links
 
 
 
 





 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback

Re: [amibroker] Strange behaviour of foreign

2009-09-06 Thread Steve Dugas
Hi - Data retrieved via Foreign() is synchronized to the data of the current 
ticker, i.e. dates/times are aligned, so probably your data for DCO and ATN 
ends a little sooner than the others?  Try plotting basic price chart and 
then changing the current ticker to see if those tickers have one less bar 
or something.

Steve


- Original Message - 
From: adrianmollenhorst adrianmollenho...@yahoo.com
To: amibroker@yahoogroups.com
Sent: Friday, September 04, 2009 8:51 AM
Subject: [amibroker] Strange behaviour of foreign


 Hi,

 Something really simple, but it's confounding me. I am using IQFeed data 
 and the following code:

 f = Foreign(LMIA,C);
 Plot(f,f,colorBlue);


 When the open chart is LMIA,ATHN, or a few others, the last value for f is 
 9.20 (the correct last price of LMIA). When I use some other charts, such 
 as DCO, or ATN for example, it's 8.90 (The second to last price).

 Why am I not getting the last price when using these other symbols?

 Adrian



 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links



 




Re: [amibroker] Please help in my formula

2009-08-29 Thread Steve Dugas
Hi - You can shift the arrays to the left by using Ref with a positive number...

CPctOne = ref( CPct0, 1 );
CPctTen = ref( CPct0, 10 );
PlotShapes( IIF( CPctOne...
PlotShapes( IIF( CPctTen...

Steve

  - Original Message - 
  From: Vinay Gakkhar. 
  To: Amibroker 
  Sent: Saturday, August 29, 2009 8:34 PM
  Subject: [amibroker] Please help in my formula


  Can anyone please help me?

  I have the following formula:

  Plot (C, Close, colorBlue, styleThick, Null, Null, 0);
  CPct0 = (C-(Ref(C,-1)))*100/(Ref(C,-1)) ;
  PlotShapes( IIf( CPct0 = 4, shapeHollowUpArrow, shapeNone ) , colorPaleGreen 
);
  PlotShapes( IIf( CPct0 = -4 , shapeHollowDownArrow, shapeNone ) , colorGold 
);

  This gives me arrows after my condition of CPct0 = 4 or CPct0 = -4 is met.

  What should I change so that I get TWO arrows - the first arrow one bar 
before my condition is met, and the second arrow 10 bars before my condition is 
met.

  Thanks, and regards,

  Vinay Gakkhar 



Re: [amibroker] Please help in my formula [1 Attachment]

2009-08-29 Thread Steve Dugas
*[Attachment(s) from Steve Dugas included below]

Hi Vinay - Your code seems to work fine on my computer...is this what it is 
supposed to look like?

Steve

- Original Message - 
From: Vinay Gakkhar. vgakk...@yahoo.co.uk
To: amibroker@yahoogroups.com
Sent: Saturday, August 29, 2009 9:24 PM
Subject: [amibroker] Please help in my formula


 Dear Steve,

 Many thanks for your immediate reply.

 After incorporating improvements suggested by you, I am now getting 
 CPctOne arrows horizontally in my desired one-bar-before position, but 
 vertically these arrows are not coming on the plot-line and are positioned 
 much above or below the plot-line vertically.

 Another point. I am not getting the CPctTen arrows.

 Can you please guide me which corrections to make in my following revised 
 formula:

 Plot (C, Close, colorBlue, styleThick, Null, Null, 0);
 CPct0 = (C-(Ref(C,-1)))*100/(Ref(C,-1)) ;
 CPctOne = Ref( CPct0, 1 );
 CPctTen = Ref( CPct0, 10 );
 PlotShapes( IIf( CPctOne = 4, shapeHollowUpArrow, shapeNone ) , 
 colorPaleGreen );
 PlotShapes( IIf( CPctOne = -4 , shapeHollowDownArrow, shapeNone ) , 
 colorGold );
 PlotShapes( IIf( CPctTen = 4, shapeHollowUpArrow, shapeNone ) , 
 colorGreen );
 PlotShapes( IIf( CPctTen = -4 , shapeHollowDownArrow, shapeNone ) , 
 colorRed );

 Waiting for your reply. And sorry to be encroaching upon your precious 
 time.

 Vinay Gakkhar



 On Sun, 30 Aug 2009 06:23:55 +0530, Steve Dugas sjdu...@comcast.net 
 wrote:

 Hi - You can shift the arrays to the left by using Ref with a positive 
 number...

 CPctOne = ref( CPct0, 1 );
 CPctTen = ref( CPct0, 10 );
 PlotShapes( IIF( CPctOne...
 PlotShapes( IIF( CPctTen...

 Steve

   - Original Message -
   From: Vinay Gakkhar.
   To: Amibroker
   Sent: Saturday, August 29, 2009 8:34 PM
   Subject: [amibroker] Please help in my formula


   Can anyone please help me?

   I have the following formula:

   Plot (C, Close, colorBlue, styleThick, Null, Null, 0);
   CPct0 = (C-(Ref(C,-1)))*100/(Ref(C,-1)) ;
   PlotShapes( IIf( CPct0 = 4, shapeHollowUpArrow, shapeNone ) , 
 colorPaleGreen );
   PlotShapes( IIf( CPct0 = -4 , shapeHollowDownArrow, shapeNone ) , 
 colorGold );

   This gives me arrows after my condition of CPct0 = 4 or CPct0 = -4 is 
 met.

   What should I change so that I get TWO arrows - the first arrow one bar 
 before my condition is met, and the second arrow 10 bars before my 
 condition is met.

   Thanks, and regards,

   Vinay Gakkhar




 -- 



 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links



 


*Attachment(s) from Steve Dugas:

* 1 of 1 Photo(s) 
http://groups.yahoo.com/group/amibroker/attachments/folder/1470607089/item/list 
  * screenshot1.png



 IMPORTANT PLEASE READ 
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

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

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-dig...@yahoogroups.com 
mailto:amibroker-fullfeatu...@yahoogroups.com

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

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



Re: [amibroker] dynamic color and decimal places in chart title

2009-08-05 Thread Steve Dugas
Hi - you can use NumToStr() function for title formatting...

Title=   Pctval =  + EncodeColor(SelectedValue(dyn_col)) + NumToStr( 
pctval, 1.2 ) + %;

Steve

- Original Message - 
From: doedau don.edwa...@doir.wa.gov.au
To: amibroker@yahoogroups.com
Sent: Wednesday, August 05, 2009 2:38 AM
Subject: [amibroker] dynamic color and decimal places in chart title


 Hi all,
 I am trying to modify color and decimal places in a chart title.
 I found some clever person had already solved the color problem as below, 
 but I cant find a way to set the nummber of decimal places.

 I have tried functions prec and strtonum but didnt work.

 Can anyone help please?

 Code snippet:

 pctval is my calculated percentage for which I want to change color and 
 decimal places.

 dyn_col = IIf(pctval0,colorGreen,colorRed);

 Title=   Pctval =  + EncodeColor(SelectedValue(dyn_col)) + pctval + %;

 Regards, Don from Perth Australia.



 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links



 




Re: [amibroker] AmiBroker 5.27.0 ALPHA released

2009-08-03 Thread Steve Dugas
Hi TJ - Re the new QP plugin, I think you are aware that Gary has added 
Morningstar industry classification ( tickers !HMxxx ) and that your old 
plugin would not retrieve these tickers from QP for some reason and that 
Gary has released a modified version of your plugin that will retrieve these 
tickers. Will your new QP plugin retrieve these tickers? Thanks very much 
for all your hard work!

Steve


- Original Message - 
From: Tomasz Janeczko gro...@amibroker.com
To: amibroker@yahoogroups.com
Sent: Monday, August 03, 2009 5:03 AM
Subject: [amibroker] AmiBroker 5.27.0 ALPHA released


 Hello,

 AmiBroker 5.27.0 ALPHA released

 http://www.amibroker.com/devlog/2009/08/03/amibroker-5-27-0-alpha-released/

 ALPHA means that this version is experimental and you *must* do backup of 
 your data files before installing it. New version changes
 the format of database files (quotation / stock / drawings ),
 so once data are saved with version 5.27 you will NOT be able to read them 
 in pre-5.27 version.
 The ALPHA installer comes with simple backup program that will create a 
 copy of your AmiBroker directory - it will display right
 after new program files are copied. The backup will be created in 
 C:\AmiBrokerBackup folder. Please note that this backup is
 intended to copy the database files, not program files which will be 
 overwritten anyway. If you want to backup program files too,
 you need to backup them manually prior to installation. If you made your 
 own backup prior to installation, you can skip (Cancel) the
 backup part of the install routine.

 CHANGES IN VERSION 5.27.0 (as compared to 5.26.0):

 - changed core data structures to support the following
 -- 64 bit date/time field with date range of 4095 years and resolution 
 down to microseconds
 -- floating point volume and open interest fields
 -- two new auxilliary data fields per bar (internally, not yet exposed)
 -- 100 new user-defined fundamental data fields (internally, not yet 
 exposed)
 -- support for GICS (internally, not yet exposed)
 -- upto 48 character length in Symbol/Alias/WebID fields
 - Updated plugins for eSignal, IQFeed, Interactive Brokers, Quotes Plus, 
 Metastock to support floating point volume/open int and 64
 bit date/time
 - 1-second interval bars
 - Metastock plugin now reads long symbol description
 - Symbol lock fixed (does not interfere with Interval linking)
 - Added simple BackupAB.exe to backup entire AmiBroker folder after 
 installation to prevent data in old format.

 Details in the read me:
 http://www.amibroker.com/devlog/wp-content/uploads/2009/08/readme5270.html

 Best regards,
 Tomasz Janeczko
 amibroker.com



 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links



 






 IMPORTANT PLEASE READ 
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

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

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-dig...@yahoogroups.com 
mailto:amibroker-fullfeatu...@yahoogroups.com

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

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



Re: [amibroker] RestorePriceArrays()

2009-07-31 Thread Steve Dugas
 SetForeign(MSFT);
Replaces the price arrays ( OHLC etc ) of the current ticker with those of 
MSFT

 Plot( Ultimate(), Ultimate from MSFT, colorRed );
Plots the Ultimate Oscillator derived from MSFT prices. That's just a simple 
example, there is lots of stuff you can do, for example you could plot the 
SP, Sector and Industry for your ticker, or anything derived from them.

 RestorePriceArrays();
When finished doing stuff with other tickers, set the price arrays back to 
the prices for the current ticker at the top of the screen. Good 
housekeeping if nothing else, if you don't do it prices will still be set to 
the last SetForeign ticker you called and it is easy to forget and wonder 
why Amibroker isn't working right   8 - )

Steve


- Original Message - 
From: haiguise sherif...@gmail.com
To: amibroker@yahoogroups.com
Sent: Friday, July 31, 2009 2:27 AM
Subject: [amibroker] RestorePriceArrays()


 Can Someone Explain to me what Exactly RestorePriceArray does and when I 
 would need to call it and What happens if I dont. In the Reference, There 
 is
 // Example 1: Plot the indicator using foreign security data
 SetForeign(MSFT);
 Plot( Ultimate(), Ultimate from MSFT, colorRed );
 RestorePriceArrays();


 Why Do I need RestorePriceArrays() called? Thanks



 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links



 




Re: [amibroker] Re: NAAIM Presentation -- How to Build an Effective Trading System

2009-07-23 Thread Steve Dugas
Hi - Go to www.blueowlpress.com , click on activities, scroll about 3/4 of 
the way down, see 2 presentations, Atlanta and Irvine.

Steve

- Original Message - 
From: Paolo Cavatore pcavat...@gmail.com
To: amibroker@yahoogroups.com
Sent: Thursday, July 23, 2009 4:24 AM
Subject: [amibroker] Re: NAAIM Presentation -- How to Build an Effective 
Trading System


 Hi Howard,

 I cannot find your How to Build an Effective Trading System, and Build 
 Confidence that it will be Profitable presentation.

 The link you provided - http://www.blueowlpress.com/NAAIM.html - doesn't 
 work and I cannot find any reference to it in your new link 
 http://www.blueowlpress.com/activities.html.

 Can you help, pls?

 paolo

 --- In amibroker@yahoogroups.com, Howard B howardba...@... wrote:

 Greetings --

 All of the blue owl press websites have been refreshed.

 All of the links to PowerPoint presentations and pdf files have been 
 moved
 to the /Activities page of each website.  For example:
 http://www.blueowlpress.com/activities.html
 http://www.introductiontoamibroker.com/activities.html

 There are also some new links --
 One describing the ATAA Australian Technical Analysts Association, and 
 their
 annual Convention to be held in Melbourne in October 2009, where I will 
 be
 speaking.
 http://ataa.com.au/
 Another describing a series of workshops I will be giving in Melbourne 
 the
 week immediately following the ATAA conference.
 http://www.howardinaustralia.com.au/

 The ATAA Conference looks to be outstanding -- a great program and great
 speakers.

 The workshops will be similar in style and activity to the workshop I 
 gave
 in Las Vegas in 2008.  This time there will be three --
 An introductory workshop that focuses on using AmiBroker.
 An intermediate workshop about the design, testing, and validation of
 trading systems similar to the Las Vegas workshop.
 An advanced workshop that extends both trading systems and AmiBroker.

 Thanks,
 Howard
 www.blueowlpress.com


 On Sat, Jul 18, 2009 at 9:25 PM, Mike sfclimb...@... wrote:

 
 
  http://www.blueowlpress.com/activities.html
 
  Scroll down to Speaking. One version from Atlanta, Georgia, one from
  Irvin, California.
 
  Mike
 
 
  --- In amibroker@yahoogroups.com amibroker%40yahoogroups.com, 
  zozuzoza
  zozuka@ wrote:
  
   Hi,
   Could someone please send me the presentation. The link below is not
  working. Please reply if you have it.
   Thanks.
   Zozu
  
  
   --- In amibroker@yahoogroups.com amibroker%40yahoogroups.com, 
   Howard
  Bandy howardbandy@ wrote:
   
Greetings all --
   
I was asked in a private email if the presentation I gave at the 
NAAIM
conference yesterday was available.
   
The title of the talk is How to Build an Effective Trading System,
and Build Confidence that it will be Profitable.
   
There may be general interest in reading it. Yes, it is available 
as
a PowerPoint file. You can download it here:
http://www.blueowlpress.com/NAAIM.html
   
You are welcome to use the information and graphics from individual
slides in emails and other presentations, providing credit is given 
to
the author and copyright holder, Howard Bandy. You may post a link 
to
the download page. Please do not copy the presentation and repost 
or
distribute it.
   
There are trading system examples written in AmiBroker in the
presentation. These are for educational purposes only. They may be
interesting starting points for further development, but that are 
not
systems that are ready to trade, and they will probably not be
profitable as published. If you do modify and develop these systems
and find interesting results, please post the code and the results
back to this forum.
   
Constructive comments and discussion are welcome.
   
The NAAIM conference was very well organized and very valuable. You
can learn more about NAAIM -- National Association of Active
Investment Managers -- here:
http://www.naaim.org/
   
Thanks,
Howard
   
  
 
 
 





 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links



 




Re: [amibroker] Re: AmiBroker 5.26.5 BETA released

2009-07-12 Thread Steve Dugas
Hi - In case you might find it useful, I often use a little piece of code 
like this to lock in charts for different tickers...

Steve

Ticker = ParamStr( Ticker, CURRENT );

if ( Ticker != CURRENT )

{

SetForeign( Ticker, True, True );

TickerName = Ticker;

}

else

TickerName = Name();

...rest of your code...

Title = TickerName + the rest...

RestorePriceArrays();




- Original Message - 
From: sidhartha70 sidharth...@yahoo.com
To: amibroker@yahoogroups.com
Sent: Sunday, July 12, 2009 12:23 PM
Subject: [amibroker] Re: AmiBroker 5.26.5 BETA released


I'm not talking about changing the 'symbol'... I'm talking about changing 
the interval.

Speaking from my own perspective, symbol lock was a great feature because it 
stopped charts changing 'symbols' erroneously. Which is something that 
happened frequently to me when moving between floating windows  
non-floating windows.

However, if in stopping that erroneous behavior I now can't interval link 
charts, that creates a major problem... for obvious reasons. I have 8 
interval linked charts. 4 floating. 4 non floating.
It's vital that they are interval linked. It's also vital that they don't 
change symbols erroneously.

I'm not sure I see the logic or advantage of 'symbol lock' disabling 
interval link??

--- In amibroker@yahoogroups.com, Tomasz Janeczko gro...@... wrote:

 It is not a bug. It is fully intended operation.

 Symbol lock means do not change the symbol for that chart
 If active chart is symbol-locked, the symbol does not change
 for that chart and obviously it does not change for any non-active
 charts linked charts.

 Lock means lock - do not change the symbol.

 Best regards,
 Tomasz Janeczko
 amibroker.com
 - Original Message - 
 From: sidhartha70 sidharth...@...
 To: amibroker@yahoogroups.com
 Sent: Sunday, July 12, 2009 1:36 PM
 Subject: [amibroker] Re: AmiBroker 5.26.5 BETA released


 TJ,

 I've noticed what I think is a bug in the implementation of the symbol 
 lock.

 In a nutshell, if you have a series of 'interval linked' charts, when 
 symbol lock is implemented in any of those charts, the
 interval linking no longer works from that chart with the symbol lock 
 turned on.


 --- In amibroker@yahoogroups.com, reinsley reinsley@ wrote:
 
 
 
  Thank you TJ.
 
  Lock is ok with floating windows.
 
  A clear icon with a lock open and a lock close will be a plus.
  The functionnality is great.
 
  Best regards
 
 
 
  sidhartha70 a écrit :
  
  
  
   I largely agree with Sanjiv's suggestions.
  
   Whatever you decide TJ, symbol lock is a great addition.
  
   --- In amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com,
   sumangalam sumangalam@ wrote:

 Thanks for your views,

 I will prefer to have it part of Symbol Link menu with Visual Cue
   of a LOCK. That might save many support questions later. Better
   Discoverability, Intuitive suggestion of usage and Saved Chart space 
   are
   the reasons for my opinion.

 Incidentally, saving on Chart Space is an area where you have a
   dedicated version upgrade with more chart space as theme. It might be
   possible to have around 15%-20% more chart space with a few changes,
   which could be a breeze for a virtuoso like you. I was thiking of
   sending an email with my thought about that. If you suggest, I will 
   send
   the details.

 As we see Google Chrome and Adobe Reader version 9, it seems world 
   is
   moving towards more usage area. MS Office 2007 did reduce usage space,
   However, Charting Software like AmiBroker may think about giving more
   chart space where possible.

 Oh, I diverged from the main topic of this mesage  please take my
   opinion for merger of Symbol_Lock with Symbol_Link.

 With Regards

 Sanjiv Bansal


 --- In amibroker@yahoogroups.com
   mailto:amibroker%40yahoogroups.com, Tomasz Janeczko groups@ 
   wrote:
 
  Hello,
 
  I was thinking about it and it was first idea to put it on symbol
   link menu,
  however then I thought about scenario when I want to 
   *temporarily* lock
  one window. Then having separate button is quicker than going
   through the menu,
  plus there is immediate and visual cue that window is 
   symbol-locked
   (separate button with pressed state).
 
  To avoid confusion I maight gray (disable) all link options in 
   the
   symbol link sub menu.
 
  Opinions ?
 
  Best regards,
  Tomasz Janeczko
  amibroker.com
  - Original Message -
  From: sumangalam sumangalam@
  To: amibroker@yahoogroups.com 
   mailto:amibroker%40yahoogroups.com
  Sent: Saturday, July 11, 2009 12:15 PM
  Subject: [amibroker] Re: AmiBroker 5.26.5 BETA released
 
 
   Hello Mr. Tomasz Janeczko,
  
   Thanks for the new version. I had been eagerly looking for new
   BETA (Although looking for some other features like support for BIG
   

Re: [amibroker] Re: AmiBroker 5.26.5 BETA released

2009-07-12 Thread Steve Dugas
Hi - I don't use AB with RT data streaming in so never noticed any slowdawn, 
I imagine it could slow down the RT updates but no idea how much...

2. Not sure about insert linked, I use the same code on lots of charts set 
to different tickers, but I just drag/drop them all and then set the ticker. 
I like to plot a copy, then I can play around with it and save it if I want 
without messing up the original...

Anyway, noticed you were having a problem so just thought I would throw it 
out there in case you could use it...  Good luck!

Steve


- Original Message - 
From: sidhartha70 sidharth...@yahoo.com
To: amibroker@yahoogroups.com
Sent: Sunday, July 12, 2009 1:14 PM
Subject: [amibroker] Re: AmiBroker 5.26.5 BETA released


Thanks Steve.

disadvantages I see... (please set me straight if you don't agree!)

1. using foreign() slows code down... it seems to be one of the operations 
in AB that requires a heavier overhead.

2. difficult to use this method when you have he same piece of code (insert 
linked) on 8 charts all looking at different symbols...


--- In amibroker@yahoogroups.com, Steve Dugas sjdu...@... wrote:

 Hi - In case you might find it useful, I often use a little piece of code
 like this to lock in charts for different tickers...

 Steve

 Ticker = ParamStr( Ticker, CURRENT );

 if ( Ticker != CURRENT )

 {

 SetForeign( Ticker, True, True );

 TickerName = Ticker;

 }

 else

 TickerName = Name();

 ...rest of your code...

 Title = TickerName + the rest...

 RestorePriceArrays();




 - Original Message - 
 From: sidhartha70 sidharth...@...
 To: amibroker@yahoogroups.com
 Sent: Sunday, July 12, 2009 12:23 PM
 Subject: [amibroker] Re: AmiBroker 5.26.5 BETA released


 I'm not talking about changing the 'symbol'... I'm talking about changing
 the interval.

 Speaking from my own perspective, symbol lock was a great feature because 
 it
 stopped charts changing 'symbols' erroneously. Which is something that
 happened frequently to me when moving between floating windows 
 non-floating windows.

 However, if in stopping that erroneous behavior I now can't interval link
 charts, that creates a major problem... for obvious reasons. I have 8
 interval linked charts. 4 floating. 4 non floating.
 It's vital that they are interval linked. It's also vital that they don't
 change symbols erroneously.

 I'm not sure I see the logic or advantage of 'symbol lock' disabling
 interval link??

 --- In amibroker@yahoogroups.com, Tomasz Janeczko groups@ wrote:
 
  It is not a bug. It is fully intended operation.
 
  Symbol lock means do not change the symbol for that chart
  If active chart is symbol-locked, the symbol does not change
  for that chart and obviously it does not change for any non-active
  charts linked charts.
 
  Lock means lock - do not change the symbol.
 
  Best regards,
  Tomasz Janeczko
  amibroker.com
  - Original Message - 
  From: sidhartha70 sidhartha70@
  To: amibroker@yahoogroups.com
  Sent: Sunday, July 12, 2009 1:36 PM
  Subject: [amibroker] Re: AmiBroker 5.26.5 BETA released
 
 
  TJ,
 
  I've noticed what I think is a bug in the implementation of the symbol
  lock.
 
  In a nutshell, if you have a series of 'interval linked' charts, when
  symbol lock is implemented in any of those charts, the
  interval linking no longer works from that chart with the symbol lock
  turned on.
 
 
  --- In amibroker@yahoogroups.com, reinsley reinsley@ wrote:
  
  
  
   Thank you TJ.
  
   Lock is ok with floating windows.
  
   A clear icon with a lock open and a lock close will be a plus.
   The functionnality is great.
  
   Best regards
  
  
  
   sidhartha70 a écrit :
   
   
   
I largely agree with Sanjiv's suggestions.
   
Whatever you decide TJ, symbol lock is a great addition.
   
--- In amibroker@yahoogroups.com 
mailto:amibroker%40yahoogroups.com,
sumangalam sumangalam@ wrote:
 
  Thanks for your views,
 
  I will prefer to have it part of Symbol Link menu with Visual 
Cue
of a LOCK. That might save many support questions later. Better
Discoverability, Intuitive suggestion of usage and Saved Chart space
are
the reasons for my opinion.
 
  Incidentally, saving on Chart Space is an area where you have a
dedicated version upgrade with more chart space as theme. It might 
be
possible to have around 15%-20% more chart space with a few changes,
which could be a breeze for a virtuoso like you. I was thiking of
sending an email with my thought about that. If you suggest, I will
send
the details.
 
  As we see Google Chrome and Adobe Reader version 9, it seems 
world
is
moving towards more usage area. MS Office 2007 did reduce usage 
space,
However, Charting Software like AmiBroker may think about giving 
more
chart space where possible.
 
  Oh, I diverged from the main topic of this mesage  please take 
my

Re: [amibroker] how to feed data from tdameritrade (quotetracker)

2009-07-06 Thread Steve Dugas
Hi - There is currently no TDAM plugin and as far as I know TJ is not 
writing one.  If you are a programmer, perhaps you could use their API docs 
to write one, or the easier approach would be to turn on QT's internal 
server, feed TDAM data into QT, and then follow the directions in AB's user 
guide to feed the data from QT into AB.

Steve


- Original Message - 
From: oldfairy chenna...@gmail.com
To: amibroker@yahoogroups.com
Sent: Monday, July 06, 2009 2:34 AM
Subject: [amibroker] how to feed data from tdameritrade (quotetracker)


 Hi, I have amibroker and TDameritrade (quotetracker) account.

 Recently I got some API file from their forum.

 Someone told me that I could feed amibroker with its data and get 2 year 
 introday data.


 But I am not very familiar with both. Can someone tell me how to feed the 
 data?

 Thank you very much



 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links



 




Re: [amibroker] Auto trading with TD AMERITRADE

2009-07-06 Thread Steve Dugas
Hi - Please see my earlier post that I just sent a minute ago.

Steve

- Original Message - 
From: livinloud_1104 kapishmoh...@yahoo.com
To: amibroker@yahoogroups.com
Sent: Sunday, July 05, 2009 12:22 PM
Subject: [amibroker] Auto trading with TD AMERITRADE


 Hello,

 I am looking for an answer for my question; do we have any plug-in for 
 auto trading with TD AMERITRADE?

 I use only AB for analysis, and I spent significant time in developing a 
 trading system with AFL, and I want to make use of it and keep it 
 improving.
 Interactive Broker plug-in is good and can give access to markets 
 everywhere, but is there any plug-in for TD AMERITRADE or any other broker 
 for US and international markets? Anything under development?



 Thanks




 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links



 




[amibroker] Attachments

2009-07-05 Thread Steve Dugas
Hi TJ - Don't know how you or the others feel about it, but if you are 
interested, here are some instructions I saw that allows a group owner to 
change their preferences so that full attachments are sent out again instead of 
only links to them. I always liked receiving the full attachments.   8 - )



To change the settings so attachments are treated as they were before recent 
changes go to YahooGroups Website:

The specific instructions are listed below (from Groups help):

 ... if you prefer the old approach of having the full attachments 
distributed with emails, group owners (and moderators with the power to change 
group settings) can switch back to the old approach at any time. To do so:


  a.. Click Management in the left hand navigation 
  b.. Click Messages under Group Settings. 
  c.. Click Edit next to Posting and Archives 
  d.. In the Attachments section, choose Include in emails (exclude from site) 
  e.. Click the Save button at the bottom of the page.


Re: [amibroker] No quotesplus plugin

2009-06-17 Thread Steve Dugas
Hi - If I remember right, I *think* it will only show up if you already have 
QP installed when you install AmiBroker.  Also FYI, Gary at QP has updated 
TJ's plugin to give you a choice of either their old IRL sector / industry 
assignments or thier new Morningstar structure. In fact I beleive that TJ's 
plugin will not import the Morningstar tickers at all, you will need Gary's 
version to get those tickers into AB. You can try this...

Go to http://quotes-plus.com/joomla/index.php?option=com_frontpageItemid=1
Then select Support  Program Intaller to download the plugin installer.

Not sure if that will cause the plugin to appear when setting up your DB but 
worth a try and it is a good plugin to have anyway.  Good luck...

Steve


- Original Message - 
From: CSTrader cstrader...@cstrader.com
To: amibroker@yahoogroups.com
Sent: Wednesday, June 17, 2009 8:26 AM
Subject: [amibroker] No quotesplus plugin


I was thinking of getting some futures data from QuotesPlus, but that 
plugin
 doesn't show when I try to create a new EOD database.  I'm a registered 
 user
 with 5.20.  I see the QP2.dll in the plugins folder.  Thanks



 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links



 




Re: [amibroker] Re: A question of style

2009-06-17 Thread Steve Dugas
I find this little utility almost indispensible when tweaking different 
versions of my AFL's, and it's free to boot!

http://download.cnet.com/Files-Compare-Tool/3000-2248_4-10315688.html


  - Original Message - 
  From: James 
  To: amibroker@yahoogroups.com 
  Sent: Wednesday, June 17, 2009 10:16 PM
  Subject: Re: [amibroker] Re: A question of style





  Speaking of cleaning up files, is there a way to compare two AFL files and 
have the editor show you the differences? Sometimes I get going so fast with 
different variations and I am putting a v1, v2, v3 etc. at the end of the file 
name, then sometime later I come back to that idea and it can be difficult to 
find what exactly I was doing. A program to automatically compare two files 
would be useful.

  James




--
  From: brian_z111 brian_z...@yahoo.com
  To: amibroker@yahoogroups.com
  Sent: Wednesday, June 17, 2009 6:04:41 PM
  Subject: [amibroker] Re: A question of style


  A lot of the heavy hitters collect and archive code from this forum etc and 
manage their snippets via third party software  I assume they cut/copy and 
paste snippets as required e.g. Herman and others use Infoselect.

  --- In amibro...@yahoogrou ps.com, brian_z111 brian_z111@ ... wrote:
  
   So far I haven't had the need for long algorithms, or a lot of them, but I 
have found that maintaining AFL files lacks a few tools.
   
   Admittedly I am a messy worker and only saved by the fact that I don't 
archive other peoples code and don't archive all of my own forever.
   
   Up until now I have just relied on creating folder hierarchies and using 
the P_XYZ convention, etc, to delineate which files are primarily written as an 
indicator or scan etc.
   
   On top of that I have experimented with creating templates, with some all 
purpose code pre-written in them, but not as an #include.
   
   #includes seems like one of the 'logical' options  the algorithmic 
traders seem to go down that path. 
   
   I imagine that this also requires some ongoing management and possibly the 
need to remember what is in each #include template, as well as tracking 
versions, adding deleting new stuff as required  I am generally opposed to 
continually adding tasks to my computer maintenance list.
   
   I am not sure if there are any execution implications that flow on from 
always loading up, at preprocessing, if you aren't going to use most of what is 
loaded (seems to be massive overkill).
   
   
   
   Three things seem to be lacking from my perspective:
   
   - finding the file you want from amongst a large number of files/folders 
... AB needs the ability to search amongst the AFL files to find the file that 
has certain code in it
   
   
   - custom auto complete (like an excel macro that we assign to a key).
   
   One solution might be to use another editor, to get the benefit of search 
and customcomplete, but then any useful features in the AFLEditor will be lost 
and new maintenance issues created.
   
   For me the only two features of the AFLEditor I would miss are syntax 
checking and synchronisation between the current edit and the charts (I use 
apply indicator and watch the indicator to see how my code changes change the 
plot quite a bit ... if it wasn't for that basic need I would change editors).
   
   
   --- In amibro...@yahoogrou ps.com, ics4mer ics4mer@ wrote:
   

Hi all,

Just wondering how people out there are organising their
AFL code between plots, backtests, explorations etc.

Lets say I have 5 indicators which each require 50 lines 
of code to draw a plot, in other words too large to 
maintain in separate AFL files.

Lets say I also want them all in a single exploration.

So logically it seems that I should place each indicator 
into an include file and include that into each of the AFL
types so I'd have include myTA_Tool.h  in my b_backtest, 
e_exploration, and p_plot files?

Just wondering how everybody else is handling this?

RZ
   
  







  

Re: [amibroker] How to code a Adaptive StDev()

2009-06-13 Thread Steve Dugas
How to code a Adaptive StDev()Hi Herman - Not sure how fast it would be but 
possibly something along these lines?





function xStDev( priceArray, Periods) // Periods  25

{

   global BBTop, BBBot;

   Periods = Max( 2, Min( 25, Periods ) );

   BreakPoint = Min( 25, Highest( Periods ));

   for( i = 2; i = BreakPoint; i++ )

   {

  VarSet( SD + i, StDev( PriceArray, i );

   }

   AdaptSD = 0;
   for( i = 2; i = BreakPoint; i++ )

   {

  CurrSD = VarGet( SD + i );

  AdaptSD = IIF( Periods == i, CurrSD, AdaptStDev );

   }


return AdaptSD;

}





- Original Message - 

  From: Herman 
  To: AmiBroker User Group 
  Sent: Saturday, June 13, 2009 6:42 AM
  Subject: [amibroker] How to code a Adaptive StDev()





  Would anyone have coded an adaptive StDev? I am using the solution below but 
is is VERY slow and the number of max period value is limited.




  My math is just not up to this and any help would be very much appreciated!




  have a great day,

  Herman




  function xStDev( priceArray, Periods) // Periods  25

  {

 global BBTop, BBBot;

 Periods = Min( 25, periods );

 Periods = Max( 2, Periods);

 Deviation =

 IIf( Periods == 2, StDev( PriceArray, 2 ),

 IIf( Periods == 3, StDev( PriceArray, 3 ),

 IIf( Periods == 4, StDev( PriceArray, 4 ),

 IIf( Periods == 5, StDev( PriceArray, 5 ),

 IIf( Periods == 6, StDev( PriceArray, 6 ),

 IIf( Periods == 7, StDev( PriceArray, 7 ),

 IIf( Periods == 8, StDev( PriceArray, 8 ),

 IIf( Periods == 9, StDev( PriceArray, 9 ),




 IIf( Periods == 10, StDev( PriceArray, 10 ),

 IIf( Periods == 11, StDev( PriceArray, 11 ),

 IIf( Periods == 12, StDev( PriceArray, 12 ),




 IIf( Periods == 13, StDev( PriceArray, 13 ),

 IIf( Periods == 14, StDev( PriceArray, 14 ),

 IIf( Periods == 15, StDev( PriceArray, 15 ),




 IIf( Periods == 16, StDev( PriceArray, 16 ),

 IIf( Periods == 17, StDev( PriceArray, 17 ),

 IIf( Periods == 18, StDev( PriceArray, 18 ),




 IIf( Periods == 19, StDev( PriceArray, 19 ),

 IIf( Periods == 20, StDev( PriceArray, 20 ),

 IIf( Periods == 21, StDev( PriceArray, 21 ),




 IIf( Periods == 22, StDev( PriceArray, 22 ),

 IIf( Periods == 23, StDev( PriceArray, 23 ),

 IIf( Periods == 24, StDev( PriceArray, 24 ),

 StDev( PriceArray, 25 ;

 return Deviation;

  }




  

Re: [amibroker] How to code a Adaptive StDev()

2009-06-13 Thread Steve Dugas
How to code a Adaptive StDev()Oops!  Just saw a typo, should be this insread...





function xStDev( priceArray, Periods) // Periods  25

{

   global BBTop, BBBot;

   Periods = Max( 2, Min( 25, Periods ) );

   BreakPoint = Min( 25, Highest( Periods ));

   for( i = 2; i = BreakPoint; i++ )

   {

  VarSet( SD + i, StDev( PriceArray, i );

   }

   AdaptSD = 0;
   for( i = 2; i = BreakPoint; i++ )

   {

  CurrSD = VarGet( SD + i );

  AdaptSD = IIF( Periods == i, CurrSD, AdaptSD );

   }


return AdaptSD;

}





  - Original Message - 
  From: Steve Dugas 
  To: amibroker@yahoogroups.com 
  Sent: Saturday, June 13, 2009 1:20 PM
  Subject: Re: [amibroker] How to code a Adaptive StDev()





  Hi Herman - Not sure how fast it would be but possibly something along these 
lines?





  function xStDev( priceArray, Periods) // Periods  25

  {

 global BBTop, BBBot;

 Periods = Max( 2, Min( 25, Periods ) );

 BreakPoint = Min( 25, Highest( Periods ));

 for( i = 2; i = BreakPoint; i++ )

 {

VarSet( SD + i, StDev( PriceArray, i );

 }

 AdaptSD = 0;
 for( i = 2; i = BreakPoint; i++ )

 {

CurrSD = VarGet( SD + i );

AdaptSD = IIF( Periods == i, CurrSD, AdaptStDev );

 }


  return AdaptSD;

  }

  Would anyone have coded an adaptive StDev? I am using the solution below but 
is is VERY slow and the number of max period value is limited.




  My math is just not up to this and any help would be very much appreciated!




  have a great day,

  Herman




  function xStDev( priceArray, Periods) // Periods  25

  {

 global BBTop, BBBot;

 Periods = Min( 25, periods );

 Periods = Max( 2, Periods);

 Deviation =

 IIf( Periods == 2, StDev( PriceArray, 2 ),

 IIf( Periods == 3, StDev( PriceArray, 3 ),

 IIf( Periods == 4, StDev( PriceArray, 4 ),

 IIf( Periods == 5, StDev( PriceArray, 5 ),

 IIf( Periods == 6, StDev( PriceArray, 6 ),

 IIf( Periods == 7, StDev( PriceArray, 7 ),

 IIf( Periods == 8, StDev( PriceArray, 8 ),

 IIf( Periods == 9, StDev( PriceArray, 9 ),




 IIf( Periods == 10, StDev( PriceArray, 10 ),

 IIf( Periods == 11, StDev( PriceArray, 11 ),

 IIf( Periods == 12, StDev( PriceArray, 12 ),




 IIf( Periods == 13, StDev( PriceArray, 13 ),

 IIf( Periods == 14, StDev( PriceArray, 14 ),

 IIf( Periods == 15, StDev( PriceArray, 15 ),




 IIf( Periods == 16, StDev( PriceArray, 16 ),

 IIf( Periods == 17, StDev( PriceArray, 17 ),

 IIf( Periods == 18, StDev( PriceArray, 18 ),




 IIf( Periods == 19, StDev( PriceArray, 19 ),

 IIf( Periods == 20, StDev( PriceArray, 20 ),

 IIf( Periods == 21, StDev( PriceArray, 21 ),




 IIf( Periods == 22, StDev( PriceArray, 22 ),

 IIf( Periods == 23, StDev( PriceArray, 23 ),

 IIf( Periods == 24, StDev( PriceArray, 24 ),

 StDev( PriceArray, 25 ;

 return Deviation;

  }




  

Re: [amibroker] How to code a Adaptive StDev()

2009-06-13 Thread Steve Dugas
Hi Dennis - I don't know that it works in every situation,  I would guess that 
maybe VarSet/Get handles the conversion internally?

Steve

  - Original Message - 
  From: Dennis Brown 
  To: amibroker@yahoogroups.com 
  Sent: Saturday, June 13, 2009 2:25 PM
  Subject: Re: [amibroker] How to code a Adaptive StDev()




  Steve,


  I did not realize that I could append a number to a string in AFL without 
converting it first with NumToStr( i, 0.0).  
  It looks like I have been missing a big shortcut all this time.


  BR,
  Dennis


  On Jun 13, 2009, at 1:26 PM, Steve Dugas wrote:





Oops!  Just saw a typo, should be this insread...




function xStDev( priceArray, Periods) // Periods  25
{
   global BBTop, BBBot;
   Periods = Max( 2, Min( 25, Periods ) );
   BreakPoint = Min( 25, Highest( Periods ));
   for( i = 2; i = BreakPoint; i++ )
   {
  VarSet( SD + i, StDev( PriceArray, i );
   }
   AdaptSD = 0;
   for( i = 2; i = BreakPoint; i++ )
   {
  CurrSD = VarGet( SD + i );
  AdaptSD = IIF( Periods == i, CurrSD, AdaptSD );
   }

return AdaptSD;
}




  - Original Message -
  From: Steve Dugas
  To: amibroker@yahoogroups.com
  Sent: Saturday, June 13, 2009 1:20 PM
  Subject: Re: [amibroker] How to code a Adaptive StDev()


  Hi Herman - Not sure how fast it would be but possibly something along 
these lines?




  function xStDev( priceArray, Periods) // Periods  25
  {
 global BBTop, BBBot;
 Periods = Max( 2, Min( 25, Periods ) );
 BreakPoint = Min( 25, Highest( Periods ));
 for( i = 2; i = BreakPoint; i++ )
 {
VarSet( SD + i, StDev( PriceArray, i );
 }
 AdaptSD = 0;
 for( i = 2; i = BreakPoint; i++ )
 {
CurrSD = VarGet( SD + i );
AdaptSD = IIF( Periods == i, CurrSD, AdaptStDev );
 }

  return AdaptSD;
  }
  Would anyone have coded an adaptive StDev? I am using the solution below 
but is is VERY slow and the number of max period value is limited.


  My math is just not up to this and any help would be very much 
appreciated!


  have a great day,
  Herman


  function xStDev( priceArray, Periods) // Periods  25
  {
 global BBTop, BBBot;
 Periods = Min( 25, periods );
 Periods = Max( 2, Periods);
 Deviation =
 IIf( Periods == 2, StDev( PriceArray, 2 ),
 IIf( Periods == 3, StDev( PriceArray, 3 ),
 IIf( Periods == 4, StDev( PriceArray, 4 ),
 IIf( Periods == 5, StDev( PriceArray, 5 ),
 IIf( Periods == 6, StDev( PriceArray, 6 ),
 IIf( Periods == 7, StDev( PriceArray, 7 ),
 IIf( Periods == 8, StDev( PriceArray, 8 ),
 IIf( Periods == 9, StDev( PriceArray, 9 ),


 IIf( Periods == 10, StDev( PriceArray, 10 ),
 IIf( Periods == 11, StDev( PriceArray, 11 ),
 IIf( Periods == 12, StDev( PriceArray, 12 ),


 IIf( Periods == 13, StDev( PriceArray, 13 ),
 IIf( Periods == 14, StDev( PriceArray, 14 ),
 IIf( Periods == 15, StDev( PriceArray, 15 ),


 IIf( Periods == 16, StDev( PriceArray, 16 ),
 IIf( Periods == 17, StDev( PriceArray, 17 ),
 IIf( Periods == 18, StDev( PriceArray, 18 ),


 IIf( Periods == 19, StDev( PriceArray, 19 ),
 IIf( Periods == 20, StDev( PriceArray, 20 ),
 IIf( Periods == 21, StDev( PriceArray, 21 ),


 IIf( Periods == 22, StDev( PriceArray, 22 ),
 IIf( Periods == 23, StDev( PriceArray, 23 ),
 IIf( Periods == 24, StDev( PriceArray, 24 ),
 StDev( PriceArray, 25 ;
 return Deviation;
  }








  

Re: [amibroker] Re: Walk Forward Testing - Varies by Computer?

2009-06-06 Thread Steve Dugas
Hi Howard - between QP and Norgate, just wondering if you ever followed up on 
the differences in data and if you found one to be noticably cleaner than the 
other? Thanks very much!

Steve

  - Original Message - 
  From: Howard B 
  To: amibroker@yahoogroups.com 
  Sent: Saturday, June 06, 2009 12:41 PM
  Subject: Re: [amibroker] Re: Walk Forward Testing - Varies by Computer?




  Greetings --

  Check the settings being used.

  And test runs can be surprisingly sensitive to small differences in the data 
being used.  I regularly find significant differences between runs made using 
Norgate Premium data and Quotes Plus data, although when I plot the two price 
series, I cannot see obvious differences.  

  Thanks,
  Howard


  On Thu, Jun 4, 2009 at 5:03 PM, toddk63 todd...@yahoo.com wrote:




I just debugged a similar problem. Same system, same database, different 
answer. Turned out to be the Limit Trade Size option on the Settings dialog 
box. Default is 10, I need to set it to 0. I wish there were a function like 
SetOption(LimitTradeSize), but there is not...



--- In amibroker@yahoogroups.com, jacklweinberg jacklweinb...@... wrote:


 Question: 
 How is it possible for a walkforward test to produce different results on 
two different computers?
 Background:
 1. AB program, database, system, watchlist, walkforward settings etc. are 
on a usb key that is moved from one computer to another.
 2. Before the walk forward test, the same walkforward settings file is 
loaded. The same system is executed. The results are also put into the same usb 
key.
 
 Why do two different computers produce different results? (and strangely 
enough, very different results!)







  

[amibroker] Backtester / Optimizer Take Multipe Codes?

2009-06-06 Thread Steve Dugas
Hi TJ / All - I just was wondering if you think it might be possible / 
desirable someday to make the backtester / optimizer work like the charting 
currently works, i.e. instead of PICK one code to work with, we could ADD a 
code and then ADD one or more additional codes, and they would be kept seperate 
by Section_Begin / Section_End and the earlier codes could set static vars that 
are then accessed by the later codes, etc. This functionality is very handy in 
the charts and it would be great if it were also possible to optimize in a 
similar way. If you think the idea has any merit I will gladly add a 
suggestion, just thought I would try it here first to see if anyone else thinks 
they might find this useful. Thanks very much!

Steve

Re: [amibroker] Re: Newbie Array / Looping Question

2009-06-05 Thread Steve Dugas
Hi - There is a page in the users guide that lists which functions will 
accept an array for the Periods arg, the rest expect a constant...

http://www.amibroker.com/guide/a_varperiods.html

Steve

- Original Message - 
From: brian_z111 brian_z...@yahoo.com
To: amibroker@yahoogroups.com
Sent: Friday, June 05, 2009 3:00 AM
Subject: [amibroker] Re: Newbie Array / Looping Question


 snipMedian() wants a number as its second argument. (The manual is 
 clear!)snip

 To help me understand next time ... how did you decide that 
 Median)array,period) wants a number from what is written in the manual?


 MA(array,periods); accepts an array and the only differential in the 
 manual is plurality of the periods (do you think Tomasz intended the 
 plurality to be significant?)

 MA(C,Cum(1));//this is OK?

 snip When are the for loops executed in the block of code? Knowing 
 some more about the AFL execution order might be helpful.snip

 Sorry, don't know anything about execution.

 Recently Siddhartha said that learning the AFL execution was the best 
 thing we can ever do ... I don't know where to find it though.


 You are not keen on my suggestion that calcs for the moments are 
 arithmetic and so should fly in AFL without looping?
 I am a lay programmer but my instinct is to start there - looping will 
 slow you down in RT indicators???


 Plan C - use the RMath Plugin ... advanced stats available there.

 --- In amibroker@yahoogroups.com, i cs ics4...@... wrote:

 Hi Brian,

 Thanks for getting back to me.

 Unfortunately, Cum() returns array, Median() wants a number as its
 second argument. (The manual is clear!)

 I used median as an example because it's relatively easy to understand,
 and I will be using it, but I will also be plotting the growth factor in 
 the same
 way - as well as the other moments of distribution - just one step at a 
 time.

 Its possible to derive a lot of the moments of distribution from other 
 the
 parts, but it comes back to the same problem - I'd have to write 
 functions
 to derive kurtosis, mode etc.

 Some of the historic emails in the group included the following 
 solutions:
   - code the functions myself - which I'm trying to avoid.
   - create a dynamic set of variables using VarSet - this seems a bit 
 brutish
  especially if you are playing with a number of profile attributes.

 When are the for loops executed in the block of code? Knowing some more
 about the AFL execution order might be helpful. Might go down that track 
 for
 a whileand check out the other 1500 references to loop in the email
 group.

 Thanks again...
 Robert Z





 
 From: brian_z111 brian_z...@...
 To: amibroker@yahoogroups.com
 Sent: Friday, 5 June, 2009 2:57:43 PM
 Subject: [amibroker] Re: Newbie Array  / Looping Question





 I am not sure about this one now ... I think we need some help from the 
 code/maths experts.

 Median() doesn't appear to accept an array as input (the manual doesn't 
 say one way or another?) ... it might be demanding a constant (that 
 wouldn't surprize me since mean/mode/median are moments of a distribution 
 so massive calcs might be required to find them for skewed dists without 
 having the distriution at hand) ... AB doesn't do that distributions off 
 the shelf ... not AFAIK.

 I think you can calc Skewness from N, StDev, arithmetic mean etc ... once 
 you have S you can back calc the Median or the Mode from the Mean and the 
 StDev.

 Another brute method might be an algorithmic trial and error test for the 
 Mode (loops required)... I forget what it is called in programming but if 
 the value to the right of the mean has a higher frequency than the mean 
 value the mode is somewhere to the right .. by halving the range between 
 the freq test you will zero in on the mode and then you can calc the 
 median by using the mean and mode values. AFAIK array processing will 
 always be more timely than looping though.

 --- In amibro...@yahoogrou ps.com, brian_z111 brian_z111@ ... wrote:
 
  Median(array, periods)
 
  I assume you are measuring, say ROC(C,1) or similar for % price change.
  I guess you just need to get a progressive count, of the number of ROC 
  datapoints, to make the function work.
 
  Things to look out for (if the AB function is going to work for you):
 
  - every element in the array you are measuring needs a value (nulls or 
  zeros might trip up the math e.g. STDev, mean) ... I guess if you are 
  interested in daily bars you will first create a daily ROC(C,1) or ROC 
  of some other point of interest from within the bar HL range
  - the number of periods, in your array count, is range dependent i.e. 
  in AB it can vary with mode ... QuickAFL can be used to change the 
  range (in AA) and QickAFL will autoset the range in charts (or might 
  ... I am not the full bottle on QuickAFL but there is an article by 
  Tomasz in the AB KnowledgeBase)
  - BarsSince type functions might count one less 

Re: [amibroker] Peakbars

2009-06-02 Thread Steve Dugas
Hi - it uses the Zig function to determine the peaks, so change is the % 
change needed for a new legs of the zig zag. See Zig function for more 
details.

Steve

- Original Message - 
From: lucianomt lucian...@gmail.com
To: amibroker@yahoogroups.com
Sent: Tuesday, June 02, 2009 4:16 PM
Subject: [amibroker] Peakbars


 What exactly is the second parameter in Peakbars? The manual says Change, 
 but how exactly does that work?

 SYNTAX peakbars(ARRAY, change, n = 1)



 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links



 




Re: [amibroker] Question re price field parameter

2009-05-30 Thread Steve Dugas
I believe that TJ initializes his ParamField variable to -1, which is the first 
plot on the chart, and that name is added at the bottom of the param list. Try 
editing the default name of the original price plot to TEST to see what I 
mean.

Steve 
  - Original Message - 
  From: Tony Grimes 
  To: amibroker@yahoogroups.com 
  Sent: Saturday, May 30, 2009 2:34 PM
  Subject: Re: [amibroker] Question re price field parameter




  Verified - Works on my machine as described.


  On Sat, May 30, 2009 at 2:09 PM, James jamesmemp...@yahoo.com wrote:





Can someone please verify if this is just happening to me? Just drop the 
Amibroker simple MA from the charts onto a price chart and see if there are two 
Close in the price field parameter drop down box. If this is normal, why are 
there two close fields to choose from? 

James





From: James jamesmemp...@yahoo.com
To: amibroker@yahoogroups.com
Sent: Friday, May 29, 2009 3:06:10 PM
Subject: [amibroker] Question re price field parameter



 I have found that if I drop a moving average into a price chart, I am 
getting two Close in the price field parameter. Can anyone confirm they are 
seeing the same and if so explain why there are 2 Close price fields? 

This does not cause a problem until I start using formulas that use 
setTimeFrame.

James








  

Re: [amibroker] How to increment dates in a for loop?

2009-05-12 Thread Steve Dugas
I would think you could associate your dates to BarIndex() and increment that 
by 100, something like...

BegISbar = Valuewhen(  DateNum() == BegISdate, BarIndex() );
EndISbar = Valuewhen(  DateNum() == EndISdate, BarIndex() );
...
for (FromISbarNum = BegISbar; FromISbarNum = EndISbar; FromISbarNum = 
FromISbarNum + StepIS)

  - Original Message - 
  From: ozzyapeman 
  To: amibroker@yahoogroups.com 
  Sent: Tuesday, May 12, 2009 8:18 PM
  Subject: [amibroker] How to increment dates in a for loop?




  Hello, hoping someone can point out a good method for incrementing dates. I 
am currently trying to build a basic Walk-Forward engine that does an 
Optimization on In-Sample (IS) data using one formula, followed by an 
Optimization on Out-Of-Sample (OOS) data using a second formula.  

  This is different than AB's built-in WF engine, which performs an 
Optimization, followed by a Backtest using only one formula.

  Anyway, I am currently stuck right at the beginning, trying to figure out a 
sensible way to increment dates. This is what I have so far:

  // datenum format:   1 * (year - 1900) + 100 * month + day, 
  // so 2001-12-31 becomes 1011231 and 1995-12-31 becomes 951231

  BegISdate  = 1031201;
  EndISdate  = 1090201;
  StepIS = 100;

  BegOOSdate = 1050101;
  EndOOSdate = 1090301;
  StepOOS= 100;

  Formula1   = F:\\formula1.afl;
  Formula2   = F:\\formula2.afl;
  Database   = F:\\AB Databases\\MyDB;
  Settings   = F:\\My Settings.ABS;


  for (FromISdateNum = BegISDate; FromISdateNum = EndISdate; FromISdateNum = 
FromISdateNum + StepIS)
{

AB = CreateObject(Broker.Application); 

// Etc. .

  Now the above won't exactly work because simply adding 100 to a datenum will 
not allow the datenum to correctly roll over from December to January. For 
example, incrementing 1031201 by 100 yields 1031301 instead of 1040101.

  I know I can first convert the datenum to a string, then build a parser that 
splits the datenum apart and analyzes the last four digits, converting 1301 to 
0101, then reconstitute the string and reconvert to a datenum again. But that 
all feels rather convoluted.

  Is there an easier way to increment dates in AFL? I've searched the help 
manual and can't seem to find anything. What if I first converted to DateTime 
format? Is there an easy way to step through that format month by month?

  Any pointers much appreciated.

  And when I complete the WF Opt-Opt engine, I will be happy to post it here, 
in case anyone else has a need for it.

  Thanks!



  

Re: [amibroker] What Can't Amibroker Do?

2009-04-30 Thread Steve Dugas
A couple of things I have been wanting for years that have not made it into 
AB yet -

1. Ability to use the Equity() line as feedback when trading NDO. The value 
of the current bar's equity changes when new data is downloaded and it 
becomes the next-to-last bar, causing signals to disappear or appear a day 
late. Would require a tweak to the Equity() function I guess...

2. Ability to do individual opts on a watchlist and then be able to *sort by 
ticker*  I have added a seperate column ( via CBT ) for only the ticker 
symbol but it won't sort when I click on the header..

I will just mention them once a year or so until TJ runs out of other things 
to do...   8 - )

Steve

- Original Message - 
From: caternore catern...@yahoo.com
To: amibroker@yahoogroups.com
Sent: Thursday, April 30, 2009 6:36 PM
Subject: [amibroker] What Can't Amibroker Do?


 Hello All,

 I have been trading my own account for about the last eight or so years. 
 I have gone through the typical cycle of people getting into trading 
 (buying advice, buying black box system, looking for the holy grail, etc) 
 and losing money the whole time.  Recently ( last 4 years or so) I have 
 become moderately successful with a intermediate to long term trend 
 following system that I use on stocks.  However I could never break that 
 barrier to ultimate success  (consistency).  I have come to relies (right 
 or wrongly)  that a system is more than a pair of entry and exit rules it 
 must account for money management and position sizing as well(if you guys 
 would like to add anything that cool).   I also relies the limited 
 capabilities in my  (then) current software program Metastock.  With 
 Metastock I had no way to thoroughly back test all of my ideas over a 
 portfolio of stock to see what would happened.  I had no way to program 
 inside Metastock the various rules that I used to trade stocks.   I 
 believe that of all the things that lead to my inconsistent performance, 
 the lack of the proper software was probably number 2 contributor  to my 
 current situation (number 1 is me lol).

 As a result I have been researching charting and back testing software, 
 that I could use to auto trade from for about the last 6 months or so.  My 
 requirements for the new software are in order of importance.

 1)  True Portfolio-Level Back testing.   But also with the capabilities to 
 back test a full system ( entry, exit, money management, position sizing, 
 etc).

 2)  A good charting interface.

 3) The ability to Auto trade through my broker.

 In addition to the above I was also looking for

 1) I needed a program with its own language but robust enough not to limit 
 me.  As I am not a programmer,  I did not want to learn a computer 
 language (c+ etc) for the next 3 or 4 years before I could program my 
 system.  But at the same I am willing to learn.

 2) Software that can be extended and molded to what I need it to do.

 3) A good community of people to bounce Ideas off of and to interact with.

 After reading what I could online I decided to buy a few book by a MR. 
 Bandy and ask a few question on this board.  To my surprise it seems as if 
 Amibroker not only meets these criteria but exceeds them.  Which leads me 
 to my question.  What Cant Amibroker do?  Put another way what are the 
 limitation inherent in Amibroker?

 Thank You
 ACE




 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links



 




Re: [amibroker] individual optimization

2009-04-22 Thread Steve Dugas
Hmm... I really don't know, it runs fine on my computer as you can see in the 
pic I sent...
Perhaps you made an error when editing the JS file?
Maybe you need to get the latest version of Windows Script Host? Just 
guessing...

  - Original Message - 
  From: jim fenster 
  To: amibroker@yahoogroups.com 
  Sent: Wednesday, April 22, 2009 3:56 PM
  Subject: Re: [amibroker] individual optimization




Thanks alot. I renamed thefile so it ends in js. Now I did what you 
said but when I try and
run it I get Windows Scripts host error. Saying Line 5, Char 27 
expected';'
Microsoft Jscript compilation error. Is there something Im doing wrong?

--- On Wed, 4/22/09, Steve Dugas sjdu...@comcast.net wrote:


  From: Steve Dugas sjdu...@comcast.net
  Subject: Re: [amibroker] individual optimization
  To: amibroker@yahoogroups.com
  Received: Wednesday, April 22, 2009, 3:24 PM



  Hi Jim - First load the AFL file into AA - it is just a little sample 
system but you can replace it with your own once you get it running.  Then edit 
the JS file ( you can use Notepad ) so it uses your desired watchlist, lookback 
pd, etc - all the options are commented, hopefully well enough to  understand 
it.  Then run the JS file - to do that, I added it to AmiBroker's Tools menu ( 
right-click menu bar, select customize, add it to tools ( see attached pic ).


- Original Message - 
From: jim fenster 
To: amibro...@yahoogrou ps.com 
Sent: Wednesday, April 22, 2009 2:07 PM
Subject: Re: [amibroker] individual optimization


  Im a bit of a noob, but how do I use this? Which one do I 
load into AA?I never used jscript before.  I tried changing the second one to 
.js and running it and I get syntax errors. Im guessing cuz its not AFL. 

  --- On Tue, 4/21/09, Steve Dugas sjdu...@comcast. net wrote:


From: Steve Dugas sjdu...@comcast. net
Subject: Re: [amibroker] individual optimization
To: amibro...@yahoogrou ps.com
Received: Tuesday, April 21, 2009, 8:08 PM



Hi - You can try these, there are some directions at the 
top of the codes. You need to rename the .jsabc file back to .js ( jscript ).  
Only problem is you can't sort by ticker, you can see where I tried to add a 
sortable column via CBT for just the ticker but couldn't get it to work at the 
time...
( please let me know if you manage to get that part 
working..   8 - )

Steve

  - Original Message - 
  From: jim fenster 
  To: amibro...@yahoogrou ps.com 
  Sent: Tuesday, April 21, 2009 6:39 PM
  Subject: [amibroker] individual optimization


I am trying to run an individual optimization on 
all the stocks in my watchlist number 1. 
I have searched through the archives and tried 
copying whatever is in there to my AA script page and nothing seems to work. Is 
there any standard script that I can copy and paste thats available anywhere? 
It would just take way too long to do them one by one. 

Thanks,

Jim

   


--
  Be smarter than spam. See how smart SpamGuard is at 
giving junk email the boot with the All-new Yahoo! Mail  






Yahoo! Canada Toolbar : Search from anywhere on the web and 
bookmark your favourite sites. Download it now! 
   


--
  Ask a question on any topic and get answers from real people. Go to Yahoo! 
Answers. 


  

Re: [amibroker] individual optimization

2009-04-21 Thread Steve Dugas
Hi - You can try these, there are some directions at the top of the codes. You 
need to rename the .jsabc file back to .js ( jscript ).  Only problem is you 
can't sort by ticker, you can see where I tried to add a sortable column via 
CBT for just the ticker but couldn't get it to work at the time...
( please let me know if you manage to get that part working..   8 - )

Steve

  - Original Message - 
  From: jim fenster 
  To: amibroker@yahoogroups.com 
  Sent: Tuesday, April 21, 2009 6:39 PM
  Subject: [amibroker] individual optimization




I am trying to run an individual optimization on all the stocks in my 
watchlist number 1. 
I have searched through the archives and tried copying whatever is in 
there to my AA script page and nothing seems to work. Is there any standard 
script that I can copy and paste thats available anywhere? It would just take 
way too long to do them one by one. 

Thanks,

Jim

   


--
  Be smarter than spam. See how smart SpamGuard is at giving junk email the 
boot with the All-new Yahoo! Mail 


  

Individual Optimize.afl
Description: Binary data


Individual Optimize.jsabc
Description: Binary data


Re: [amibroker] OT: Driver Scanner

2009-04-09 Thread Steve Dugas
Hi Ara - If you mean one of those apps that automatically tells you whenever a 
newer version of your software/drivers is available, I tried a couple of those 
over the years. Both times I eventually screwed up my computer by installing a 
newer driver that they found and recommended.  My attitude now is if it ain't 
broke, don't fix it, especially where drivers are concerned.  Of course as 
Keith mentioned, if it already is broke I suppose it might be worth a try.  
Good luck!

Steve
  - Original Message - 
  From: Keith McCombs 
  To: amibroker@yahoogroups.com 
  Sent: Thursday, April 09, 2009 5:06 AM
  Subject: Re: [amibroker] OT: Driver Scanner




  I use DriverAgent.  I was able to get my laptop working properly when all 
else failed.  Was it worth it to me -- Yep!

  I forgot how much it cost -- must run a free scan first to find the price.  I 
hate that.  Usually walk right on by companies that do that.  I usually don't 
trust them.

  Ara Kaloustian wrote: 

Does anyone use a driver scanner to update drivers?

Is it worth having one?  ($29.95)

I am looking at Uniblue DriverScanner anyone familiar with it?

I ran a scan with the unregistered version and 21 of my 96 drivers are not 
the latest version ... 

Thanks

Ara



  

Re: [amibroker] Re: Discretionary Equity

2009-03-30 Thread Steve Dugas
Done.

- Original Message - 
From: ang_60 ima_c...@yahoo.it
To: amibroker@yahoogroups.com
Sent: Monday, March 30, 2009 5:39 AM
Subject: [amibroker] Re: Discretionary Equity


 --- In amibroker@yahoogroups.com, Steve Dugas sjdu...@... wrote:

 Hi - I was playing with TJ's discretionary equity code from a few years 
 ago and made some changes, just thought I would post in case anyone might 
 find it useful. Your discretionary trades will be lost when you shut down 
 AB but I am having fun with it so may figure out how to write the trades 
 to disk


 Hi Steve,

 could you store your AFL code in the FILES section, as just people 
 receiving mail by mail messages can see the attachements?

 Thanks,

 Angelo.




 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links



 




Re: [amibroker] Re: Discretionary Equity

2009-03-30 Thread Steve Dugas
Thank you Blair!

Steve

- Original Message - 
From: Blair snoopy.p...@gmail.com
To: amibroker@yahoogroups.com
Sent: Monday, March 30, 2009 4:26 PM
Subject: [amibroker] Re: Discretionary Equity


 -Steve et All:

 For your variables, you might want to check out the UKB article 2.13 
 Persistent variables.

 Here is the direct link: 
 http://www.amibroker.org/userkb/2007/04/24/persistent-variables/

 ALSO, try to check out Dennis Brown's Flexible Parameters.  Can't find the 
 link right now, but he has built an interface that might meet your needs.

 Good Luck and Good Trading
 Blair




 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links



 




Re: [amibroker] BarsSince Question

2009-03-28 Thread Steve Dugas
First it finds the HHV(C,126).  Presumably that will be a positive number 
( i.e., TRUE ) on every bar, including the current bar, so BarsSince reports 
0 bars since it was last true. Plotting the arrays can show you step-by-step 
how it arrives there...

Steve D

- Original Message - 
From: steve_almond m...@steveal.gotadsl.co.uk
To: amibroker@yahoogroups.com
Sent: Saturday, March 28, 2009 10:10 AM
Subject: [amibroker] BarsSince Question


I was trying to calculate the number of bars since the highest close of the 
last 126 trading days.

 This seems to work:

 A1=(HHVBars(C,126));

 But this doesn't (it always returns 0):

 A1=BarsSince(HHV(C,126));

 Why does that not work?

 Steve



 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links



 




Re: [amibroker] Re: Performance of anti virus programs

2009-03-26 Thread Steve Dugas
Hi TJ - I'm sure you are correct, I just mentioned it because I thought 
perhaps your earlier findings on Norton...

  He has shown that Norton anti virus program takes more time
  (and hence machine gets slower) compared to other programs.

may not be applicable now due to their recent improvements. Thanks!

Steve


- Original Message - 
From: Tomasz Janeczko gro...@amibroker.com
To: amibroker@yahoogroups.com
Sent: Thursday, March 26, 2009 12:11 PM
Subject: Re: [amibroker] Re: Performance of anti virus programs


 No matter what antivirus is used, it is always recommended
 to turn OFF virus checking on DATA files, especially inside
 AmiBroker database folders, because no matter how antivirus is written,
 checking data files by antivirus can slow the performance of scans
 by factor of 10. Checking data files anyway has no sense because
 the data are never executed.

 Best regards,
 Tomasz Janeczko
 amibroker.com
 - Original Message - 
 From: Steve Dugas sjdu...@comcast.net
 To: amibroker@yahoogroups.com
 Sent: Thursday, March 26, 2009 4:53 PM
 Subject: Re: [amibroker] Re: Performance of anti virus programs


 Hi - FWIW, the latest Norton product has been seriously reworked and the
 improvments have gotten some pretty good reviews, better than the 2009
 versions of most other security suites.  Much less of a drag on the 
 system
 now, and they want to prove it to you so they have added this monitor so 
 you
 can look at the CPU load and how much of it is attributable to NIS.  Just
 thought I would pass it along FYI...

 Steve

 - Original Message - 
 From: Mike sfclimb...@yahoo.com
 To: amibroker@yahoogroups.com
 Sent: Thursday, March 26, 2009 1:43 AM
 Subject: [amibroker] Re: Performance of anti virus programs


 But only about 30 written by TJ :)

 Most likely candidate is this:
 http://finance.groups.yahoo.com/group/amibroker/message/123867

 P.S. I'm always logged in, and I still get many many many failed 
 searches.

 Mike

 --- In amibroker@yahoogroups.com, Paul Ho paul.t...@... wrote:

 The server is always busy for those who dont bother to log in.
 login first and do the search and you will get the result. Just checked
 myself. There are 214 hits with Norton anti virus.

 --- In amibroker@yahoogroups.com, umrperumal umrperumal@ wrote:
 
  Hi,
 
  In one of his messages, TJ has given a detailed analysis of 
  performance
  of various anti virus programs with respect to time taken for each
  process.   He has shown that Norton anti virus program takes more 
  time
  (and hence machine gets slower) compared to other programs.
 
  I am not able to get hold of that msg since yahoo group search engine
  always reports server busy error and i am not able to see the
  message.
 
  Can TJ or anybody has any pointer to the msg.  Thanks in advance
 
  Perumal
 





 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links






 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links






 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links



 




Re: [amibroker] SETFOREIGN does not give me the correct answer ...

2009-03-24 Thread Steve Dugas
Hi - I don't believe SetForeign resizes the arrays, I think it just 
overwrites the contents.  I ran into that in the past,  I think what I did 
was to set the current ticker to an index or something with a very long 
history and then search for the first non-null value.  Might want to do a 
quick plot of the foreign values though just to be sure...

Steve

- Original Message - 
From: amsiev ton.sieverd...@scarlet.be
To: amibroker@yahoogroups.com
Sent: Tuesday, March 24, 2009 12:08 PM
Subject: [amibroker] SETFOREIGN does not give me the correct answer ...


 Let's take 3 ETF's : AAXJ,BWV and EWN. I want to get the start date, first 
 close etc. of each time series by using SetForeign. What's wrong with the 
 following code ? It looks as if AB is using the selected symbol and not 
 the symbol from the SETFOREIGN ... Must be something very simple but ...

 SetBarsRequired(sbrAll,sbrAll);

 SetForeign(AAXJ);
 printf(Symbol +Name()+\n);
 printf(First Close +WriteVal(Close[0])+\n);
 printf(Last Close +WriteVal(Close[BarCount-1])+\n);
 printf(Total Bars +WriteVal(BarCount-1)+\n);
 printf(Start Date +WriteVal( BeginValue( DateTime() ), 
 formatDateTime )+\n);

 SetForeign(BWV);
 printf(Symbol +Name()+\n);
 printf(First Close +WriteVal(Close[0])+\n);
 printf(Last Close +WriteVal(Close[BarCount-1])+\n);
 printf(Total Bars +WriteVal(BarCount-1)+\n);
 printf(Start Date +WriteVal( BeginValue( DateTime() ), 
 formatDateTime )+\n);

 SetForeign(EWN);
 printf(Symbol +Name()+\n);
 printf(First Close +WriteVal(Close[0])+\n);
 printf(Last Close +WriteVal(Close[BarCount-1])+\n);
 printf(Total Bars +WriteVal(BarCount-1)+\n);
 printf(Start Date +WriteVal( BeginValue( DateTime() ), 
 formatDateTime )+\n);

 Regards, Ton.



 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

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

 Yahoo! Groups Links



 




Re: [amibroker] Discretionary Equity

2009-03-22 Thread Steve Dugas
Hi Jon, thank you. If you mean to use it on RT data Monday, I don't think it 
will work unless you are using daily bars and just updating the last bar.  I 
said the sigs will stick on the same dates for all tickers, but what I meant 
is that it actually sticks to the bar that is X bars from the end of the 
array. The original code used BarIndex() to keep track of the signals ( i.e., 
X bars from the *beginning* ), that didn't work for scrolling through a 
watchlist because the histories of the tickers start on different dates, so I 
just switched to counting from the end instead so the sigs will stay at X bars 
ago from the current bar for all tickers. It works for me because I only have 
EOD data and I know I will lose the sigs each night anyway, but if I end up 
making the sigs persistent I will try to attach them to the actual dates...

BTW, I have never made anything persistent before but I was looking into it 
this morning. It looks to me like I could use the file input/output functions 
or perhaps the Osaka plugin. Also I could try to save the signal arrays 
themselves or just a list of signals with corresponding dates. I was wondering 
if anyone with some experience here might be able to suggest which way they 
think would be best in terms of speed, convenience, flexibility, etc?  Also any 
code snippets would always be welcome!  8 - )   Thanks for any advice!

Steve

  - Original Message - 
  From: Jan Riek 
  To: amibroker@yahoogroups.com 
  Sent: Saturday, March 21, 2009 8:52 PM
  Subject: Re: [amibroker] Discretionary Equity


Very Nice Steve, thank you for the improvements, very nice.  I use 
Discretionary Equity every day, will give it a try Monday (the next trading 
day).

Jon


--- On Sat, 3/21/09, Steve Dugas sjdu...@comcast.net wrote:

  From: Steve Dugas sjdu...@comcast.net
  Subject: [amibroker] Discretionary Equity
  To: Yahoo - AmiBroker amibroker@yahoogroups.com
  Date: Saturday, March 21, 2009, 6:41 PM


  Hi - I was playing with TJ's discretionary equity code from a few 
years ago and made some changes, just thought I would post in case anyone might 
find it useful. Your discretionary trades will be lost when you shut down AB 
but I am having fun with it so may figure out how to write the trades to disk  
For now changes include -

  1. BH equity begins at first trade entry for better comparison.
  2. Can now reverse position on single bar with one click.
  3. Charts will take foreign tickers now.
  4. Static vars now named using chart ID instead of ticker so can have 
different charts for different tickers or trade series. Also, with ticker set 
to CURRENT, can scroll thru a watchlist to compare profits and sigs will now 
stick to the same dates for all tickers.
  5. Some other little stuff I can't remember...8 - ) 




  

Re: [amibroker] Discretionary Equity

2009-03-22 Thread Steve Dugas
Hi - Sent this post out this morning, never came thru so figured I would try 
again. Also the code I posted was quite slow, I profiled it and here is a 
faster version.

Steve

---

Hi Jon, thank you. If you mean to use it on RT data Monday, I don't think it 
will work unless you are using daily bars and just updating the last bar.  I 
said the sigs will stick on the same dates for all tickers, but what I meant 
is that it actually sticks to the bar that is X bars from the end of the 
array. The original code used BarIndex() to keep track of the signals ( i.e., 
X bars from the *beginning* ), that didn't work for scrolling through a 
watchlist because the histories of the tickers start on different dates, so I 
just switched to counting from the end instead so the sigs will stay at X bars 
ago from the current bar for all tickers. It works for me because I only have 
EOD data and I know I will lose the sigs each night anyway, but if I end up 
making the sigs persistent I will try to attach them to the actual dates...

BTW, I have never made anything persistent before but I was looking into it 
this morning. It looks to me like I could use the file input/output functions 
or perhaps the Osaka plugin. Also I could try to save the signal arrays 
themselves or just a list of signals with corresponding dates. I was wondering 
if anyone with some experience here might be able to suggest which way they 
think would be best in terms of speed, convenience, flexibility, etc?  Also any 
code snippets would always be welcome!  8 - )   Thanks for any advice!

Steve

  - Original Message - 
  From: Jan Riek 
  To: amibroker@yahoogroups.com 
  Sent: Saturday, March 21, 2009 8:52 PM
  Subject: Re: [amibroker] Discretionary Equity


Very Nice Steve, thank you for the improvements, very nice.  I use 
Discretionary Equity every day, will give it a try Monday (the next trading 
day).

Jon


--- On Sat, 3/21/09, Steve Dugas sjdu...@comcast.net wrote:

  From: Steve Dugas sjdu...@comcast.net
  Subject: [amibroker] Discretionary Equity
  To: Yahoo - AmiBroker amibroker@yahoogroups.com
  Date: Saturday, March 21, 2009, 6:41 PM


  Hi - I was playing with TJ's discretionary equity code from a few 
years ago and made some changes, just thought I would post in case anyone might 
find it useful. Your discretionary trades will be lost when you shut down AB 
but I am having fun with it so may figure out how to write the trades to disk  
For now changes include -

  1. BH equity begins at first trade entry for better comparison.
  2. Can now reverse position on single bar with one click.
  3. Charts will take foreign tickers now.
  4. Static vars now named using chart ID instead of ticker so can have 
different charts for different tickers or trade series. Also, with ticker set 
to CURRENT, can scroll thru a watchlist to compare profits and sigs will now 
stick to the same dates for all tickers.
  5. Some other little stuff I can't remember...8 - ) 




  

Discretionary Equity - Mine.afl
Description: Binary data


[amibroker] Discretionary Equity

2009-03-21 Thread Steve Dugas
Hi - I was playing with TJ's discretionary equity code from a few years ago and 
made some changes, just thought I would post in case anyone might find it 
useful. Your discretionary trades will be lost when you shut down AB but I am 
having fun with it so may figure out how to write the trades to disk  For now 
changes include -

1. BH equity begins at first trade entry for better comparison.
2. Can now reverse position on single bar with one click.
3. Charts will take foreign tickers now.
4. Static vars now named using chart ID instead of ticker so can have different 
charts for different tickers or trade series. Also, with ticker set to CURRENT, 
can scroll thru a watchlist to compare profits and sigs will now stick to the 
same dates for all tickers.
5. Some other little stuff I can't remember...8 - )

Discretionary Equity - Mine.afl
Description: Binary data
attachment: screenshot1.png

Re: [amibroker] AmiBroker 5.23.0 BETA released

2009-03-04 Thread Steve Dugas
Hi TJ - Haven't had a chance to try the new column features yet but just wanted 
to say thank you, it looks like a great solution that you implemented !!

BTW ( for anyone who might know ), is there going to be an AB conference this 
year?  I thought it was usually in Feb but Feb is gone now and haven't seen any 
mention of it. Thanks!

Steve
  - Original Message - 
  From: Tomasz Janeczko 
  To: amibroker@yahoogroups.com 
  Sent: Wednesday, March 04, 2009 12:42 PM
  Subject: Re: [amibroker] AmiBroker 5.23.0 BETA released


  Hello,

  Yes it is intended. Optimization params are not built-in columns. 
  They are USER-defined columns that vary from optimization to optimization 
(because number
  of params does change).

  Read Me says:

  Storing column state [ ... ] The widths, ordering and visibility of all 
built-in columns in automatic-analysis is stored between runs.


  BUT THEN...

  AFL: SetOption(ExtraColumnsLocation, col) - this new option allows the 
user to change the location of custom columns added during backtest/optimization

  extra columns mean:
  a) any custom metrics added using custom backtester
  b) any optimization parameters defined using Optimize() function 

  If both custom metrics and optimization parameters are present then
  custom metrics appear first then optimization parameters

  This function is provided to allow the user to change the default at the 
end location of custom columns/optimization parameters.
  For example

  SetOption(ExtraColumnsLocation, 1 );

  will cause that custom metrics and opt params will be subsequently added 
starting from column 1 (as opposed to last column default)

  Note that this setting changes visual order of columns, not really 
in-memory order or export order, so
  exported data files or copy/paste format do not change.


  Best regards,
  Tomasz Janeczko
  amibroker.com
- Original Message - 
From: David Fitch 
To: amibroker@yahoogroups.com 
Sent: Wednesday, March 04, 2009 4:50 PM
Subject: Re: [amibroker] AmiBroker 5.23.0 BETA released


In AA Optimization Mode the parameters being optimized will not stay in 
position set in Column Setup. For example, moving the parms to say the first 
columns and then running the same optimization (full optimization) results in 
the parms columns being repositioned to default position at end of window.
Is this as intended ?
Thanks
Dave


  - Original Message - 
  From: Tomasz Janeczko 
  To: amibroker@yahoogroups.com 
  Sent: Wednesday, March 04, 2009 4:34 AM
  Subject: [amibroker] AmiBroker 5.23.0 BETA released



  Hello,

  AmiBroker 5.23.0 BETA released
  http://www.amibroker.com/devlog/2009/03/04/amibroker-5230-beta-released/

  CHANGES AS compared to 5.22.0
  - Font used by progress window, string input, tip of the day, search file 
is now MS Shell Dlg (the same as elsewhere in AB) that means that is CoolType 
friendly (TTF) 
  - AFL: SetOption(ExtraColumnsLocation, col) - this new option allows 
the user to change the location of custom columns added during 
backtest/optimization 
  - Implemented hiding columns in all list views (right click over list 
view HEADER to bring Setup Columns dialog) 
  - Storing column state (widths/ordering/visibility) in automatic analysis 
implemented 
  - Data Window implemented (available from View-Data Window menu) 
  - Home key was working incorrectly when more than one pane was used in 
the chart. Fixed 
  - Implemented simple performance monitor Tools-Performance Monitor 
  - TimeSales window now shows some recent statistics regarding trading

  Among other things you can now hide selected columns in all list-views,
  by clicking with right mouse button over list-view header and choosing 
Column Setup.
  In the setup dialog you can uncheck any column to hide it.




  Best regards,
  Tomasz Janeczko
  amibroker.com




  Column setup.gif

Re: [amibroker] Retrieving DB name via AFL

2009-03-02 Thread Steve Dugas
GetDatabaseName()

- Original Message - 
From: sidhartha70 sidharth...@yahoo.com
To: amibroker@yahoogroups.com
Sent: Monday, March 02, 2009 4:43 PM
Subject: [amibroker] Retrieving DB name via AFL


 Hi All,
 
 Is there a way of returning the current DB name via AFL...?
 
 TIA
 
 
 
 
 
  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.
 
 TO GET TECHNICAL SUPPORT send an e-mail directly to 
 SUPPORT {at} amibroker.com
 
 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)
 
 For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
 http://www.amibroker.com/devlog/
 
 Yahoo! Groups Links
 
 
 




Re: [amibroker] Creating a Year over Year comparison screen

2009-02-13 Thread Steve Dugas
Hi - That is an idea, let me look at it over the long weekend, maybe I can add 
it.

Steve
  - Original Message - 
  From: Snoopy 
  To: amibroker@yahoogroups.com 
  Sent: Thursday, February 12, 2009 9:44 PM
  Subject: Re: [amibroker] Creating a Year over Year comparison screen


  Steve,

  Thanks for the tool, and the update.

  In doing more work, I am now trying to see if it is possible to plot the data 
based on a Percentage style chart.

  i.e. get the Year High and the Year Low, then Plot the Close on each day as a 
percentage of the range for the year.

  Doing this for multiple years is (so far)  beyond my AFL programming 
abilities.

  Any ideas or suggestions would be greatly appreciated.


  -- 
  Snoopy 
  Still trying to shoot down that Red Baron




  

Re: [amibroker] Re: Creating a Year over Year comparison screen

2009-02-11 Thread Steve Dugas
Hi - If the params look weird, that sounds like AB thinks it is all one code 
and there are dup names in the params - perhaps it is not adding the 
Section_Begin and Section_End lines?  Before going further, can you dragging 
and dropping all copies to the chart?  That's what I do and so far so good  
Thanks!

  - Original Message - 
  From: MarkK 
  To: amibroker@yahoogroups.com 
  Sent: Wednesday, February 11, 2009 2:16 PM
  Subject: RE: [amibroker] Re: Creating a Year over Year comparison screen


  Steve 

  Yes of course

  First running prof v 5.20

   

  I open up a tap and put the seasonality.afl in and it shows one chart ( line) 
and I set it for the time period I want
  then I go to charts and click on the Seasonality.afl and click overlay, the 
parameters window opens up but it is blank, I close it open it up again and 
have two sets of parameters one for each year and set the last one

  Then I go back again and click on seasonality.afl click on overlay and then 
the parameters box opens again blank and on the header instead of having three 
seasonality's there now there are four lines.  I close the parameters box and 
then open it again and only have two Seasonality there to set 

   

  Attached is the chart I end up on the third overlay along with the Parameters 
box and the updated afl too

   

  Thank you for your help

   

   

  MarkK

   

   

  From: amibroker@yahoogroups.com [mailto:amibro...@yahoogroups.com] On Behalf 
Of Steve Dugas
  Sent: Wednesday, February 11, 2009 2:08 PM
  To: amibroker@yahoogroups.com
  Subject: Re: [amibroker] Re: Creating a Year over Year comparison screen

   

  Hi Mark - I jusr checked mine, it is still working fine with 12 copies 
dropped on the same chart.  If you can be more specific about what is happening 
I could try to work with you to fix it...

   

  Steve

- Original Message - 

From: MarkK 

To: amibroker@yahoogroups.com 

Sent: Wednesday, February 11, 2009 1:28 PM

Subject: RE: [amibroker] Re: Creating a Year over Year comparison screen

 

Steve,

 

Great code

Question

Is there a reason why I may not be able to apply more than two of the alf's 
at a time?

I open one then overlay another and on the third one it will not work 
anymore

 

Thank you

 

 

Markk

 

 

 

 

From: amibroker@yahoogroups.com [mailto:amibro...@yahoogroups.com] On 
Behalf Of Steve Dugas
Sent: Sunday, January 25, 2009 7:11 PM
To: Yahoo - AmiBroker
Subject: [amibroker] Re: Creating a Year over Year comparison screen

 

Hi - I was looking at that old Seasonality chart today and decided to make 
a 
couple of improvements. New code is below. Changes ( shown in attached pic 
) 
are
1. new title format
2. can set to foreign ticker now
2. scroll current year backward, then match dates to see projected market 
direction from other years
3. setting begin/end values shows color-coded performance for that period 
in 
the title

No more changes coming so it is safe to upgrade if you want. 8 - )

***
// Seasonality

SetBarsRequired( sbrAll, sbrAll );

SetChartOptions( 0, chartShowDates );

Ticker = ParamStr( Ticker, CURRENT );

ShiftBars = Param( Shift Bars, 0, -5200, 5200, 1 );

UpColor = ParamColor( Up Color, colorSkyblue );

DownColor = ParamColor( Down Color, colorBlue );

UnchColor = ParamColor( Unch Color, colorWhite );

Style = ParamStyle( Style, styleLine, maskAll );

NewLine = ParamToggle( New Title Line, No|Yes, 1 );

GraphZOrder = ParamToggle( GraphZOrder, 0|1, 1 );

GraphXSpace = Param( GraphXSpace, 0, 0, 100, 1);

if ( Ticker == CURRENT )

{

TickerPrice = Close;

TickerName = Name();

}

else

{

TickerPrice = Foreign( Ticker, close );

TickerName = Ticker;

}

if ( NewLine )

NewTitleLine = \n;

else

NewTitleLine = ;

ShiftedClose = Ref( TickerPrice, -ShiftBars );

YestShiftedClose = Ref( ShiftedClose, -1 );

Color = IIf( ShiftedClose  YestShiftedClose, UpColor, IIf( ShiftedClose  
YestShiftedClose, DownColor, UnchColor ) );

if ( ShiftBars  0 AND SelectedValue( BarIndex() ) = BarCount + ShiftBars )

ChartDate = FUTURE;

else

ChartDate = NumToStr( Ref( Year(), -ShiftBars ), 1.0 ) + -

+ NumToStr( Ref( Month(), -ShiftBars ), 1.0 ) + -

+ NumToStr( Ref( Day(), -ShiftBars ), 1.0 );

TickerPctChg = ( EndValue( ShiftedClose ) - BeginValue( ShiftedClose ) ) / 
BeginValue( ShiftedClose ) * 100;

if ( BeginValue( BarIndex() ) == 0 )

{

TickerPctChgStr = N/A;

TickerPctChgColor = colorBlack;

}

else

{

TickerPctChgStr = NumToStr( TickerPctChg, 0.1 );

TickerPctChgColor = IIf( TickerPctChg  0, colorBrightGreen, IIf( 
TickerPctChg  0, colorRed, colorWhite

Re: [amibroker] Re: Creating a Year over Year comparison screen

2009-02-11 Thread Steve Dugas
Hi Mark - I just looked at the code you posted, looks like it has some 
Section_Begins but no Section_Ends, that is probably your problem. The original 
code should not have either of these lines, here is a fresh copy.  Try doing 
these steps, which works good for me...

1. Double-click on the AFL, that should pop up a new chart with one line on it.
2. Now drag and drop the same AFL as many times as you want onto the same chart.
3. Open params, click on refrsh, now go ahead and set all params how you want 
them.

Steve
  - Original Message - 
  From: MarkK 
  To: amibroker@yahoogroups.com 
  Sent: Wednesday, February 11, 2009 3:26 PM
  Subject: RE: [amibroker] Re: Creating a Year over Year comparison screen


  Steve,

   

  When I try to drag and drop it is doing the same thing

  Can you send me the afl at an attachment?
  maybe my copy and paste did something to it

   

  Thank you

   

   

  Mark

   

   

   

  From: amibroker@yahoogroups.com [mailto:amibro...@yahoogroups.com] On Behalf 
Of Steve Dugas
  Sent: Wednesday, February 11, 2009 2:36 PM
  To: amibroker@yahoogroups.com
  Subject: Re: [amibroker] Re: Creating a Year over Year comparison screen

   

  Hi - If the params look weird, that sounds like AB thinks it is all one code 
and there are dup names in the params - perhaps it is not adding the 
Section_Begin and Section_End lines?  Before going further, can you dragging 
and dropping all copies to the chart?  That's what I do and so far so good  
Thanks!

   

- Original Message - 

From: MarkK 

To: amibroker@yahoogroups.com 

Sent: Wednesday, February 11, 2009 2:16 PM

Subject: RE: [amibroker] Re: Creating a Year over Year comparison screen

 

Steve 

Yes of course

First running prof v 5.20

 

I open up a tap and put the seasonality.afl in and it shows one chart ( 
line) and I set it for the time period I want
then I go to charts and click on the Seasonality.afl and click overlay, the 
parameters window opens up but it is blank, I close it open it up again and 
have two sets of parameters one for each year and set the last one

Then I go back again and click on seasonality.afl click on overlay and then 
the parameters box opens again blank and on the header instead of having three 
seasonality's there now there are four lines.  I close the parameters box and 
then open it again and only have two Seasonality there to set 

 

Attached is the chart I end up on the third overlay along with the 
Parameters box and the updated afl too

 

Thank you for your help

 

 

MarkK

 

 

From: amibroker@yahoogroups.com [mailto:amibro...@yahoogroups.com] On 
Behalf Of Steve Dugas
Sent: Wednesday, February 11, 2009 2:08 PM
To: amibroker@yahoogroups.com
Subject: Re: [amibroker] Re: Creating a Year over Year comparison screen

 

Hi Mark - I jusr checked mine, it is still working fine with 12 copies 
dropped on the same chart.  If you can be more specific about what is happening 
I could try to work with you to fix it...

 

Steve

  - Original Message - 

  From: MarkK 

  To: amibroker@yahoogroups.com 

  Sent: Wednesday, February 11, 2009 1:28 PM

  Subject: RE: [amibroker] Re: Creating a Year over Year comparison screen

   

  Steve,

   

  Great code

  Question

  Is there a reason why I may not be able to apply more than two of the 
alf's at a time?

  I open one then overlay another and on the third one it will not work 
anymore

   

  Thank you

   

   

  Markk

   

   

   

   

  From: amibroker@yahoogroups.com [mailto:amibro...@yahoogroups.com] On 
Behalf Of Steve Dugas
  Sent: Sunday, January 25, 2009 7:11 PM
  To: Yahoo - AmiBroker
  Subject: [amibroker] Re: Creating a Year over Year comparison screen

   

  Hi - I was looking at that old Seasonality chart today and decided to 
make a 
  couple of improvements. New code is below. Changes ( shown in attached 
pic ) 
  are
  1. new title format
  2. can set to foreign ticker now
  2. scroll current year backward, then match dates to see projected 
market 
  direction from other years
  3. setting begin/end values shows color-coded performance for that period 
in 
  the title

  No more changes coming so it is safe to upgrade if you want. 8 - )

  ***
  // Seasonality

  SetBarsRequired( sbrAll, sbrAll );

  SetChartOptions( 0, chartShowDates );

  Ticker = ParamStr( Ticker, CURRENT );

  ShiftBars = Param( Shift Bars, 0, -5200, 5200, 1 );

  UpColor = ParamColor( Up Color, colorSkyblue );

  DownColor = ParamColor( Down Color, colorBlue );

  UnchColor = ParamColor( Unch Color, colorWhite );

  Style = ParamStyle( Style, styleLine, maskAll );

  NewLine

Re: [amibroker] Re: Creating a Year over Year comparison screen

2009-02-11 Thread Steve Dugas
Well, here is one last thought - you could try renaming the AFL by removing the 
leading underscore. I only mention it because the _Section_Begin and End's  
start with an underscore, so possibly it could be triggering some sort of 
unwanted behavior...just a thought...

Once you have dropped a few copies onto the chart, try opening the chart code 
to see if AB added the Section_Begin and Section_End's in the right places - if 
not you could try adding them yourself to see what happens...

  - Original Message - 
  From: MarkK 
  To: amibroker@yahoogroups.com 
  Sent: Wednesday, February 11, 2009 3:55 PM
  Subject: RE: [amibroker] Re: Creating a Year over Year comparison screen


  Steve,

   

  There must be something wrong with my computer

  I am getting the same issue when I drag the afl the third time

   

   

  MarkK

   

   

   

   

  From: amibroker@yahoogroups.com [mailto:amibro...@yahoogroups.com] On Behalf 
Of Steve Dugas
  Sent: Wednesday, February 11, 2009 3:47 PM
  To: amibroker@yahoogroups.com
  Subject: Re: [amibroker] Re: Creating a Year over Year comparison screen

   

  Hi Mark - I just looked at the code you posted, looks like it has some 
Section_Begins but no Section_Ends, that is probably your problem. The original 
code should not have either of these lines, here is a fresh copy.  Try doing 
these steps, which works good for me...

   

  1. Double-click on the AFL, that should pop up a new chart with one line on 
it.

  2. Now drag and drop the same AFL as many times as you want onto the same 
chart.

  3. Open params, click on refrsh, now go ahead and set all params how you want 
them.

   

  Steve

- Original Message - 

From: MarkK 

To: amibroker@yahoogroups.com 

Sent: Wednesday, February 11, 2009 3:26 PM

Subject: RE: [amibroker] Re: Creating a Year over Year comparison screen

 

Steve,

 

When I try to drag and drop it is doing the same thing

Can you send me the afl at an attachment?
maybe my copy and paste did something to it

 

Thank you

 

 

Mark

 

 

 

From: amibroker@yahoogroups.com [mailto:amibro...@yahoogroups.com] On 
Behalf Of Steve Dugas
Sent: Wednesday, February 11, 2009 2:36 PM
To: amibroker@yahoogroups.com
Subject: Re: [amibroker] Re: Creating a Year over Year comparison screen

 

Hi - If the params look weird, that sounds like AB thinks it is all one 
code and there are dup names in the params - perhaps it is not adding the 
Section_Begin and Section_End lines?  Before going further, can you dragging 
and dropping all copies to the chart?  That's what I do and so far so good  
Thanks!

 

  - Original Message - 

  From: MarkK 

  To: amibroker@yahoogroups.com 

  Sent: Wednesday, February 11, 2009 2:16 PM

  Subject: RE: [amibroker] Re: Creating a Year over Year comparison screen

   

  Steve 

  Yes of course

  First running prof v 5.20

   

  I open up a tap and put the seasonality.afl in and it shows one chart ( 
line) and I set it for the time period I want
  then I go to charts and click on the Seasonality.afl and click overlay, 
the parameters window opens up but it is blank, I close it open it up again and 
have two sets of parameters one for each year and set the last one

  Then I go back again and click on seasonality.afl click on overlay and 
then the parameters box opens again blank and on the header instead of having 
three seasonality's there now there are four lines.  I close the parameters box 
and then open it again and only have two Seasonality there to set 

   

  Attached is the chart I end up on the third overlay along with the 
Parameters box and the updated afl too

   

  Thank you for your help

   

   

  MarkK

   

   

  From: amibroker@yahoogroups.com [mailto:amibro...@yahoogroups.com] On 
Behalf Of Steve Dugas
  Sent: Wednesday, February 11, 2009 2:08 PM
  To: amibroker@yahoogroups.com
  Subject: Re: [amibroker] Re: Creating a Year over Year comparison screen

   

  Hi Mark - I jusr checked mine, it is still working fine with 12 copies 
dropped on the same chart.  If you can be more specific about what is happening 
I could try to work with you to fix it...

   

  Steve

- Original Message - 

From: MarkK 

To: amibroker@yahoogroups.com 

Sent: Wednesday, February 11, 2009 1:28 PM

Subject: RE: [amibroker] Re: Creating a Year over Year comparison screen

 

Steve,

 

Great code

Question

Is there a reason why I may not be able to apply more than two of the 
alf's at a time?

I open one then overlay another and on the third one it will not work 
anymore

 

Thank you

 

 

Markk

Re: [amibroker] Re: Broker and bank reliability: leave trading?

2009-02-09 Thread Steve Dugas
Hi - I was really worried about this stuff a few months ago when the whole 
world started collapsing and did a bit of research.  I ended up distributing my 
funds better, I have it divided between 4 brokers now, a real PITA for trading 
but at least only 25% of the funds are at risk with any one broker.  Also ( for 
US traders ),  I looked for brokers with cash sweeps because in response to an 
email from me, SIPC told me that they consider money in a MMF to be invested, 
and as such covered up to $500K, whereas straight cash is only covered up to 
$100K.  I am thinking that hopefully the MMF crisis is over now, it seems 
people have stopped the run on them and we have some gov't guarantees now...
Also all brokers will point out that they have purchased supplemental insurance 
that will cover you up to $10M or whatever, but in the fine print this is 
subject to an aggregate limit and it looks to me like that limit is much less 
than their total deposits.  Also I learned that the $100K coverage for cash is 
only for cash which the evidence shows is intended for *investing*,  i.e. if 
you have been sitting in cash for a while, or if you have funded a new account 
but haven't done any trading yet,  they might say that the evidence indicates 
that your main purpose is just to earn interest, in which case your cash may 
not be covered at all.  I am definately no authority here but this is what I 
was told by my brokers and by SIPC themselves, if anyone has a different 
understanding I would love to hear it. Thanks!

Steve
  - Original Message - 
  From: Carl Vanhaesendonck 
  To: amibroker@yahoogroups.com 
  Sent: Monday, February 09, 2009 9:56 AM
  Subject: [amibroker] Re: Broker and bank reliability: leave trading?


  Guys,

   

  I appreciate your time and suggestions responding to my post - it is a bit 
clearer to me now that the real risk is (was?) in banks, not in brokers.

  When I mentioned 1 M° USD insurance I was speaking of IB, not the bankers. In 
France indeed it is up to 70,000 EUR, and in Belgium 100,000. 

  Re my parent who lost his deposit: it was in Belgium, and at Citibank. He is 
suing them because for unknown there the 100,000 USD didn't apply. he is suying 
them with hundreds of other investors, it is a grouped action.

  Nevertheless to come back to the risk being in banks, notbrokers: what if the 
bank used by the broker goes bankrupt? Will it really be indemnised when you 
see the billions of dollars of their client deposit??

   

  Risky time, and you were right stating gold lingot in the safebox of the bank 
is NOT insured :-(

   

  Thanks again,

  Carl

   




  

Re: [amibroker] Re: Date Sorting seems odd in Explore

2009-02-06 Thread Steve Dugas
Hi - I didn't try to reproduce your results, but perhaps if you added 3 
seperate columns - Year(),  Month() and Day(), then you could use the Shift 
key to do a multi-coilumn sort?

Steve

- Original Message - 
From: gmorlosky gmorlo...@yahoo.com
To: amibroker@yahoogroups.com
Sent: Friday, February 06, 2009 10:17 AM
Subject: [amibroker] Re: Date Sorting seems odd in Explore


I did confirm that when sorting on date (of any coloumn that
 generates a date) of an Explore, that it is worng.
 Descending sort looks like this:
 30-Jan-2009
 25-Jan-2009
 12-Jan-2009
 04-Feb-2009
 03-Feb-2009

 To me it should start with the lastest Julian date and go backward.

 Any ideas ???

 --- In amibroker@yahoogroups.com, gmorlosky gmorlo...@... wrote:

 I have an explore of 6000 stocks. I descending sort on the default
 Date
 column and oddly Jan 2009 dates come before Feb 2009 dates when in
 descending order, although 04 Feb comes before 03 Feb, which is
 what I
 expect. How does the sort determine date values ?





 

  IMPORTANT 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 *
 TO GET TECHNICAL 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



 




Re: [amibroker] Is it possible to format the added metrics in custom backtester

2009-02-04 Thread Steve Dugas
Hi - from the users guide...

bool AddCustomMetric( string Title, variant Value, [optional] variant 
LongOnlyValue, [optional] variant ShortOnlyValue , [optional] variant 
DecPlaces = 2 )

...code would look something like this, last zero means no decimal places...
bo.AddCustomMetric( MF, boModeFlipCount, 0, 0, 0 );



- Original Message - 
From: huanyanlu huanyan2...@gmail.com
To: amibroker@yahoogroups.com
Sent: Wednesday, February 04, 2009 4:51 AM
Subject: [amibroker] Is it possible to format the added metrics in custom 
backtester



 Hi,

 It is good to be able to add some custom metrics to the backtester
 report, but then I have one question: Is it possible to set the format
 of the added custom metrics ?

 For example, I wrote to add a trade-by-trade metrics of XYZ as follows:


 //=
 ..

  XYZ=.// definition of XYZ

  trade.AddCustomMetric(New metrics XYZ , XYZ);
 ..
 //==


 Later in custome backtest report, I found xyz with format such as 124.00,
 212.00, 505.00, 621.00,etc. But I hope it will show as : 124, 212, 505,
 621,etc.

 I tried
  trade.AddCustomMetric(New metrics XYZ , int(XYZ));

 but the result is the same as the above format with two decimals

 thanks for any help / Huanyan



 

  IMPORTANT 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 *
 TO GET TECHNICAL 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



 




  1   2   3   4   5   >