MC64 8.0Beta can't cancel the time based order..

Questions about MultiCharts and user contributed studies.
ducktail
Posts: 21
Joined: 21 Feb 2011
Has thanked: 22 times
Been thanked: 7 times

MC64 8.0Beta can't cancel the time based order..

Postby ducktail » 23 Feb 2012

Hi, I like time based trading.
The code below works fine on MC6.2 & MC7.4,
but it doesn't work fine on MC64 8.0Beta.
When "StartTime" came, MC64 8.0Beta issued a limit order. It's OK.
But when "EndTime" came, MC64 8.0Beta didn't cancel the order.
Is this a kind of bug?

Code: Select all


Input:StartTime(0),EndTime(0),LimitPrice(0);

if time>=StartTime and time<EndTime then Buy next bar at LimitPrice Limit;

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: MC64 8.0Beta can't cancel the time based order..

Postby Henry MultiСharts » 24 Feb 2012

Hello Ducktail,

Please provide additional information regarding the problem:
-who is your data feed and broker
-is it a live or demo account
-what symbol and resolution are you trading
-attach the screenshots of settings and sessions tabs (Quote manager->Edit symbol)
-what inputs do you use for this study
-what time is selected on the chart-local or exchange
-what is your local time zone
-is the order generated or not (file->New->Order and position tracker window->Orders tab)
-is the order rejected/what is the reason of the reject (file->New->Order and position tracker window->Logs tab)
-can the problem be easily reproduced?

ducktail
Posts: 21
Joined: 21 Feb 2011
Has thanked: 22 times
Been thanked: 7 times

Re: MC64 8.0Beta can't cancel the time based order..

Postby ducktail » 24 Feb 2012

Henry, thanks for your reply.

-who is your data feed and broker
A. IB.

-is it a live or demo account
A. Both.

-what symbol and resolution are you trading
A. ESH2 1min, CLJ2 1min, GCJ2 1min, FDAX MAR 12 1min.

-attach the screenshots of settings and sessions tabs (Quote manager->Edit symbol)
A. Yes.
QS_20120224-231924.png
Setting & Session
(22.49 KiB) Downloaded 948 times
QS_20120224-231926.png
Setting & Session
(27.15 KiB) Downloaded 935 times
-what inputs do you use for this study
A. This code is just a sample for the test. I attached some screenshot with GCJ2 with input StartTime 907 EndTime 910 LimitPrice 1750.
QS_20120224-230600.png
Screenshot 1 Before StartTime
(17.89 KiB) Downloaded 943 times
QS_20120224-230733.png
Screenshot2 Between StartTime and EndTime
(18.49 KiB) Downloaded 934 times
QS_20120224-231324.png
Screenshot3 After EndTime
(16.73 KiB) Downloaded 953 times
-what time is selected on the chart-local or exchange
A. Exchange.

-what is your local time zone
A. Japan Standard Time.

-is the order generated or not (file->New->Order and position tracker window->Orders tab)
A. Yes. No problem.

-is the order rejected/what is the reason of the reject (file->New->Order and position tracker window->Logs tab)
A. No. There aren't any logs about this.

-can the problem be easily reproduced?
A. Yes. Very easy.

Regards,

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: MC64 8.0Beta can't cancel the time based order..

Postby Henry MultiСharts » 24 Feb 2012

Thank you for the detailed reply.
We will try to reproduce the problem in our environment.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: MC64 8.0Beta can't cancel the time based order..

Postby Henry MultiСharts » 27 Feb 2012

Ducktail,

This issue is confirmed. It will be fixed in the next version of MultiCharts.
Please contact us directly in case you are interested in a hotfix for this issue.

guppy
Posts: 9
Joined: 20 Sep 2011
Has thanked: 1 time

Re: MC64 8.0Beta can't cancel the time based order..

Postby guppy » 27 Feb 2012

I am interested in a hotfix for this. I am having he same issue and posted below is my simple code. Please note that i get this error when trading live. There are only issues in live mode and it works gives correct calculation in backtesting. I am using the 1 hour chart.

The problem is that once my bear condition or bull condition is met along with marketpostion = 0 , a pending stop order is placed to take the break of the current bar the beginning of the next hour.

Once the pending orders are in and the hour closes but the pending order targets are not hit, it should automatically cancel since it did not get exuctued. However the pending stop orders are there indefinetly forever. I can see the timestamp when the pending orders were sent and they are still there hours and hours later with showing they have not been canceled even though the bear and bull condition no longer exist.

code is below:


vars: bull(false), bear(false);

value1=(minmove/pricescale);
value2=(minmove/PriceScale)*bigpointvalue;

bear = h[1]<h and l[1]<l;
bull = h[1]>h and l[1]>l;

if marketposition = 0 and bear then
begin
sellshort 1 contracts next bar at l - 1 point or lower;
end;

if marketposition = 0 and bull then
begin
buy 1 contracts next bar at h + 1 point or higher;
end;

setstopcontract;
setprofittarget(100);
setstoploss(100);

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: MC64 8.0Beta can't cancel the time based order..

Postby Henry MultiСharts » 29 Feb 2012

Ducktail and Guppy have confirmed that the issue is fixed.
The fix will be available for public in MultiCharts 8.0 beta 2


Return to “MultiCharts”