AutoTrade-Sync mode ?

Questions about MultiCharts and user contributed studies.
SUPER
Posts: 646
Joined: 03 Mar 2007
Has thanked: 106 times
Been thanked: 84 times

AutoTrade-Sync mode ?

Postby SUPER » 10 Oct 2008

Marina,

I am encountering an unfilled order issue with Sync Mode in automation and will appreciate your clarification.

I am using Limit orders on a reverse system, as you would see from the screen shot a short order for 2 contracts was issued and one contract got filled to close position but the reversing order did not get executed. There was no order replacment for unfilled orders on the same bar??? In this case the order got generated on the next bar.

Look forward to your reply.

Regards
Super
Attachments
MC-1.jpg
Screen Shot
(20.73 KiB) Downloaded 490 times
mc1.txt
Log File
(12.72 KiB) Downloaded 440 times

SUPER
Posts: 646
Joined: 03 Mar 2007
Has thanked: 106 times
Been thanked: 84 times

Postby SUPER » 16 Oct 2008

Marina,

I am having same problems with Stop orders.

Is there an issue with partial filled orders in Sync Mode?

Look forward to your reply.

Regards
Super

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 16 Oct 2008

Hi SUPER,

To comment on what is going on we would need to have a look at your strategy. I recently dealt with a similar issue reported by a customer in an e-mail but since I don't always know how forum nicks match people's real names, I am not sure if it was you or not.

In that customer's case, the reverse strategy simply was not written correctly. He had buytocover and buy stop orders submitted at the same time. However, the way PowerLanguage works only one of such orders will be chosen for execution. We simply showed him how to re-write the code to have his positions reversed.

The bottom line is: please send me the code to mpashkova@tssupport.com and I'll get back to your with the comments.

Best regards.

SUPER
Posts: 646
Joined: 03 Mar 2007
Has thanked: 106 times
Been thanked: 84 times

Postby SUPER » 16 Oct 2008

Marina,

Thanks for your feedback.

I am not the same person, to put record straight.

I am using a code which is some thing like

[intrabarordergeneration=true]

If Marketposition <>1 and BuySetUp then Buy next bar at XXX Stop;
If Marketposition <>-1 and ShortSetUp then SellShort next bar at XXX Stop;

The problem I have highlighted does not occur all times it happens intermittently, there is no fixed pattern or time.

I am not sure if you had a look at the log file, it contains log data of problem area for easy reference.

Let me know if you need any further information.

Regards
Super

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 21 Oct 2008

Hi SUPER,

If that code does not work as expected, please make sure that in Strategy Propeties -> Auto Trading -> IB Settings you have the options for All or None Execution checked.

Let me know if that fixes the problem.

SUPER
Posts: 646
Joined: 03 Mar 2007
Has thanked: 106 times
Been thanked: 84 times

Postby SUPER » 22 Oct 2008

Hi Marina,

If All or None Execution option are checked, I get following error message

" order rejected-reason: All or none orders are not supported for this combination of exchange and security type"

I have tried this on NQZ8 and DAX future contracts on both Sync and Async mode with same error message.

Look forward to your suggestion.

Regards
Super

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 22 Oct 2008

Hi SUPER,

Due to IB limitations, this order type is not available for some symbols/exchanges.

In your case, the only thing I could suggest, is disable IOG. The orders won't be generated this often and will, in fact, have a chance to be executed.

Or you can also use the asynchronous auto trading mode with conversion of the unfilled limit/stop orders to market orders. However, you would sacrifice having your orders filled at the desired price levels to having them executed no matter what.


Return to “MultiCharts”