DailyFX Home | Español | Français | 中文 | Deutsch | Italiano | العربية | Sverige | Ελληνικά


+ Reply to Thread
Results 1 to 12 of 12
  1. #1
    Trading Gurus is offline Gold Member Trading Gurus is an unknown quantity at this time
    Join Date
    Jun 2009
    Posts
    92

    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

  2. #2
    vrodn is offline Member vrodn is an unknown quantity at this time
    Join Date
    Mar 2010
    Posts
    61
    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.

  3. #3
    Trading Gurus is offline Gold Member Trading Gurus is an unknown quantity at this time
    Join Date
    Jun 2009
    Posts
    92
    Hi vrodn,

    Quote Originally Posted by vrodn View Post
    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

  4. #4
    jdavis is offline FXCM Automated Platform Specialist jdavis is an unknown quantity at this time
    Join Date
    Jan 2010
    Posts
    818
    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

  5. #5
    Trading Gurus is offline Gold Member Trading Gurus is an unknown quantity at this time
    Join Date
    Jun 2009
    Posts
    92
    Hi jd,

    Quote Originally Posted by jdavis View Post
    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

  6. #6
    charliev is offline Member charliev is an unknown quantity at this time
    Join Date
    Jul 2010
    Posts
    59
    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

  7. #7
    Gaurav is offline Gold Member Gaurav is an unknown quantity at this time
    Join Date
    Mar 2010
    Posts
    496
    Quote Originally Posted by Trading Gurus View Post
    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.

  8. #8
    Gaurav is offline Gold Member Gaurav is an unknown quantity at this time
    Join Date
    Mar 2010
    Posts
    496
    Quote Originally Posted by charliev View Post
    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.

  9. #9
    Trading Gurus is offline Gold Member Trading Gurus is an unknown quantity at this time
    Join Date
    Jun 2009
    Posts
    92
    Hi Gaurav,

    Quote Originally Posted by Gaurav View Post
    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

  10. #10
    Gaurav is offline Gold Member Gaurav is an unknown quantity at this time
    Join Date
    Mar 2010
    Posts
    496
    Quote Originally Posted by Trading Gurus View Post
    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?

  11. #11
    Trading Gurus is offline Gold Member Trading Gurus is an unknown quantity at this time
    Join Date
    Jun 2009
    Posts
    92
    Hi Gaurav,

    Quote Originally Posted by Gaurav View Post
    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

  12. #12
    jdavis is offline FXCM Automated Platform Specialist jdavis is an unknown quantity at this time
    Join Date
    Jan 2010
    Posts
    818
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Disclaimer: Trading foreign exchange on margin carries a high level of risk, and may not be suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to trade foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with foreign exchange trading, and seek advice from an independent financial advisor if you have any doubts. Any opinions, news, research, analyses, prices, or other information contained on this website is provided as general market commentary and does not constitute investment advice. Forex Capital Markets LLC. will not accept liability for any loss or damage, including without limitation to, any loss of profit, which may arise directly or indirectly from use of or reliance on such information.