A little add-on for the TASC tip.
Probably not the best code but it works.
Best regards
_SECTION_BEGIN( "123 Pattern Plot" );
procedure PlotShapeAt( x, y, shape, shift )
{
PlotShapes( IIf( BarIndex() == x, shape, 0 ), colorWhite, 0, y, shift );
}
bi = BarIndex();
upshift = Param( "upshift ", 20, 1, 100, 1 );
if( SelectedValue( PeakBars( Line , ZZPercent ) < TroughBars( Line , ZZPercent ) ) )
{
pt3 = PeakBars( Line , ZZPercent, 1 ) == 0 ;
pt2 = TroughBars( Line , ZZPercent, 1 ) == 0 ;
ydigit1 = H;
ydigit2 = L;
ydigit3 = H;
}
else
{
pt3 = TroughBars( Line , ZZPercent, 1 ) == 0 ;
pt2 = PeakBars( Line , ZZPercent, 1 ) == 0 ;
ydigit1 = L;
ydigit2 = H;
ydigit3 = L;
upshift = -upshift;
}
bpt3 = SelectedValue( ValueWhen( pt3, bi , 2 ) );
bpt2 = SelectedValue( ValueWhen( pt2, bi ) );
bpt1 = SelectedValue( ValueWhen( pt3, bi ) ); // x axis
pltdigit = ParamToggle( "123 Digit Plot ", "Off|On", 1 );
if( pltdigit == 1 )
{
PlotShapeAt( bpt1, ydigit3 , shapeDigit3, upshift );
PlotShapeAt( bpt2, ydigit2 , shapeDigit2, -upshift );
PlotShapeAt( bpt3, ydigit1 , shapeDigit1, upshift );
}
_SECTION_END();
TRADERS' TIPS - JUNE 2013
Posted by: reinsley <reinsley@yahoo.fr>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (5) |
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/
EmoticonEmoticon