Page 1 of 1

POSITION SYNCHRONIZATION FOR AUTOTRADING

Posted: 21 Apr 2008
by Marina Pashkova
To synchronize positions in MultiCharts before starting autotrading please use the signal below.

By the moment autotrading is turned on there might be some signals on history data which result in MultiCharts thinking there is an open position. For autotrading to start from scratch these positions must be closed. The signal below will help you do that.

If you need any further explanations please let me know.

Posted: 21 Apr 2008
by danilo
Marina,

a question :

why you set [intrabarordergeneration = false] and use intrabarpersist ?

Posted: 28 Apr 2008
by Marina Pashkova
Hi danilo,

May I ask why you would like to know why the signal is written this way? Has this signal worked for you?

Posted: 28 Apr 2008
by danilo
Hi Marina,

When I read the code I had the suspect that was not working when IOG is set to true, but I have verified that it works even in this situation, so no problem !
I think that few people are testing the IOG and since I'm using this feature only to emulate the old-style limit orders, I would suggest again to consider to add the option of "emulate" the old-style limit/stop order in the next MC realease/SP, please consider the fact that the emulation using IOG even if is solid like a rock will require a lot of changes on current strategies (*).

thanks for the question,
Danilo

(*) I'm just asking to save the old code, not to write a new one.

Posted: 05 May 2008
by Marina Pashkova
Hi danilo,

With the conversion timeout set to 0 seconds (the conversion of limit/stop orders to price orders), the new autotrading will work the same way it worked before.

At this point, this feature does not work correctly of a bug. But the bug has already been fixed and will be included in the MultiCharts service pack.

Regards.

Posted: 05 May 2008
by danilo
Dear Marina,

This is a great improvement, thanks to have understood the importance of the problem.

Kind Regards,
Danilo

Posted: 07 May 2008
by Marina Pashkova
Sure Danilo. Keep us posted about the bugs if you come across any.

Posted: 13 Oct 2008
by danilo
Marina,

I have tested the code with the new beta using the AA mode, but It seems that doesn't work, could you verify ?

Regards,
Danilo

Posted: 15 Oct 2008
by Marina Pashkova
Hi Danilo,

Just to make sure that we are on the same page: which code did you use in the AA mode?

Thanks for clarifications.

Posted: 15 Oct 2008
by danilo
Hi Danilo,

Just to make sure that we are on the same page: which code did you use in the AA mode?

Thanks for clarifications.
I'm using the following code:

Code: Select all

[intrabarordergeneration = false];
var : intrabarpersist processed(false);

if 1=getappinfo(aistrategyauto) and LastBarOnChart_s and not processed then begin
sell all contracts this bar at c;
buytocover all contracts this bar at c;
processed = true;
end;
Regards,
Danilo

Posted: 21 Oct 2008
by Marina Pashkova
Hi Danilo,

Could you please clarify what makes you think it doesn't work? What exactly happens when you use the code and how is that different from the expected result?

Thank you!

Posted: 21 Oct 2008
by danilo
Marina,

If I disconnect the autotrading with positions not closed when I reconnect the autotrading the positions aren't closed.

Regards,
Danilo