|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 5/26/2010 5:41:46 PM
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
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: 1/23/2012 9:34:43 AM
Posts: 237,
Visits: 482
|
|
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!
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 5/26/2010 5:41:46 PM
Posts: 3,
Visits: 27
|
|
Thanks, that's what i'm looking for.
Hpman
|
|
|
|