|
|
-
Events in Strategy Trader?
A quick search through the docs reveals only TConnectionStatusChange.
Does Strategy Trader offer the equivalent of Order2Go's TradeDeskEventsSink interface, or any similar functionality?
Reality is merely an illusion, albeit a very persistent one - Albert Einstein
-
Hello,
The Order2Go TradeDeskEventsSink.OnSessionStatusChanged
is fired when the status of the connection to the trade server is changed.
The TConnectionStatusChange has a similar functionality.
Last edited by vrodn; 07-30-2010 at 05:47 AM.
-
Hi vrodn,
 Originally Posted by vrodn
Hello,
The Order2Go TradeDeskEventsSink.OnSessionStatusChanged
is fired when the status of the connection to the trade server is changed.
The TConnectionStatusChange has a similar functionality.
That's all though? There is no equivalent of OnRequestFailed or OnRowChanged for example?
Reality is merely an illusion, albeit a very persistent one - Albert Einstein
-
Hello,
At present, Strategy Trader Editor code doesn't have open events. This has been requested from several clients and the developers have been notified of this, and will likely be on future updates to the platform.
-jd
API Team
-
Hi jd,
 Originally Posted by jdavis
Hello,
At present, Strategy Trader Editor code doesn't have open events. This has been requested from several clients and the developers have been notified of this, and will likely be on future updates to the platform.
-jd
Is it also possible to notify the developers that at least one client would love to see an exception thrown if an order is rejected for any reason?
Failing that, setting some sort of error code would be a whole lot better than nothing, which seems to be the case at the moment.
Cheers,
Jim
Reality is merely an illusion, albeit a very persistent one - Albert Einstein
-
EXACTLY... there should be a OrderGenerate event that returns either a FILLED or REJECTED status with a pointer to the Order to allow the setting of STOPs and T/P if FILLED.
-charliev
-
 Originally Posted by Trading Gurus
Hi jd,
Is it also possible to notify the developers that at least one client would love to see an exception thrown if an order is rejected for any reason?
Failing that, setting some sort of error code would be a whole lot better than nothing, which seems to be the case at the moment.
Cheers,
Jim
I dont understand what will be the benefit for this in an automated platform. You are not using an API... this is an automated platform. If your conditions are met and you trigger an order then it will go through. May be ther is slippage, may be not, but you will be in the market. If you are using market range, the order will or will not go thorugh based on the price. What will be the benfit of errors. The way I look at it, if you coded everything right and the backtest works then there will be no errors.
-
 Originally Posted by charliev
EXACTLY... there should be a OrderGenerate event that returns either a FILLED or REJECTED status with a pointer to the Order to allow the setting of STOPs and T/P if FILLED.
-charliev
The platform automatically detects if you have an open position so this is not really necessary.
-
Hi Gaurav,
 Originally Posted by Gaurav
I dont understand what will be the benefit for this in an automated platform. You are not using an API... this is an automated platform. If your conditions are met and you trigger an order then it will go through. May be ther is slippage, may be not, but you will be in the market. If you are using market range, the order will or will not go thorugh based on the price. What will be the benfit of errors. The way I look at it, if you coded everything right and the backtest works then there will be no errors.
Forgive me, but I don't understand why you don't seem to appreciate that there is a difference between backtesting with virtual money and auto-trading a live account with hard cash.
For me automated trading means setting things running on a VPS and then not worrying about anything until I withdraw some cash from my account at the end of each month.
If something unexpected happens I firstly want my code to know about it instantaneously. If the code can't handle the problem then I personally want to know about it PDQ. An email or an SMS for example.
Is using an API the only way I will ever be able to achieve that sort of functionality?
Cheers,
Jim
Reality is merely an illusion, albeit a very persistent one - Albert Einstein
-
 Originally Posted by Trading Gurus
Hi Gaurav,
Forgive me, but I don't understand why you don't seem to appreciate that there is a difference between backtesting with virtual money and auto-trading a live account with hard cash.
For me automated trading means setting things running on a VPS and then not worrying about anything until I withdraw some cash from my account at the end of each month.
If something unexpected happens I firstly want my code to know about it instantaneously. If the code can't handle the problem then I personally want to know about it PDQ. An email or an SMS for example.
Is using an API the only way I will ever be able to achieve that sort of functionality?
Cheers,
Jim
Jim,
I apolgize is I sounded a little harsh in my last post. I do appreciate the fact that backtesting is testing with virtual money and in a live account you will trading on your hard earned money. However, my point was along this lines of how these errors are possible if your strategy works in backtesting. Ultimately that is the bottom line. Why are you expecting a market order to get rejected? If you use Market Range order and the order doesn't execute then you know that the range condition was not met. What errors are you expecting?
-
Hi Gaurav,
 Originally Posted by Gaurav
Jim,
I apolgize is I sounded a little harsh in my last post.
Likewise.
I do appreciate the fact that backtesting is testing with virtual money and in a live account you will trading on your hard earned money. However, my point was along this lines of how these errors are possible if your strategy works in backtesting. Ultimately that is the bottom line. Why are you expecting a market order to get rejected? If you use Market Range order and the order doesn't execute then you know that the range condition was not met. What errors are you expecting?
As in my initial example - "Insufficient margin!!!" is one such problem.
I like to use the "Belt & Braces" approach. Whilst you endeavour never to knowingly send an order that will get rejected, it can happen from time to time. Particularly when you're porting strategies to a brand new platform that's only just gone into public beta!
Cheers,
Jim
Last edited by Trading Gurus; 08-03-2010 at 04:17 PM.
Reality is merely an illusion, albeit a very persistent one - Albert Einstein
-
Jim,
This is actually the main reason that event handling will likely be implemented for the next major revision to the platform.
There are currently less elegant ways to check against these though on the front end as opposed to being given an NSF(insufficient fund) message, by comparing the cost of the position being placed against account.balance. Also if the account is currently under margin call, a quick check against account.IsUnderMarginCall can verify whether or not . I don't currently have an example to provide here, but if this is added to the conditions in the execute object with an alert or email notification, it seems reasonable enough to achieve your objective.
-jd
API Team
|