|
Hpman
|
Posted Thursday, April 29, 2010
|
|
Group: Forum Members
Last Active: Wednesday, May 26, 2010
Posts: 3,
Visits: 27
|
Hello,
is there a possibility to get access to a position which are already opened before starting the strategy.
Normally i use the callback procedure OnTradeChange(const Action: TDataModificationType; const Trade: TTrade) to get the Address of the TTrade structure but is there a way without that callback.
For the background - i want to write a small script for a more intelligent trailing, the position will be opened manually but later the stop loss will be adapted by the strategy script.
Thanks Hpman
|
|
GregorAnton
|
Posted Thursday, April 29, 2010
|
|
Group: Forum Members
Last Active: Monday, March 12, 2012
Posts: 237,
Visits: 483
|
Yes, there are quite a few strategies that will cycle through open trades.
Have a look at some of the strategies in the library, and search the manual for Tradelist.
as in:
for i:=TradeList.Count-1 downto 0 do
begin
if (TradeList.Get(i).Tag = 'BuyTrade' then...
Happy Pipping!
|
|
Hpman
|
Posted Friday, April 30, 2010
|
|
Group: Forum Members
Last Active: Wednesday, May 26, 2010
Posts: 3,
Visits: 27
|
Thanks, that's what i'm looking for.
Hpman
|