Flexi,
Assuming you are writing the code for back testing in TradeSim then try something along these lines.
Entry Trigger:=Ref(BuySetup,-1); {"BuySetup" = the rules and filters that must be satisfied for the system to give a buy signal}
EntryPrice:= If (OPEN<=Ref(HIGH,-1),Ref(HIGH,-1)+0.01,OPEN);
This code is written on the basis that the “BuySetup” happened yesterday and this is the buy instruction for today.
oztrader