How to change order type from AtMarket to AtLimit?
Author: tradercn
Creation Date: 7/9/2012 10:18 AM
profile picture

tradercn

#1
For China Stock Market, since there is 12 hour time difference, the only suitable order type for me is Market Order. That's why I want to change the limit order in the preload strategy to be the market order.
Say, there is a order: SellAtLimit(bar+1, p, 10.00, "LMT"). I modify this order to be the combination as the following:
CODE:
Please log in to see this code.

However, it shows error message: Error processing symbol SZ001696 Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

If I modify it to be:
CODE:
Please log in to see this code.

It shows the same error.

What's wrong with it please? Could you please help? Thanks.
profile picture

Eugene

#2
Given the code snippet, it's not possible to tell what's wrong with the Strategy. For a hint on what's failing, please refer to the Knowledge Base, Errors | Strategy > Index was out of range.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).