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

EL: How to determine different entry prices?



PureBytes Links

Trading Reference Links

I want to enter a position on multiple entries.  For example:

Let's say I have an intraday chart for a stock that does a nice 
steady climb ( never pulls back more than .25) from 50.00 at the 
open to 60.00 at the close and I have this EL code:

Variables: OpenOfDay(0), DoOrders(False);

if date>date[1] then
begin
	OpenOfDay = open;
	DoOrders = True;
end;

if DoOrders then
begin
	buy("En1") at OpenOfDay+1 stop;
	buy("En2") at OpenOfDay+2 stop;
	buy("En3") at OpenOfDay+3 stop;
end;

ExitLong("Ex1") from Entry("En1") at OpenOfDay+4 limit;
ExitLong("Ex2") from Entry("En2") at OpenOfDay+5 limit;
ExitLong("Ex3") from Entry("En3") at OpenOfDay+6 limit;

Now, how can I find out, from my EL code, what the prices were for 
these trades?

I know that I can "assume" they were at the given stop and limit 
prices, but what if there were gaps?

If I use the EntryPrice function, it only gives the first entry price, 
even if I use the subscripted nomenclature (EntryPrice(2)).  Same 
thing with the exits.

Thanks,

Cash



"Buy Low, Sell High"
(If this statment is used for financial gain, I am entitled to 10% of all profits. ;) )