Exit intraday on EOD data

I have an exit strategy that will exit if todays H is higher than yesterdays high. I want this to be excecuted intraday. How do I specify that when I have EOD data?

highstop=H > Ref(H,-1);
sell=highstop

edit: sorry, misread the sell condition

I’ll try again :slight_smile:

In real trading you would set your sell order at yesterday’s high + 1 tick so to simulate that in backtesting you would need to set your Buyprice at that level. ie. Yesterday’s high + 1 tick.

To exit intraday you’d need to set your sell tradedelay to zero as well.

Hi,
Be careful. there is a lot of errors in H if you are trading stocks. I assume this can be written as:
sell= h>ref(h,-1);
sellprice=ref(h,-1);

That should read “Sellprice” not Buyprice.

See KB:
http://www.amibroker.com/kb/2014/11/26/handling-limit-orders-in-the-backtester/