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

RE: [amibroker] Re: Creating a Year over Year comparison screen



PureBytes Links

Trading Reference Links

Steve,

 

When I try it manually the first one works fine

The second fine too

The third and so one is the issue

What happens is that I only have two sections on Parameters to change the  Seasonality chart- and there are only two charts though I will have numerous lines in the header all being manipulated by the second header’s parameters

 

Have no idea what the issue is on my computer at this time

 

Thank you for your time on this

 

 

MarkK

 

 

 

From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Steve Dugas
Sent: Wednesday, February 11, 2009 4:19 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Re: Creating a Year over Year comparison screen

 

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

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@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Steve Dugas
Sent: Wednesday, February 11, 2009 3:47 PM
To: amibroker@xxxxxxxxxxxxxxx
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

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

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

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@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] 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" <sjdugas@xxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
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" <reinsley@xxxxxxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> 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 amibroker@xxxxxxxxxxxxxxx, "pacific5_au" <pacific5_au@xxx> wrote:
>>>
>>> Hi Steve
>>>
>>> Could you please post the afl coding in a message. I didn't get the
>>> attachment.
>>>
>>> Many thanks :)
>>>
>>> Pac
>>>
>>>
>>> --- In amibroker@xxxxxxxxxxxxxxx, "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
>>
>>
>>
>>
>



__._,_.___


**** 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

*********************************




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___