PureBytes Links
Trading Reference Links
|
Thanks Marek. I'll play around with the flip function ... looks
interesting. But I found a recent conversation on basically the same
question that gives an example of a loop which would accomplish what
I want.
I appreciate you guys patience with us non-programmer types! :)
James
--- In amibroker@xxxxxxxxxxxxxxx, Marek Chlopek <mchlopek@xxxx>
wrote:
> On Tuesday 11 of November 2003 22:21, the_real_redleg wrote:
> > Is there a way to turn a trailing stop "on" or "off" at certain
> > events in backtesting?
> >
> > I understand that the basic command for a 35 pip trailing stop
(for
> > example) is
> >
> > applystop(2,2,0.0035,True,False)
> >
> > However, I use the "powerbot" trading robot and it allows a
trailing
> > stop to be activiated at a certain profit level. For example, you
> > can tell it to use a 35 pip trailing stop but only after you hit
50
> > pips of profit in a given trade.
> >
> > How can I program that in AFL? I tried using the "if else"
feature,
> > but it doesn't work for arrays. I tried using the iff function,
but
> > that seems to just return a value rather than performing an
action.
>
> try flip()
> --
> Marek Chlopek
> mchlopek@xxxx
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/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/
|