|
|
|
Forum Member
      
Group: Forum Members
Last Login: 6/30/2011 1:30:04 PM
Posts: 29,
Visits: 67
|
|
Hello people, the reasons of closing positions are:
C - Closed by Trader´s order
D - Closed by Dealer´s order
S - Closed on Stop order
L - Closed on Limit order
M - Margin Call
ME - Minimal Equity
I - Opposite Direction I order
E - Opposite Direction E order
T - Price changed on C order
R - Price changed on I order
How can we work with these informations in ActFX?
For exemple: if (MyTrade = S - Closed on Stop order) then (something);
[ ]´s
Rodolfo Andrade
www.rodorush.com.br
rodolfo@rodorush.com.br
+55(16)9193-6808
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: 2/3/2012 12:14:37 AM
Posts: 444,
Visits: 817
|
|
http://help.sysfx.com/documents/traders_manual/10.5/en_US/index.html?appendix.htm
http://help.sysfx.com/documents/traders_manual/10.5/en_US/index.html?predefined_procedures.htm
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: 1/27/2012 12:53:25 PM
Posts: 201,
Visits: 295
|
|
Hi, Rodorush!
You can use this script to find the reasons of closing positions.
// this procedure runs when some changes occur in the Orders list
procedure OnOrderChange(const Action: TDataModificationType; const Order: TOrder);
begin
// if a new Order appeared
if Action=dmtInsert then
begin
// output the information into the log corresponding to the type of order
if Order.OrderType = otInit then log('Market order placed');
if Order.OrderType = otClose then log('Order to close a position placed');
if Order.OrderType = otEStop then log('Entry Stop order placed');
if Order.OrderType = otELimit then log('Entry Limit order placed');
if Order.OrderType in [otELimit,otEStop] then
begin
log ('Instrument: ' +Order.Instrument.Name);
log ('Account: ' +Order.Account.Id);
log ('Rate: ' +FloatToStr(Order.Rate));
end;
if Order.OrderType = otMargin then log('Margin call');
if Order.OrderType = otMinEquity then log('Equity reached the minimum level');
end;
end;
Best regards!
Edited: 6/9/2010 9:57:22 AM by eMoe
|
|
|
|
|
Forum Member
      
Group: Forum Members
Last Login: 6/30/2011 1:30:04 PM
Posts: 29,
Visits: 67
|
|
Thanks, black and eMoe.
[ ]´s
Rodolfo Andrade
www.rodorush.com.br
rodolfo@rodorush.com.br
+55(16)9193-6808
|
|
|
|