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

Re: [amibroker] from a stop switching in a trailing stop



PureBytes Links

Trading Reference Links

Since these are percent stops, 99% is enough to effectively turn it off.

TrStopOn = ... 
ApplyStop( stopTypeTrailing, stopModePercent, IIf( TrStopOn == 1, 6, 99 ) ); 
ApplyStop( stopTypeLoss, stopModePercent, IIf( TrStopOn == 1, 99, 10 ) ); 


Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "Vins" <mrpurple@xxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Sunday, October 29, 2006 11:37 PM
Subject: [amibroker] from a stop switching in a trailing stop


> hi, 
> this is a formula for a stop
> ApplyStop(0,2,10,1,False));
> 
> here the trailing stop 
> ApplyStop(2,2,6,1,False);
> 
> so now i'ld like to put the stop but if a condition is verified 
> switchin in trailing stop
> 
> i wrote this 
> trstopon= condition;
> ApplyStop(IIf(trstopon==1,2,0),2,IIf(trstopon==1,6,10),1,False);
> 
> but i'm getting an error and cursor blinking after FALSE.
> from the help of error:
> "Error 4. Incorrect type of argument(s). Expecting number here.
> This occurs in ApplyStop function when Type, Mode, ExitAtStop or 
> Volatile parameter is an array"
> 
> thank You
> 
> 
> 
> 
> 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
> 
> 
> 
> 
> 
>

Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.13.27/517 - Release Date: 11/3/2006