New exported function OrderChanged()

Share your ideas how the software could be improved
Message
Author
User avatar
Tantalus
Posts: 302
Joined: Fri Mar 23, 2007 3:51 pm
Contact:

New exported function OrderChanged()

#1 Postby Tantalus » Wed Jan 04, 2012 7:14 pm

I would love to see a function called by FT whenever a pending order or a SL or TP was executed. It would be a function we could include in our strategies that would notify the code when the system executed an order automatically (rather than through the SendInstantOrder() function).

My strategies need to be able to react to a change in the order status, so it needs to know when a new order opens or an existing order closes. Currently the only way to do this is to track all entry and exit points manually in my code then enter and exit using SendInstantOrder() and CloseOrder(). I would love the convenience of using the automatic order functions SendPendingOrder() and programmed SL and TPs, but there's no way to know when these orders change, because FT doesn't notify my code.

A callback function similar to ResetStrategy() is what I'd like to see. It would pass back a code such as LongOpen, ShortOpen, SLHit, TPHit and also an order ticket, so my code would instantly know what has changed. Currently the system sends this info to the Journal, so it shouldn't be too hard to have it send the same info to a callback function as well...
Tantalus Research - Developing 21st Century Trading Systems.

dackjaniels
Posts: 151
Joined: Tue Feb 24, 2009 1:03 pm

#2 Postby dackjaniels » Mon Jan 09, 2012 2:25 pm

+1

FT Support
Posts: 905
Joined: Sat Jul 11, 2009 10:54 am

#3 Postby FT Support » Wed Jan 11, 2012 11:30 am

Sorry guys but we do not plan adding such a function in nearest time, too many other tasks.... we physically cannot do everything.

Actually you can create a lib of your custom functions and add this one the the lib. I believe that it is possible to develop many functions without changing FT API so you can do that, also you can create shared lib which can be updated by any forum member, this can be useful. What do you think?
Check our other product here:
http://www.forexcopier.com

User avatar
Tantalus
Posts: 302
Joined: Fri Mar 23, 2007 3:51 pm
Contact:

#4 Postby Tantalus » Wed Jan 11, 2012 11:40 am

Perhaps I'm wrong, but in order to program this outside from the FT API we would need to have notification from the API that an order has changed. That's the problem: the FT API does not inform the strategy that this has occurred.

When an order is placed or changed internally, how would we know without notification from the API?
Tantalus Research - Developing 21st Century Trading Systems.

FT Support
Posts: 905
Joined: Sat Jul 11, 2009 10:54 am

#5 Postby FT Support » Wed Jan 11, 2012 11:42 am

you just need to monitor orders and perform some checks at the start of GetSingleTick method, if something happened with orders then you will be notified.
Check our other product here:
http://www.forexcopier.com


Return to “New Feature Suggestions”

Who is online

Users browsing this forum: No registered users and 7 guests