Is there a problem?

Questions about MultiCharts and user contributed studies.
elvis1984
Posts: 6
Joined: 19 Sep 2013
Has thanked: 1 time

Is there a problem?

Postby elvis1984 » 01 Nov 2013

I encountered two unbelievable bug today using MC,

1, I wrote a condition to open the position and condition1= (A and B and C), where A= true
B= True, C= flase, How can I get condition1=true??

2, I used backtester for the strategy, then I found if I add a new data source( like data2) and even I do not use it in anywhere within the strategy, the backtest results differs.

How can these happen? thanks.

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 559 times

Re: Terrible bug

Postby Andrew MultiCharts » 01 Nov 2013

Hello Elvis1984,

1. If some conditions are not met in your code during its calculation on a chart, you should use "print" keyword within your study/strategy script to output conditions logic checking in order to adjust the code and make it work the way you expect. You can find a good example of "print" usage here.

2. Please provide us with the following set of files demonstrating the issue, i'd be glad to study the case:
  • The workspace to reproduce the situation.
  • Export of used symbols (with data) from QuoteManager in .qmd archive,
  • The exported script with all dependent functions that applied on the workspace.
  • Specify the bar number, its date and time, where the problem takes place.

User avatar
furytrader
Posts: 354
Joined: 30 Jul 2010
Location: Chicago, IL
Has thanked: 155 times
Been thanked: 217 times

Re: Terrible bug

Postby furytrader » 04 Nov 2013

Weird, because when I run the following code:

Code: Select all

Condition1 = TRUE;
Condition2 = TRUE;
Condition3 = FALSE;

Condition4 = CONDITION1 AND CONDITION2 AND CONDITION3;

If LastBarOnChart Then Print(Condition4);
MultiCharts correctly indicates FALSE.

Maybe you could shed some light on the rest of your code to see where things are going awry.

As for adding the second data set, I know that this may lead to changes to when the first trade occurs (this has to do with the "Maximum Bars Back To Reference"). When you run the system without adding the second data set, when does the historical trade record begin? How does this compare when you add the second data set?


Return to “MultiCharts”