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

[amibroker] Easy language to AFL translation....help



PureBytes Links

Trading Reference Links

I'm trying to Back-test a stop-loss strategy that seems a bit more 
complicated than those anticipated by the "ApplyStop" function, and I 
need to keep track of whether I am long or short, and what my entry 
price was. Clearly the BackTester must know this information in order 
to be able to assess profit and loss on exit, but there doesn't seem 
to be a reserved variable that records this information. When I try 
to program it I keep getting into loops with uninitialised variables.

For example, I want to set a fixed-amount stop loss on entry, and 
then, if price has moved in my favour, move the stop later to a break-
even point. For that I need to keep track of my position, and my 
original entry price. Has anyone any suggestions?

Thanks,

Paolo



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 
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:
     amibroker-unsubscribe@xxxxxxxxxxxxxxx

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