Log Event

Posted By vvj Tuesday, August 17, 2010
Add to Favorites1
Author Message
vvj
 Posted Tuesday, August 17, 2010
Forum Newbie

Forum Newbie - (8 reputation)Forum Newbie - (8 reputation)Forum Newbie - (8 reputation)Forum Newbie - (8 reputation)Forum Newbie - (8 reputation)Forum Newbie - (8 reputation)Forum Newbie - (8 reputation)Forum Newbie - (8 reputation)Forum Newbie - (8 reputation)

Group: Forum Members
Last Active: Friday, August 20, 2010
Posts: 6, Visits: 23
8
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?
eMoe
 Posted Thursday, August 19, 2010
Supreme Being

Supreme Being - (619 reputation)Supreme Being - (619 reputation)Supreme Being - (619 reputation)Supreme Being - (619 reputation)Supreme Being - (619 reputation)Supreme Being - (619 reputation)Supreme Being - (619 reputation)Supreme Being - (619 reputation)Supreme Being - (619 reputation)

Group: Forum Members
Last Active: 2 days ago @ 2:45 AM
Posts: 201, Visits: 299
619
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!
Friday, August 20, 2010 by eMoe
vvj
 Posted Friday, August 20, 2010
Forum Newbie

Forum Newbie - (8 reputation)Forum Newbie - (8 reputation)Forum Newbie - (8 reputation)Forum Newbie - (8 reputation)Forum Newbie - (8 reputation)Forum Newbie - (8 reputation)Forum Newbie - (8 reputation)Forum Newbie - (8 reputation)Forum Newbie - (8 reputation)

Group: Forum Members
Last Active: Friday, August 20, 2010
Posts: 6, Visits: 23
8
Thank you, ё-моё! :-)

I'll try it.

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

Thanks in advance.
vvj
 Posted Friday, August 20, 2010
Forum Newbie

Forum Newbie - (8 reputation)Forum Newbie - (8 reputation)Forum Newbie - (8 reputation)Forum Newbie - (8 reputation)Forum Newbie - (8 reputation)Forum Newbie - (8 reputation)Forum Newbie - (8 reputation)Forum Newbie - (8 reputation)Forum Newbie - (8 reputation)

Group: Forum Members
Last Active: Friday, August 20, 2010
Posts: 6, Visits: 23
8
...ordr:=1 and ordr:=2...
eMoe
 Posted Friday, August 20, 2010
Supreme Being

Supreme Being - (619 reputation)Supreme Being - (619 reputation)Supreme Being - (619 reputation)Supreme Being - (619 reputation)Supreme Being - (619 reputation)Supreme Being - (619 reputation)Supreme Being - (619 reputation)Supreme Being - (619 reputation)Supreme Being - (619 reputation)

Group: Forum Members
Last Active: 2 days ago @ 2:45 AM
Posts: 201, Visits: 299
619
Hi, vvj!

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

It's just variable.


Best regards!
Friday, August 20, 2010 by eMoe
vvj
 Posted Friday, August 20, 2010
Forum Newbie

Forum Newbie - (8 reputation)Forum Newbie - (8 reputation)Forum Newbie - (8 reputation)Forum Newbie - (8 reputation)Forum Newbie - (8 reputation)Forum Newbie - (8 reputation)Forum Newbie - (8 reputation)Forum Newbie - (8 reputation)Forum Newbie - (8 reputation)

Group: Forum Members
Last Active: Friday, August 20, 2010
Posts: 6, Visits: 23
8
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.
Friday, August 20, 2010 by vvj

Similar Topics

Expand / Collapse

Reading This Topic

Expand / Collapse

Back To Top