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: [email protected] 
  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: [email protected] [mailto:[email protected]] On Behalf 
Of Steve Dugas
  Sent: Wednesday, February 11, 2009 2:36 PM
  To: [email protected]
  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: [email protected] 

    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: [email protected] [mailto:[email protected]] On 
Behalf Of Steve Dugas
    Sent: Wednesday, February 11, 2009 2:08 PM
    To: [email protected]
    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: [email protected] 

      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: [email protected] [mailto:[email protected]] 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 ) );

      }

      Title = VarGetText("Title") + NewTitleLine + EncodeColor( SelectedValue( 
      Color ) ) + TickerName + " Seasonality"

      + EncodeColor( colorBlack ) + " " + ChartDate + " ( " + ShiftBars + " )"

      + EncodeColor( TickerPctChgColor ) + " ( " + TickerPctChgStr + " ) = " + 
      EncodeColor( SelectedValue( Color ) ) + ShiftedClose;

      Plot( ShiftedClose, "Shifted Close", Color, Style );

      ----- Original Message ----- 
      From: "Steve Dugas" <[email protected]>
      To: <[email protected]>
      Sent: Saturday, January 24, 2009 1:31 PM
      Subject: Re: [amibroker] Re: Creating a Year over Year comparison screen

      > Thank you for posting - I was getting my beauty sleep... 8 - )
      >
      >
      > ----- Original Message ----- 
      > From: "reinsley" <[email protected]>
      > To: <[email protected]>
      > Sent: Saturday, January 24, 2009 10:35 AM
      > Subject: [amibroker] Re: Creating a Year over Year comparison screen
      >
      >
      >>
      >>
      >> // Seasonality
      >>
      >> SetChartOptions( 0, chartShowDates );
      >>
      >> 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);
      >>
      >> ShiftedClose = Ref( Close, -ShiftBars );
      >> YestShiftedClose = Ref( ShiftedClose, -1 );
      >>
      >> Color = IIf( ShiftedClose > YestShiftedClose, UpColor, IIf(
      >> ShiftedClose < YestShiftedClose, DownColor, UnchColor ) );
      >> if ( NewLine )
      >> NewTitleLine = "\n";
      >> else
      >> NewTitleLine = "";
      >> Title = VarGetText("Title") + NewTitleLine
      >> + EncodeColor( SelectedValue( Color ) ) + "Seasonality ( " +
      >> ShiftBars + " ) " + NumToStr( Ref( DateNum(), -Shiftbars ), 1.0 );
      >> Plot( ShiftedClose, "Shifted Close", Color, Style );
      >>
      >>
      >>
      >>
      >> --- In [email protected], "pacific5_au" <pacific5...@...> 
wrote:
      >>>
      >>> Hi Steve
      >>>
      >>> Could you please post the afl coding in a message. I didn't get the
      >>> attachment.
      >>>
      >>> Many thanks :)
      >>>
      >>> Pac
      >>>
      >>>
      >>> --- In [email protected], "Steve Dugas" <sjdugas@> wrote:
      >>> >
      >>> > Hi - Here is a little tool I wrote a while back. Drop as many copies
      >>> as you
      >>> > want on the same chart, 1 for each year, then open params and shift
      >>> them by
      >>> > multiples of 250. Then you can fine-tune them to match the dates by
      >>> looking
      >>> > at the chart, which shows bars shifted in parens followed by the
      >>> date in
      >>> > DateNum() format. You can ignore the commas in the date or delete 
the
      >>> > separator in your prefs.
      >>> >
      >>> > HTH.
      >>> > Steve
      >>> >
      >>> >
      >>>
      >>
      >>
      >>
      >> ------------------------------------
      >>
      >> **** 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
      >>
      >>
      >>
      >>
      > 





  

Attachment: _Seasonality.afl
Description: Binary data

Reply via email to