Version 5.5 Screwy behavior

Questions about MultiCharts and user contributed studies.
drwar
Posts: 218
Joined: 31 Jul 2005

Version 5.5 Screwy behavior

Postby drwar » 03 Oct 2009

RE: Version 5.5

I am testing some code on History volume bars with two data streams. I have spent about 3 hours trying to figure out why a function is returning incorrect values. I inserted a print statement in the main body of code and found the following. The Main body of code is executing more than once per bar. I get as many as three print statements for the same bar even tho that section of code is isolated by a Barstatus(1)=2 . The date and time stamp of the bar is repeated. The barnumber is incremented and even jumps at different points.
This is totally illogical. Its as if its trying to execute intrabar. Update every tick is not checked. ( this is history data anyway so there are no ticks ).

Here is the output:

There is only one bar at 122534

Date: 1091001.00 Time: 122534.00 LS 1.00 Barnumber 15856.00
Date: 1091001.00 Time: 122534.00 LS 0.00 Barnumber 15857.00
Date: 1091001.00 Time: 122534.00 LS 1.00 Barnumber 15858.00

There is only one bar at 122539

Date: 1091001.00 Time: 122539.00 LS 0.00 Barnumber 15860.00
Date: 1091001.00 Time: 122539.00 LS 1.00 Barnumber 15861.00

Note also how the barnumber jumps from one bar to the next and increments on the same bar.

Although this is an indicator, possibly it has something to do with your intrabar backtesting. How can that be shut off.

J~

drwar
Posts: 218
Joined: 31 Jul 2005

Postby drwar » 03 Oct 2009

I simplified the problem and removed the second data stream. It does not make a difference.

Here is the code and the same sample of data. It actually looks worse I think because its such a small code snipet that it executes faster and you get more executions on the same bar. The data is from two chart bars.

If barstatus(1)=2 Then Print(file("c:\Multicharts\TestData.txt"),
" Date: ",Date,
" Time: ",Time_S,
" Barnumber ",barnumber of data1);


Date: 1091001.00 Time: 122534.00 Barnumber 4228.00
Date: 1091001.00 Time: 122534.00 Barnumber 4229.00
Date: 1091001.00 Time: 122534.00 Barnumber 4230.00
Date: 1091001.00 Time: 122534.00 Barnumber 4231.00


Date: 1091001.00 Time: 122539.00 Barnumber 4232.00
Date: 1091001.00 Time: 122539.00 Barnumber 4233.00
Date: 1091001.00 Time: 122539.00 Barnumber 4234.00

jek
Posts: 163
Joined: 24 Dec 2006
Been thanked: 2 times

Postby jek » 01 Nov 2009

Did you ever get a response to this?

jek
Posts: 163
Joined: 24 Dec 2006
Been thanked: 2 times

Postby jek » 01 Nov 2009

Reading this more carefully, one explanation is that time is not kept more finely than one second and that there are, in fact, more than one bar per second.

Could this be the explanation?

drwar
Posts: 218
Joined: 31 Jul 2005

Postby drwar » 01 Nov 2009

Reading this more carefully, one explanation is that time is not kept more finely than one second and that there are, in fact, more than one bar per second.

Could this be the explanation?



No this is not the explanation. Just looking at the data I showed one might draw that conclusion, However, There are no such corresponding bars on the price chart, so it is executing more than once per bar.

There are other problems as well if you try and plot on data2 with a long term chart. But I have reported that problem as well. I am sure they will be fixed as soon as they get to it.

J~


Return to “MultiCharts”