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

[amibroker] Problem with stop&reverse transactions


  • Date: Fri, 12 Feb 2010 22:01:33 -0000
  • From: "jacek_lempart" <jacek@xxxxxxxxxxx>
  • Subject: [amibroker] Problem with stop&reverse transactions

PureBytes Links

Trading Reference Links

Hi All,

I have a simple S&R system, however noticed strange thing, which cannot understand: sometimes it happens that based on the code below, there is not transaction when it should be. For example let say, that we have a short position. Then on the next day price is moving up and crosses (or equals) BuySignal ==> then system should close short and open long. Code below works this way 99% of time, however sometimes (not always) when the given bar penetrates both BuySignal and SellSignal, it's not executing order at all. Many thanks in advance for any help. 

Buy = Cross( H, BuySignal ) || H == BuySignal;
Sell = Cross( SellSignal, L ) || L == SellSignal;

Short = Sell;
Cover = Buy;
BuyPrice = BuySignal;
SellPrice = SellSignal;
ShortPrice = SellPrice;
CoverPrice = BuyPrice;



------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    amibroker-digest@xxxxxxxxxxxxxxx 
    amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> 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/