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

[amibroker] Looping plotgrids



PureBytes Links

Trading Reference Links

Hello,

I tried the following to implement a BUY stop, I want to buy only if 
tomorrow's price rises above a predefined price. For example, today's 
HIGH + 0.1. The trade delay is 1.


Buy      = upTrend AND bLCondx;
BuyPrice = IIf(H >= bLStopP, IIf(Open >= bLStopP, Open, bLStopP), 
999999);

Since there are days even though the BUY = 1 but the next day's price 
does NOT go up to satisfy this H >= bLStopP condition, in this case I 
want to skip it. In my test I found that AB ALWAYS execute a trade if 
buy = 1, even though the BuyPrice is NOT satisfied, AB would buy using 
the HIGH of the entry day.

In my opinion, BuyPrice is also a condition to be satisfied, as long 
as an user specify a price to be filled, it becomes a condtion. But AB 
sees it differently.

What is the best way to do this? Do I have to look into the future to 
decide my BUY condition? I do NOT want to use SetTradeDelays(0, 0, 0, 
0) since it makes my other conditions very complicated.

Thanks for any help...



Thomas


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/