Hi,
Let's say, you have two long entries, LE1 and LE2, together they established an open position of 10 contracts total (some of the orders they placed may not be filled). Is there any way to know how many contracts were by LE1 and how many were by LE2 at any time?
In this case, "entryname" seems to reflect LE1 only, but not LE2.
thanks,
-kernel
Tying entries with its contracts
Re: Tying entries with its contracts
Here's a code snippet from EL_essential book under "Tying Entry and Exit".
Problem is, assuming entry orders were placed not by market orders, or even by market orders in IOG code, it's possible not all 200 shares or 100 shares were filled on "next tick". In this case, you need to know how many are actually filled by each different entry to be able to partially sell some of them (scale-out) for each entry.
Problem is, assuming entry orders were placed not by market orders, or even by market orders in IOG code, it's possible not all 200 shares or 100 shares were filled on "next tick". In this case, you need to know how many are actually filled by each different entry to be able to partially sell some of them (scale-out) for each entry.
Code: Select all
Buy("My1stBuy") Next Bar 200 Shares at Market;
Buy("My2ndBuy") Next Bar 100 Shares at High Stop;
Sell("My1stSell") Next Bar From Entry ("My1stBuy") 100 shares at High Limit;
Sell("My2ndSell") Next Bar From Entry ("My2ndBuy") 50 shares at Low Stop;
if Time = 1500 then Sell next bar at Market;
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times