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

Re: [amibroker] Re: Same day enter/exit



PureBytes Links

Trading Reference Links

Hello,


> Tomasz,
> Thank you for the rapid response.
> I have 3.7, and I agree, your example works. However, if you use 
> extrememely tight stop loss & limits (.01% for instance), it will 
> never sell on the same day. Always the day after, even if I have 
> settings set to Sell price = Close and Sell delay = 0.
Indeed with version 3.7 there is such a problem.
I would suggest the following workaround:

add the following line to your formula:
sell = sell OR ( buy AND sellprice <= 0.995 * buyprice ); 

this causes sell signal to be generated on the same bar
if sellprice drops 0.5% below buyprice.


> Also, with some further looking, it appears that if the opening gaps 
> below a stop or above a limit level, AB uses the low for that day as 
> the fill for a limit, and the high for that day as the fill for the 
> stop loss. Settings are set to use "Open". Shouldn't it use the 
> open? Again, just saw this a few times last night, so I don't know if 
> it is always true.
This is fixed in 3.78beta - when gap occurs on open the stop
is fulfilled at open price if only "Exit at stop" is marked. Otherwise 
stop is fullfilled at price set in setting (sellprice / coverprice)


Best regards,
Tomasz Janeczko
===============
AmiBroker - the comprehensive share manager.
http://www.amibroker.com