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

Re: [amibroker] Apply Stop Question



PureBytes Links

Trading Reference Links

Hello,


Please note that IIF is a function so it returns the value after evaluation,
so you should write it as follows:

stop = IIf (EMA(C,15) > EMA(C,200), 
Optimize( "stopo", 20, 20, 30, 1 ),
Optimize( "stopu", 10, 1, 15, 1 ) );

ApplyStop( 0, 1, stop, 1 );

Best regards,
Tomasz Janeczko
amibroker.com



----- Original Message ----- 
From: <miked@xxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Monday, December 03, 2001 2:08 PM
Subject: [amibroker] Apply Stop Question


> I am attempting to vary my stop depending on a condition. It appears 
> as though the false condition is always being selected. Am I coding 
> this correctly.
> 
> thanks
> 
> 
> IIf (EMA(C,15) > EMA(C,200), stop = Optimize( "stopo", 20, 20, 30, 
> 1 ),stop = Optimize( "stopu", 10, 1, 15, 1 ) );
> 
> ApplyStop( 0, 1, stop, 1 );
> 
> 
> 
> 
> 
> 
> 
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
> 
> 
>