Timekeeper,
I'm having a bit of trouble seeing stuff I've
written because I cannot log onto TWS (weekend rules).
I don't think you can see the child orders of a
parent. You'll probably have to use either: (a) separate orders, or (b)
you'll have to retrieve the aggregate position from the account.
In the case of (a):
From example 2, (I haven't done this in a while,
but I'm pretty sure you can use)
OrderID = ibc.ModifyOrder( OrderID, Name(), "BUY", 100,"LMT",
LastValue( C ) + 0.10, 0, "Day", False );
And then, right afterwards
StaticVarSetText("OrderID"+Name(),
OrderID);
In the case of (b):
Use GetPositionSize( string
Ticker )
to determine share count.
Chris
----- Original Message -----
Sent: Saturday, January 31, 2009 4:44
PM
Subject: [amibroker] Re: get Buy/SELL
fill px/per each orderID via ibcontroller (& 2 other questions...)
Hi Chris,
Mucho appreciado on jumping to my rescue here. i didn't
realize big hedge fund pros have time to participate much in
usergroups!
Anyway, all questions answered except in reference to (a)
& (b). What I still seem unable to find is the call function for
getting the actual fillprice itself, not the current bid/ask quote, that
would nomally be found on any garden variety post-execution confirmation.
As i now understand it, admittedly quite sketchily, the aggregate position
price is reported back per the parentID (i.e. the basis of the position)
but not the per order basis as regards each orderID that reside within
the umbrella parent aggregated position?
As background: I am trying
to deploy a "beats VWAP" accumulation strategy that requires I know the
fillprice status (including fillprice itself, not just whether or not it
got filled) of each individual unique order in the aggregated position.
Therefore, retrieving this price swiftly is a priority
-
=--timekeeper
--- In amibroker@xxxxxxxxxps.com,
"Chris DePuy" <cdepuy@xxx> wrote: > > Hi
timekeeper, > > a) Use AFL code > b)
getrtdata("bid") > c) 1) delay will be what is in the AA Settings
Trades window unless you say otherwise in the .afl > c) 2) Yes, in
the scenario you outlined, it would be. That is because you'd be
calculating a value (the average) that uses hi and low from different time
periods, and then plugging it in as, say, your entry price (you'd use
buyprice syntax to do that). > > Chris > > -----
Original Message ----- > From: timekeeper_origen > To: amibroker@xxxxxxxxxps.com >
Sent: Monday, January 26, 2009 7:58 PM > Subject: [amibroker] get
Buy/SELL fill px/per each orderID via ibcontroller (& 2 other
questions...) > > > hi all! > > 2 naive
questions from a new user: > > (a) i am working with ibcontroller
and would like it to return from tws the BUY/SELL SHORT fill prices - per
each orderID - so that i can later use these IDs as %gain triggers
in > conditional SELL/BUY TO COVER orders. what would i do within
either > (1) the AFL code using a pre-existing command, or > (2)
write a command in AFL, or > (3) use the C++ DLL builder to achieve my
goal somehow, or > (4) some other workaround i don't know enough to
inquire about? > > (b) how can i work with BID/ASK prices and
sizes instead of OHLC or AVERAGE? > > (c) changing now for a
moment to the amibroker backtest (rather than API) environment, if I use
the default AFL trade delay setting is that default setting (in the AFL
code NOT the > GUI) set to > (1) zero or a one? > (2) if it
is zero AND i want the average price as my fill price AND i get my buy
signal at the END of the bar, am i backtesting a scenario that uses forward
information??? - - in that > i am modeling the acquisition of
shares at a price (in this example the average price of the bar) that is
chronologically prior to my knowing that i even have a signal and that i
want > to acquire shares at all? > > thks for your help,
patience and grace when presented with questions from the naive among us
- > > =--timekeeper >
__._,_.___
**** IMPORTANT ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
*********************
TO GET TECHNICAL SUPPORT from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
*********************
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
For other support material please check also:
http://www.amibroker.com/support.html
*********************************
__,_._,___
|