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

[amibroker] Re: In a plot statement . . .



PureBytes Links

Trading Reference Links

Yuki,
The horizontal projection for each line segment will be [exactly] the 
width of one bar.
If the slope is high, the actual segment length will be greater of 
course and this is the reason you see "not equally spaced" segments.
You may also use cum(1)%3 [1,0,0,1,0,0,...] cum(1)%4 etc for other 
visual effects.
The use of Null will give another alternative.
Plot(C,"C",1,64);
Plot(IIf(Cum(1)%2,MA(C,30),Null),"MA50",colorYellow,8);
Plot(MA(C,50),"MA30",(Cum(1)%2)*colorRed,1);
Plot(MA(C,100),"MA30",(Cum(1)%3)*colorBrightGreen,1);
Dimitris
--- In amibroker@xxxxxxxxxxxxxxx, Yuki Taga <yukitaga@xxxx> wrote:
> Hi DIMITRIS,
> 
> Sunday, September 19, 2004, 5:15:44 PM, you wrote:
> 
> DT> Yuki, cum(1)%2 will be equal to 1,0,1,0,1,0,... Try something
> DT> like
> 
> DT> Plot(C,"C",1,64);
> DT> Plot(MA(C,50),"MA50",colorYellow,1);
> DT> Plot(MA(C,30),"MA30",(Cum(1)%2)*colorRed,1);
> 
> DT> It will give an red [equally spaced] dashed MA, if the first 
> DT> customcolor in preferences is your background color 
[customcolor=0]
> DT> Dimitris
> 
> It's not too bad, DT.  Not exactly what I wanted, but it's closer
> than the dots, maybe.  Here is the line I'm using:
> 
> Plot(DiffMa, "MA%Diff",(Cum(1)%2)*colorGreen, styleOwnScale);
> 
> It does produce a green dashed line, but the dashes are not of
> uniform length.
> 
> Yuki



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

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

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