Account.List closed oders

Posted By CFink Friday, April 30, 2010
Add to Favorites0
Author Message
CFink
 Posted Friday, April 30, 2010
Forum Member

Forum Member - (41 reputation)Forum Member - (41 reputation)Forum Member - (41 reputation)Forum Member - (41 reputation)Forum Member - (41 reputation)Forum Member - (41 reputation)Forum Member - (41 reputation)Forum Member - (41 reputation)Forum Member - (41 reputation)

Group: Forum Members
Last Active: Tuesday, June 22, 2010
Posts: 13, Visits: 42
41
Hello togther,

at the moment I'm writing my own stratigie that trading with six diffrent charts EURUSD, EURJPY and so on.

The trading work ok. Also when I had a bad last trade the lots will calculated new.

But I had one problem, and I have at the moment no idea how to solve it.

When two or more open orders close at the exact time I can not find out which of these closed orders is a good and which is the bad trade to adjust automaticly the lots for the following oders.

I marked all my opend orders with the .TAG but I do not know how to find it out at the closed account list.

Is there somebody who can help me?

With best regards from germany,

CFink

Good Luck

CFink

scriptor
 Posted Wednesday, May 19, 2010
Supreme Being

Supreme Being - (183 reputation)Supreme Being - (183 reputation)Supreme Being - (183 reputation)Supreme Being - (183 reputation)Supreme Being - (183 reputation)Supreme Being - (183 reputation)Supreme Being - (183 reputation)Supreme Being - (183 reputation)Supreme Being - (183 reputation)

Group: Forum Members
Last Active: Monday, October 04, 2010
Posts: 67, Visits: 186
183
Hello CFink,

As I understood, you mean the following: once order was closed with Loss greater than some predefined level, then the next new order has to be opened on predefined Amount (other than default one). I suggest to write something like:

// this procedure runs when a position is opened, closed or modified
procedure OnTradeChange(const Action: TDataModificationType; const Trade: TTrade);
begin
Point := History.Instrument.PointSize;
if (Action=dmtDelete) then
begin
if ((Trade.CloseRate-Trade.OpenRate)*Trade.Amount*100000 end;
end;

procedure OnNewCandle;
begin
if (Event:=1) then Amount:=X;
CreateOrder(History.Instrument, Account, Amount, bsBuy, NullRate, NullRate, TraderRange, '111');
end;






Sincerely,

Benjamin Hoover

Similar Topics

Expand / Collapse

Reading This Topic

Expand / Collapse

Back To Top