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

RE: [amibroker] Secure AFL?



PureBytes Links

Trading Reference Links


Rob,
 
That's actually a great question, and one that is easily answered with Flip function.
 
 
BuyCondtion = your buy code here;
SellCondition = your sell code here;
 
BuyState = flip(BuyCondition, SellCondition);
SellState = not BuyState;
 
Note that we use "Not" BuyState because in situations where both BuyCondition and SellCondition are true we always want to favor the Sell (ie get close out the long).
 
Hope this helps,
GaryRob <coldbrains99@xxxxxxxxx> wrote:
I've been trying to build a strategy to back test using AFL.  However, I am having trouble querying state information, such as Position and saving information from one bar to the next.  Is there a way to query the current position while running through your back test, or at the very least, can I store a variable that I can reference from bar to bar without the contents of that variable being cleared out each bar?Check AmiBroker web page at:http://www.amibroker.com/Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
		Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.


Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html








Yahoo! Groups Sponsor


  ADVERTISEMENT 












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 the Yahoo! Terms of Service.