Log Event Expand / Collapse
Author
Message
Posted 8/17/2010 11:58:05 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 8/20/2010 11:00:34 AM
Posts: 6, Visits: 23
Hi all!

May be smb knows how to write the script which only puts into the log when the entry order is executed but not popup the window?

In the manual I've found TSystemEvent class, but there are only 4 events: EventTradeNotFound, EventDuplicateCloseOrder, EventOrderCantBeRemoved and EventOrderCantBeModified...

What the event when the entry order is executed?
Post #1859
Posted 8/19/2010 9:41:43 AM


Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: 1/27/2012 12:53:25 PM
Posts: 201, Visits: 295
Hi, vvj!
To identify an order executing you can use follow structure:


procedure OnStart;
begin
CreateEntryOrder(History.Instrument, Account, Amount, bsbuy, History.Instrument.buy+Point*Shift,
NullRate,NullRate, otEStop, 'Entrybuy');
CreateEntryOrder(History.Instrument, Account, Amount, bssell, History.Instrument.Sell-Point*Shift,
NullRate,NullRate, otEStop, 'Entrysell');
end;


procedure OnOrderChange(const Action: TDataModificationType; const Order: TOrder);
var i:integer;
begin

//output the order information into the log
if (Action=dmtInsert) then
begin
log('Entry order placed: '+order.tag);
log('Instrument: ' +Order.Instrument.Name);
log('Account: ' +Order.Account.ID);
log('Amount: ' +FloatToStr(Order.Amount));
log('Order rate: ' +FloatToStr(Order.Rate));
end;

end;

procedure OnTradeChange(const Action: TDataModificationType; const Trade: TTrade);
begin
// if a new trade opened


if Action=dmtInsert then
begin

if Trade.Tag='Entrysell' then
begin
log('Sell position has been placed');
end;

if Trade.Tag='Entrybuy' then
begin
log('Buy position has been placed');
end;
end;
end;


Best regards!

Edited: 8/20/2010 8:40:19 AM by eMoe
Post #1866
Posted 8/20/2010 7:56:54 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 8/20/2010 11:00:34 AM
Posts: 6, Visits: 23
Thank you, ё-моё! :-)

I'll try it.

Can you explain me what does the commands ordr:=2 and ordr:=2 mean?

Thanks in advance.
Post #1874
Posted 8/20/2010 7:58:16 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 8/20/2010 11:00:34 AM
Posts: 6, Visits: 23
...ordr:=1 and ordr:=2...
Post #1875
Posted 8/20/2010 8:39:49 AM


Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Forum Members
Last Login: 1/27/2012 12:53:25 PM
Posts: 201, Visits: 295
Hi, vvj!

I've copied part of the program and forgotten to delete ordr and reverse strings.

It's just variable.

Best regards!

Edited: 8/20/2010 8:41:00 AM by eMoe
Post #1876
Posted 8/20/2010 9:10:53 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 8/20/2010 11:00:34 AM
Posts: 6, Visits: 23
Unfortunately in this case the problem is not resolved.
Because when the order is executed, immediately appears the window "your entry oder bla-bla-bla was executed at...".
I want to kill THIS window, because you must to push the button "OK", only after that you can continue to work with the platform.

I thought that exists any "Event command" for the order execution and I could write something like that: "EventOrderExecution.Reaction := serLog;" on the start procedure.

Or may be I need to change the preferences in my trading platform, but I didn't find where.

Edited: 8/20/2010 11:02:33 AM by vvj
Post #1877
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Admin

All times are GMT -5:00, Time now is 11:28am


© 2009 Actforex.com Terms of Use