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

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



PureBytes Links

Trading Reference Links


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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

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