Dangerous Bug in Autotrading  [SOLVED]

Questions about MultiCharts and user contributed studies.
guest

Dangerous Bug in Autotrading

Postby guest » 22 Jul 2007

Multicharts should only allow autotrading on the last bar. Lets say I turn on multicharts at 1:00pm. The chart starts downloading data and updates the chart bar by bar. Multicharts then sees that there was a signal at 10:00 am and it places the order on IB. This is a big problem because it's currently 1:00pm already.

This problem will also occur if Multicharts loses connection with the data provider during the day, and the chart refreshes itself.

Please do not let Multicharts do this. Thanks.

maxpi
Posts: 58
Joined: 03 Jun 2007

Postby maxpi » 22 Jul 2007

The lastbaronchart keyword will prevent that.

Guest

  [SOLVED]

Postby Guest » 22 Jul 2007

maxpi,
Can you explain better.

Thank you.

guest

Postby guest » 22 Jul 2007

i think multicharts should take care of this by default. there are no circumstances where you want it to work the way that it does currently.

Guest

Postby Guest » 22 Jul 2007

if EntryConditionsMet = true
and Marketposition = 0
and lastbaronchart
then
Buy Next Bar at Market;

maxpi
Posts: 58
Joined: 03 Jun 2007

Postby maxpi » 22 Jul 2007

TS has worked exactly the same for years. If you remove the lastbaronchart condition you can run tests without live data, if you don't put it in you can really get messed up when your chart refreshes and sends off a lot of orders, it's just a reality that has to be dealt with properly.

guest

Postby guest » 22 Jul 2007

TS 2000i is able to handle this properly though. you don't need to put in the lastbaronchart code and it will run fine either backtesting or auto trading.
TS has worked exactly the same for years. If you remove the lastbaronchart condition you can run tests without live data, if you don't put it in you can really get messed up when your chart refreshes and sends off a lot of orders, it's just a reality that has to be dealt with properly.

guest

Postby guest » 22 Jul 2007

i don't think you need the marketposition=0 line, correct?
if EntryConditionsMet = true
and Marketposition = 0
and lastbaronchart
then
Buy Next Bar at Market;

guest

Postby guest » 24 Jul 2007

i added the lastbaronchart filter but now my strategy won't place the orders.

my entry condition is
buy 1 contract next bar on stop;

i think it's not executing because the lastbaronchart filter does not work with "next bar on stop."

i tried changing it to "this bar on stop" but it still doesn't wok. can someone tell me what i need to do? thanks.
TS has worked exactly the same for years. If you remove the lastbaronchart condition you can run tests without live data, if you don't put it in you can really get messed up when your chart refreshes and sends off a lot of orders, it's just a reality that has to be dealt with properly.

User avatar
Andrew Kirillov
Posts: 1589
Joined: 28 Jul 2005
Has thanked: 2 times
Been thanked: 31 times
Contact:

Postby Andrew Kirillov » 25 Jul 2007

Guest,
Could you give me step by step instructions to reproduce the issue?
Thank you

guest

Postby guest » 25 Jul 2007

use this as the code for a strategy:

if time = 1100 then buy 1 contract next bar on open;
setexitonclose;

at 1000, disconnect you data feed (simulating that there's a problem with the data feed).

at 1200, reconnect your data feed (simulating that the data feed has been fixed).

multicharts should start filling in the data from 1000 to 1200. when it does so, it will send the order that was supposed to be sent at 1100, but it's already 1200.

in this scenario, i think multicharts should have a safety feature that does not allow the 1100 order to be sent.

User avatar
Andrew Kirillov
Posts: 1589
Joined: 28 Jul 2005
Has thanked: 2 times
Been thanked: 31 times
Contact:

Postby Andrew Kirillov » 27 Jul 2007

multicharts should start filling in the data from 1000 to 1200.
What do you mean by "start filling in the data"? MultiCharts will not backfill data until you close and open a chart again. Are you talking about real-time quotes?

guest

Postby guest » 27 Jul 2007

i'm talking about the time when i got the pop up window saying that there's an error with eSignal data manager. it was trying to find the winros.exe file again. i left my computer when it did that and i didn't know about it until 2 hours later. then i opened eSignal data manager manually like it suggested, and multicharts started filling in the bars one by one. then it executed an order from 1 hour ago.

User avatar
Andrew Kirillov
Posts: 1589
Joined: 28 Jul 2005
Has thanked: 2 times
Been thanked: 31 times
Contact:

Postby Andrew Kirillov » 27 Jul 2007

Thank you for the explanation.
I consulted to engineers and they don't think the script can generate the signal if the condition is different.
I've personally tested and my observations agree with their opinion.
So please contact our helpdesk to demonstrate the issue. Please do it ASAP if you want see the fix in MultiCharts 2.1.

guest

Postby guest » 27 Jul 2007

hi andrew, i know the problem is hard to reproduce, but i assure you that it can happen. it did happen to me. i think the way to reproduce it is to to

1) use the code i provided.
2) open the chart
3) at 1000, put the winros.exe file in another folder to generate the error message.
4) at 1200, open data manager manually like the error message suggests
5) multicharts should start filling in the gap
6) multicharts will execute the order when it gets to the 1100 bar

maybe step 2 is unrealistic if file path for winros.exe is correct.

btw, i think multicharts is an excellent platform. i just want to help you guys perfect it.

User avatar
Andrew Kirillov
Posts: 1589
Joined: 28 Jul 2005
Has thanked: 2 times
Been thanked: 31 times
Contact:

Postby Andrew Kirillov » 30 Jul 2007

Thank for the information. Unfortunately we tried many times to reproduce it without success. Please keep an eye on it and if you can see a pattern let me know.


Return to “MultiCharts”