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

[amibroker] Re: PlotShapes - help please



PureBytes Links

Trading Reference Links

Thanks Bill,

Here is one piece of code that uses PlotShapes and produces nothing on the chart.


SetChartOptions(0,chartShowArrows);  //I put this to try to unhide arrows!

_N("_DefaultName()");
periods = Param( "Periods", 8, 1, 200, 1 );
Ksmooth = Param( "%K avg", 3, 1, 200, 1 );
Dsmooth = Param( "%D avg", 3, 1, 200, 1 );
upperStochLevel = Param("Stoch High",80,50,95,1);
lowerStochLevel = Param("Stoch Low",20,5,50,1);
fastLine = StochK( periods , Ksmooth);
slowLine = StochD( periods , Ksmooth, DSmooth );
Plot( fastLine, "", ParamColor( "KColor", colorCycle ), ParamStyle("KStyle") );

Plot(slowLine , "", ParamColor( "DColor", colorCycle ), ParamStyle("DStyle") );
Buy = IIf((Ref(fastLine,-1) <= lowerStochLevel) AND Cross(fastLine,slowLine),1,0);
Sell = IIf((Ref(fastLine,-1) >= upperStochLevel) AND Cross(slowLine,fastLine),1,0);

shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes( shape, IIf( Buy, colorGreen, colorRed ), 0, IIf( Buy, fastLine*0.99, fastLine*1.01 ) 
);
GraphXSpace = 10;
AlertIf(Buy,"SOUND C:\\PROGRAM FILES\\AMIBROKER\\ShortHowl.WAV", "Buy"+FullName
());
AlertIf(Sell,"SOUND C:\\PROGRAM FILES\\AMIBROKER\\RevShortHowl.WAV", 
"Sell"+FullName());
/*
"shape = "+WriteVal(shape,4.0);
"sell = "+WriteVal(Sell,4.0);
"buy = "+WriteVal(Buy,4.0);
"fastLine = "+WriteVal(fastline,4.1);
"Ref(fastLine) = "+WriteVal(Ref(fastline,-1));
*/


Stepping along the stochastic plot with the cursor, one can see where shape changes from 
1 to 2 on buy and sell signals, but I get no arrows. This statement is true for any piece of 
code which has PlotShapes.
Regards,
Colin

--- In amibroker@xxxxxxxxxxxxxxx, "wavemechanic" <fimdot@xxx> wrote:
>
> If you want a definite answer and not a maybe this or that, post your code so that it can 
be analyzed.
> 
> Bill
> 
> ----- Original Message ----- 
> From: "c_r_south" <colin_south@xxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Friday, September 21, 2007 9:28 AM
> Subject: [amibroker] PlotShapes - help please
> 
> 
> > My PlotShapes function has decided to stop working on all calls. I use it in conjunction 
with 
> > alerts which are working fine. I've scaned the help files for the function and hide/show 
but 
> > can't find anything which I might have done to turn off the visibility of shapes. I'm at 
the 
> > 'don't know where to look next' phase and would appreciate help.
> > 
> > 
> > 
> > Please note that this group is for discussion between users only.
> > 
> > To get 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
> > 
> > 
> >
>



Please note that this group is for discussion between users only.

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