TJ, Thanks for the new function.... However when I tried it, I get the following syntax error:
Error 37: Unsupported field in SetOptions I am using AB version 4.70.0 I can not find version 4.79.0 that you refer to in your response below. (Looked in download section of AB website) Is this being released soon? Gosub283 --- In [email protected], "Tomasz Janeczko" <[EMAIL PROTECTED]> wrote: > > Hello, > > It is easy ( 2 lines of code) with NEW AmIBroker feature called HoldMinBars > > SetOption("HoldMinBars", 30 ); > Sell = H > Ref(H,-1); > > This new feature works so that it ignores sell signals during hold min bars period. > > HoldMinBars requires version 4.79.0 > > Best regards, > Tomasz Janeczko > amibroker.com > ----- Original Message ----- > From: gosub283 > To: [email protected] > Sent: Thursday, April 06, 2006 8:51 PM > Subject: [amibroker] Please help with ApplyStop() function (TJ) > > > > Hi, > > I use a time based stop to exit trades. > The ApplyStop function works very well. > How can I add an additional rule to achieve the > following logic: > > After 'n' days, sell on the first day in which the > HIGH is lower than the previous day's HIGH > > ============================================== > Current sell rule: > > HoldPeriod = 30; > > // Time-based stop > ApplyStop( stopTypeNBar, stopModeBars, HoldPeriod); > > > > > > > > > > > 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 other support material please check also: > http://www.amibroker.com/support.html > > > > > > ------------------------------------------------------------------------------ > YAHOO! GROUPS LINKS > > a.. Visit your group "amibroker" on the web. > > b.. To unsubscribe from this group, send an email to: > [EMAIL PROTECTED] > > c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. > > > ------------------------------------------------------------------------------ > ------------------------ Yahoo! Groups Sponsor --------------------~--> GFT Forex Trading Accounts As low as $250 with up to 400:1 Leverage. Free Demo. http://us.click.yahoo.com/lpv1TA/jlQNAA/U1CZAA/GHeqlB/TM --------------------------------------------------------------------~-> 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 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/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
