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

[amibroker] Re: if - else



PureBytes Links

Trading Reference Links

--- In amibroker@xxxxxxxxxxxxxxx, "Ara Kaloustian" <ara1@xxxx> wrote:


I think, you have to use more brackets. Try the following code:

if (SelectedValue(Plotcolor) == colorYellow OR colorGold OR
colorRed); 
{
PlotShapes(IIf(Plot_High,shapeDownArrow,shapeNone),
Plotcolor,0,Stoc,0); 
PlotShapes(IIf(Plot_Low,shapeDownArrow,shapeNone),
Plotcolor,0,Stoc,0); 
PlotShapes(IIf(Plot_HDS,shapeDownArrow,shapeNone),
Plotcolor,0,Stoc,0); 
}
else
{
PlotShapes(IIf(Short_Signal,shapeDownArrow,shapeNo
ne),Plotcolor,0,Stoc,0);
}

HTH

Stephan

> Having problem with if - else structure...
> 
> The code below works if I comment out the "else" section and
following line, otherwise I get error 23 (syntax error) pointing at
"else".
> 
> Anyone see the problem?
> 
> Thanks
> 
> Ara
> 
> if (SelectedValue(Plotcolor) == colorYellow OR colorGold OR
colorRed); 
> 
> {
> 
> PlotShapes(IIf(Plot_High,shapeDownArrow,shapeNone),
Plotcolor,0,Stoc,0); 
> 
> PlotShapes(IIf(Plot_Low,shapeDownArrow,shapeNone),
Plotcolor,0,Stoc,0); 
> 
> PlotShapes(IIf(Plot_HDS,shapeDownArrow,shapeNone),
Plotcolor,0,Stoc,0); 
> 
> 
> 
> else
> 
> PlotShapes(IIf(Short_Signal,shapeDownArrow,shape
None),Plotcolor,0,Stoc,0);
> 
> }


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Rent DVDs Online - Over 14,500 titles.
No Late Fees & Free Shipping.
Try Netflix for FREE!
http://us.click.yahoo.com/YoVfrB/XP.FAA/uetFAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

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